开发者

Write on texture memory/ access image neighbourhood

开发者 https://www.devze.com 2023-03-12 15:18 出处:网络
Is there any way to write on texture memory? I need to access(read and write) the neighbourhood of a pixel in an image. What w开发者_开发问答ill be the effective way to do that?devices of compute capa

Is there any way to write on texture memory? I need to access(read and write) the neighbourhood of a pixel in an image. What w开发者_开发问答ill be the effective way to do that?


devices of compute capability 2.x have support for surface memory. Take a look at Section 3.2.4.2 Surface Memory and Section 3.2.4.4 Read/Write Coherency in Cuda C Programming Guide 3.2 or above.

Other way is load data into the share memory space within a block with an extra padding of 1 pixel. However, performance depends on the computation of the kernel. If there are really few operations, load the share memory will not compensate.

Hope this help.

0

精彩评论

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

关注公众号