<< gpuMin sciGPGPU gpuNorm >>

sciGPGPU >> sciGPGPU > gpuMult

gpuMult

Perform the product between two matrix.

Call sequence

dResult = gpuMult(A,B)

Parameters

A

Can be :

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

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

B

Can be :

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

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

dResult

dResult is the result of computation stored in device memory (GPU).

Description

dResult = gpuMult(A,B)

gpuMult perform an multiplication between two matrix or between a scalar and a matrix. This function use cuBLAS to perform operations.

Exemples

A = rand(300,300) + %i * rand(300,300);
B = rand(300,300) + %i * rand(300,300);

dA = gpuSetData(A)
dB = gpuSetData(B)

d1 = gpuMult(A,B);
d2 = gpuMult(d1,dB);
d3 = gpuMult(d2,dA);

result = gpuGetData(d3);

norm(result - (A*B*B*A))

d1 = gpuFree(d1);
d2 = gpuFree(d2);
d3 = gpuFree(d3);

See Also

<< gpuMin sciGPGPU gpuNorm >>