Hello, I am trying to wright a variable directly on the GPU using the following command:
Afficher commentaires plus anciens
A5 = parallel.gpu.GPUArray.rand(3000,3000);
but I get the following error:
Undefined variable "parallel" or class "parallel.gpu.GPUArray.rand". I don't know why I get this error. I am using Matlab 2015b. Could someone help me?
Réponses (2)
Do you have the Parallel Processing Toolbox installed and licensed? Check this by the ver command.
1 commentaire
FRANCESCO DE VIVO
le 22 Nov 2016
Edric Ellis
le 23 Nov 2016
That's the old syntax from R2011a or so. In R2015b, you can do simply:
A5 = rand(3000, 3000, 'gpuArray');
(The direct equivalent is gpuArray.rand(3000,3000)).
2 commentaires
FRANCESCO DE VIVO
le 23 Nov 2016
Sean de Wolski
le 23 Nov 2016
Both of these create the array directly on the GPU.
Catégories
En savoir plus sur GPU Computing in MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!