Create a complex with two real matrix.
Cplx = gpuComplex(R, I)
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).
R and I must have the same size exepted if one is scalar.
Cplx is a matrix stored in device memory (GPU).
gpuComplex
create the complex matrix with the real part R and imaginay part I.
// one input argument A = rand(2,3); dA = gpuSetData(A); dCplx = gpuComplex(dA,A*10); gpuGetData(dCplx) gpuFree(dCplx); dCplx = gpuComplex(A,5); gpuGetData(dCplx) gpuFree(dCplx); dCplx = gpuComplex(3,dA); gpuGetData(dCplx) gpuFree(dCplx); | ![]() | ![]() |