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

Private GIT Repository
ch17
[book_gpu.git] / BookGPU / Chapters / chapter3 / code / kernMedian2pix5.cu
index b01619eb8bfb0aa95003a3f18f5af946d49369e7..50511ce61f1f5334a4b9fd13a5b9bf7ba7af1cee 100755 (executable)
@@ -4,7 +4,7 @@ __global__ void kernel_median5_2pix( short *output,
   int j= __mul24(__mul24(blockIdx.x,blockDim.x) + threadIdx.x,2); 
   int i= __mul24(blockIdx.y,blockDim.y) + threadIdx.y;
   int a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13;//left window
   int j= __mul24(__mul24(blockIdx.x,blockDim.x) + threadIdx.x,2); 
   int i= __mul24(blockIdx.y,blockDim.y) + threadIdx.y;
   int a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13;//left window
-  int b6,b7,b8,b9,b10,b11,b12,b13 ;                 //right window                                                                     
+  int b7,b8,b9,b10,b11,b12,b13 ;                 //right window                                                                        
   //first 14 common pixels
   a0  = tex2D(tex_img_ins, j-1, i-2) ;  // first line
   a1  = tex2D(tex_img_ins, j  , i-2) ;
   //first 14 common pixels
   a0  = tex2D(tex_img_ins, j-1, i-2) ;  // first line
   a1  = tex2D(tex_img_ins, j  , i-2) ;
@@ -37,7 +37,7 @@ __global__ void kernel_median5_2pix( short *output,
   minmax8(&a6,&a7,&a8,&a9,&a10,&a11,&a12,&a13);
   
   // separation
   minmax8(&a6,&a7,&a8,&a9,&a10,&a11,&a12,&a13);
   
   // separation
-  b6=a6; b7=a7; b8=a8; b9=a9; b10=a10; b11=a11; b12=a12; b13=a13;
+  b7=a7; b8=a8; b9=a9; b10=a10; b11=a11; b12=a12; b13=a13;
   
   // separate selections: 5 remaining pixels in both windows
   a13 = tex2D(tex_img_ins, j-2, i-2);
   
   // separate selections: 5 remaining pixels in both windows
   a13 = tex2D(tex_img_ins, j-2, i-2);