]> AND Private Git Repository - book_gpu.git/blob - BookGPU/Chapters/chapter3/code/kernSkel.cu
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
last version
[book_gpu.git] / BookGPU / Chapters / chapter3 / code / kernSkel.cu
1 texture<short, 2, cudaReadModeElementType> tex_img_in ;
2
3 __global__ void kernel_ident( short *output, int w)
4 {  
5   int j = __mul24(blockIdx.x,blockDim.x) + threadIdx.x ; 
6   int i = __mul24( blockIdx.y, blockDim.y) + threadIdx.y ;
7
8   output[ __mul24(i, w) + j ] = tex2D(tex_img_in, j, i) ;
9
10 }
11
12