how to do downsamling in texture memory

I want to do the downsampling in texture memory, for exampling, the input image is NN, while the output image is (N/2)(N/2). Does anyone know how to implement it in CUDA? Thank you.

I want to do the downsampling in texture memory, for exampling, the input image is NN, while the output image is (N/2)(N/2). Does anyone know how to implement it in CUDA? Thank you.