开发者

Filtering in CUDA using Texture Memory

开发者 https://www.devze.com 2023-02-18 12:49 出处:网络
I\'m using texture memory for image filtering in CUDA as: texture<unsigned char> texMem; //deceleration

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

0

精彩评论

暂无评论...
验证码 换一张
取 消