User`s guide

Establish Arrays on a GPU
9-7
For more information about generating random numbers on a GPU, and a comparison
between GPU and CPU generation, see “Control Random Number Streams” on page 6-37.
For an example that shows performance comparisons for different random generators,
see Generating Random Numbers on a GPU.
Examine gpuArray Characteristics
There are several functions available for examining the characteristics of a gpuArray
object:
Function Description
classUnderlying Class of the underlying data in the array
existsOnGPU Indication if array exists on the GPU and is accessible
isreal Indication if array data is real
length Length of vector or largest array dimension
ndims Number of dimensions in the array
size Size of array dimensions
For example, to examine the size of the gpuArray object G, type:
G = rand(100,'gpuArray');
s = size(G)
100 100