Creating a spesific variable onto the GPU using matlab -


i'm trying create simple variable on gpu, using

a=parallel.gpu.gpuarray.[1 2 3 4 5] 

the matlab returns

error:unbalanced or unexpected parenthesis or bracket.

i know can create random variable using same command :

a=parallel.gpu.gpuarray.rand(5) 

i'm using matlab 2012a

to create gpu array have use gpuarray function:

x = [1 2 3 4 5]; gpux = gpuarray(x); 

lets check it:

whos gpux   name      size            bytes  class       attributes    gpux      1x5                 4  gpuarray   

you can read article using gpu in matlab 2012 here.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -