I am working on the dot product between two matrices, I don’t found a function to do in CUBLAS, so i had to do a kernel. Now I try to convert that .cu file to a dynamic library (dll) to call from a main in another project.
When I compile the .cpp file I get “Error c2065 ‘blockidx’ undeclared identifier”, same error for blockDim and threadIdx.
Is posible make a dynamic library (dll) in VS2010 using a kernel, or i have problems in shaping the VS2010?
And if you are indeed using MATLAB and it stores the matrices in contigous column-major format, you theoretically can use just one cublasSdot() with the size of the ‘vector’ being (N*M). Since it is element wise it will be like doing this in MATLAB:
Assuming A(N,M) and B(N,M)
C=A(:).*B(:);
C=reshape(C(:),N,M);
I think that should work, but make sure you get the input parameters right.