MATLAB PARALLEL COMPUTING TOOLBOX - S Guide de l'utilisateur Page 423

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 656
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 422
existsOnGPU
11-79
existsOnGPU
Determine if gpuArray or CUDAKernel is available on GPU
Syntax
TF = existsOnGPU(DATA)
Description
TF = existsOnGPU(DATA) returns a logical value indicating whether the gpuArray or
CUDAKernel object represented by DATA is still present on the GPU and available from
your MATLAB session. The result is false if DATA is no longer valid and cannot be used.
Such arrays and kernels are invalidated when the GPU device has been reset with any of
the following:
reset(dev) % Where dev is the current gpuDevice
gpuDevice(ix) % Where ix is valid index of current or different device
gpuDevice([]) % With an empty argument (as opposed to no argument)
Examples
Query Existence of gpuArray
Create a gpuArray on the selected GPU device, then reset the device. Query array’s
existence and content before and after resetting.
g = gpuDevice(1);
M = gpuArray(magic(4));
M_exists = existsOnGPU(M)
1
M % Display gpuArray
16 2 3 13
5 11 10 8
9 7 6 12
Vue de la page 422
1 2 ... 418 419 420 421 422 423 424 425 426 427 428 ... 655 656

Commentaires sur ces manuels

Pas de commentaire