I have a problem with the understanding of the subroutine’s parameter in the example code for the matrix multiplication (NVIDIA_CUDA_Programming_Guide_2.1 - page 77) - the header of the subroutine is posted below.
A should be a matrix. But the soubroutine will get a constant pointer to a float A… and not to a matrix.
Now my problem: how exactly do I have to call this subroutine Mul from my main-routine? How does the declaration of the matrix in the main-routine looks like? I tried out a lot of different ways but I could never call the subroutine with a matrix … I appreciate any help!
// Host multiplication function // Compute C = A * B // hA is the height of A // wA is the width of A // wB is the width of B void Mul(const float* A, const float* B, int hA, int wA, int wB, float* C) ...
Thanx for helping!