Hi
Right now I’m doing the following:
//global memory
texture<float, 2, cudaReadModeElementType> neighbourTexture;
.....
float* neighbours = NULL;
CUDA_SAFE_CALL( cudaMalloc( (void**) &neighbours, numberOfParticles*numberOfParticles*sizeof(float)));
// Here are a few kernels to write into the neighbours array
cudaBindTexture(0, neighbourTexture, neighbours, numberOfParticles*numberOfParticles);
.........
//error here
tex1Dfetch(neighbourTexture,(int)(numberOfParticles*id+i))
The error is the following:
(296): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (texture<float, 2, cudaReadModeElementType>, int)
Am I not allowed to make a texture of floats?