<< gpuDeviceMemInfo sciGPGPU gpuDoubleCapability >>

sciGPGPU >> sciGPGPU > gpuDotMult

gpuDotMult

Perform the elementwise product between two matrix.

Call sequence

dResult = gpuDotMult(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 = gpuDotMult(A,B)

gpuDotMult perform an elementwise multiplication between two matrix or between a scalar and a matrix. In the case where A or B are scalar this function use cuBLAS to perform operations.

Exemples

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

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

d = gpuDotMult(A,B);
gpuGetData(d)
clear d;
A .* B

d = gpuDotMult(A,dA);
gpuGetData(d)
clear d;
A .* A

d = gpuDotMult(dB,B);
gpuGetData(d)
clear d;
B .* B

clear dA;
clear dB;

See Also


Report an issue
<< gpuDeviceMemInfo sciGPGPU gpuDoubleCapability >>