<< gpuSize sciGPGPU gpuTranspose >>

sciGPGPU >> sciGPGPU > gpuSum

gpuSum

Perform the sum of a matrix.

Call sequence

resSum = gpuSum(A)

Parameters

A

Can be :

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

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

resSum

resSum is the result of computation in host memory (CPU).

Description

resSum = gpuSum(A)

gpuSum perform an addition between all elements of matrix.

Exemples

A = rand(200,300) + %i * rand(200,300);
dA = gpuSetData(A);

resSum = gpuSum(A)
resSum1 = gpuSum(dA)
resSum2 = sum(A)

dA=gpuFree(dA);

See Also

<< gpuSize sciGPGPU gpuTranspose >>