I’ve run into a compiler error and I am stymied… (I think I might have more luck programming in Mayan… :) )
I’ve declared pointers:
cudaMalloc ((void **)&Res, 2*NN * sizeof(Res[0]));
and
cublasAlloc (IcLc, sizeof(float), (void**)&gg);
cudaMemset(gg,0.0,IcLc*4);
and then, after hopefully filling Res with data, I am trying to copy Res to gg:
cudaMemcpy2DArrayToArray(gg,0,0,Res,0,0,ND,NK, cudaMemcpyDeviceToDevice);
I get two compiler errors from this line:
"… argument of type “float *” is incompatible with parameter of type “const cudaArray *” "
However, just above I have with similarly declared variables, e.g,:
cudaMemcpy (Arg, VAR, NN * sizeof(VAR[0]), cudaMemcpyHostToDevice);
which the compiler admires.
Can someone please suggest the incantation to fix the cudaMemcpy2DArrayToArray call? I suspect this may be a simple C question; I am a Fortran man in a C world, sigh…
Thx so much,
B.-C.