MATLAB: How to create a sequence of numbers on the GPU

gpuarrayMATLAB

I want to do the follow in a new GPU Array, efficiently:
myarray = 1:100000
gpuArray(1:100000) works of course, but if I'm not wrong it's creating the large array in main memory then moving the whole thing to the GPU. I would expect that I can create the sequence of numbers on the GPU directly more efficiently, as I can do with many random numbers.

Best Answer

Found it.
gpuArray.linspace(1,1000,1000);
>> tic; for i = 1:10000; gpuArray(1:100000); end; toc;
Elapsed time is 2.737965 seconds.
>> tic; for i = 1:10000; gpuArray.linspace(1,100000,100000); end; toc;
Elapsed time is 0.916697 seconds.