Perform the sum of a matrix.
resSum = gpuSum(A)
Can be :
Pointer on the matrix stored in device memory (GPU).
Pointer on the matrix stored in host memory (CPU).
resSum is the result of computation in host memory (CPU).
gpuSum perform an addition between all elements of matrix.
gpuSum
A = rand(200,300) + %i * rand(200,300); dA = gpuSetData(A); resSum = gpuSum(A) resSum1 = gpuSum(dA) resSum2 = sum(A) dA=gpuFree(dA);