<< gpuExit sciGPGPU gpuFFT >>

sciGPGPU >> sciGPGPU > gpuExtract

gpuExtract

Obsolete function, use Scilab parenthesis instead.

Extract a part of GPU matrix.

Call sequence

[Obsolete] resMat = gpuExtract(A, row, col)
[Obsolete] resMat = gpuExtract(A, positions)
resMat = A(row, col)
resMat = A(positions)

Parameters

A

Can be :

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

[Obsolete] Pointer on the matrix stored in host memory (CPU).

row

A scalar or matrix stored in device or host memory.

col

A scalar or matrix stored in device or host memory.

positions

A matrix stored in device or host memory.

Positions where items will be extracted.

resMat

The part of matrix A stored in device memory.

Description

gpuExtract allow the user to extract a part of matrix stored in device.

Exemples

a  = matrix(1:12, 3, 4)
da = gpuSetData(a);

// extract a scalar
dc = da(3,3)
a(3,3)
clear dc;

// extract a part
dc = da([1 6 8 12])
a([1 6 8 12])
clear dc;
clear da;

a  = matrix(1:100, 10, 10)
da = gpuSetData(a);

dc = da(:)
clear dc;
a(:)

dc = da(2,:)
clear dc;
a(2,:)

dc = da([1 2; 4 5], [1 2 3])
clear dc;
a([1 2; 4 5], [1 2 3])

clear da;

See Also


Report an issue
<< gpuExit sciGPGPU gpuFFT >>