I am currently trying to use surf2Write in a template kernel that follows the pattern:
global void writeKernel( cudaSurfaceObject_t surfobj)
//things using the T typename…
float3 data = make_float3(0.0f,0.0f,0.0f);
surf2DWrite(data, surfobj, x*sizeof(float3),y);
and I have the following problem when linking:
no instance of overloaded function surf2DWrite matches argument list …
With the argument list I provided: float3, cudaSurfaceObject_t, long, int …
I cannot reproduce the error when I simply replace float3 by uchar4, this example being given in the programming guide.
Previously I had a problem with surf3Dwrite and simple float, but, adding -gencode-arch=compute_30, code=sm_30 under cuda 5.5, solved it.
Now, I don’t undestand why I am still having a similar problem on float3, is this vector type even support by surf2Dread ???
I would really appreaciate any comment or indication on this problem, thank you in advance