I'm using texture memory for image filtering in CUDA as:
texture<unsigned char> texMem; //deceleration
cudaBindTexture( NULL, texMem,d_inputImage,imageSize); //binding
However I'm not satisfied with the results at the boundary. Is there any other considerations or settings for texture memory tailored for 2D filtering?
I've seen people declear texture this way:
texture<float> texMem(0,cudaFilterModeLinear);
// what does this do?
Moreover, if anyone can suggest some online guide explaining how to properly set setup texture开发者_JS百科 memory abstraction in CUDA, that'll be helpful. Thanks
You can specify what kind of sampling you want using cudaFilterMode
(could be linear or cubic).
You could look at Appendix G from the CUDA_C_Programming_Guide.pdf provided in path/to/cudatoolkit/doc to see this explained in detail
精彩评论