<< gpuMult sciGPGPU gpuNorm >>

sciGPGPU >> sciGPGPU > gpuNdgrid

gpuNdgrid

Arrays for multidimensional function evaluation on grid.

Call sequence

X = gpuNdgrid(x, y)
[X Y] = gpuNdgrid(x, y)

Parameters

x, y

Can be :

Pointer on the vector stored in device memory (GPU).

Pointer on the vector stored in host memory (CPU).

X, Y

Matrix of size x by y, stored in GPU memory.

Description

[X, Y] = gpuNdgrid(x, y)

gpuNdgrid is the GPU implementation of Scilab ndgrid function, but work only on 2D.

Exemples

x  = 1:9;
dx = gpuSetData(x);
y  = 1:5;
dy = gpuSetData(y);

[dX dY] = gpuNdgrid(dx,dy);
gpuGetData(dX)
gpuGetData(dY)
[X Y] = ndgrid(x,y)

gpuFree(dx);
gpuFree(dy);
gpuFree(dX);
gpuFree(dY);

See Also


Report an issue
<< gpuMult sciGPGPU gpuNorm >>