Perform the Kronecker multiplication between two matrix.
dResult = gpuKronecker(A,B)
Can be :
Pointer on the matrix stored in device memory (GPU).
Pointer on the matrix stored in host memory (CPU).
Can be :
Pointer on the matrix stored in device memory (GPU).
Pointer on the matrix stored in host memory (CPU).
dResult is the result of computation stored in device memory (GPU).
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.
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)) gpuFree(d1); gpuFree(d2); gpuFree(d3); | ![]() | ![]() |