<< gpuNorm sciGPGPU gpuSetData >>

sciGPGPU >> sciGPGPU > gpuOnes

gpuOnes

Create a matrix of 1.

Call sequence

B = gpuOnes(A)
B = gpuOnes(x, y)

Parameters

A

Can be :

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

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

x, y

Scalars used to size the output matrix.

B

Output matrix stored in device memory.

Description

B = gpuOnes(x, y)
B = gpuOnes(A)

gpuOnes is the GPU implementation of Scilab ones function. It create a matrix of size x by y or of the same size as A and initializes it by 1.

Exemples

a  = rand(5,31);

b = ones(a);
size(b)

db = gpuOnes(a);
size(db)

clear db;

See Also


Report an issue
<< gpuNorm sciGPGPU gpuSetData >>