Write on texture memory/ access image neighbourhood
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.
精彩评论