<< gpuInterp2d sciGPGPU gpuLoadFunction >>

sciGPGPU >> sciGPGPU > gpuKronecker

gpuKronecker

Perform the Kronecker multiplication between two matrix.

Call sequence

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

gpuKronecker perform the 2D Kronecker multiplication between two full matrix. Known in Scilab as operator .*. or function kron. These functions have been overloaded to work with GPU variables.

Exemples

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

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

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

result = gpuGetData(d3);

assert_checkalmostequal(result, (A.*.B.*.B.*.A))

clear d1;
clear d2;
clear d3;

See Also


Report an issue
<< gpuInterp2d sciGPGPU gpuLoadFunction >>