X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/these_gilles.git/blobdiff_plain/72441aeeda78a2607a1fe941b9a3580e74b4951c..7a1f7981654e75ea330b58c7f93620ce69bf13b2:/THESE/Chapters/chapter6/code/convoSepShH.cu diff --git a/THESE/Chapters/chapter6/code/convoSepShH.cu b/THESE/Chapters/chapter6/code/convoSepShH.cu index 9c82847..6b0b0a9 100644 --- a/THESE/Chapters/chapter6/code/convoSepShH.cu +++ b/THESE/Chapters/chapter6/code/convoSepShH.cu @@ -4,7 +4,7 @@ __global__ void kernel_convoSepShx8pH(unsigned char *output, int j_dim, int r) int k = 2*r+1 ; float outval0=0.0, outval1=0.0, outval2=0.0, outval3=0.0 ; float outval4=0.0, outval5=0.0, outval6=0.0, outval7=0.0 ; - int bdimX = blockDim.x<<3 ; // nombre de paquets par ligne + int bdimX = blockDim.x<<3 ; // nombre de pixels traités par une ligne d'un bloc int tidX = threadIdx.x<<3 ; // décalage paquet // coordonnées absolues du point de base @@ -25,8 +25,10 @@ __global__ void kernel_convoSepShx8pH(unsigned char *output, int j_dim, int r) // droite de la ROI if ( threadIdx.x < r ) { - roi8p[ idrow + bdimX + threadIdx.x ] = tex2D( tex_img_inc, j0-r +bdimX+threadIdx.x , i ) ; - roi8p[ idrow + bdimX + threadIdx.x +r ] = tex2D( tex_img_inc, j0 +bdimX+threadIdx.x , i ) ; + roi8p[ idrow + bdimX + threadIdx.x ] = tex2D( tex_img_inc, j0-r + +bdimX+threadIdx.x , i ) ; + roi8p[ idrow + bdimX + threadIdx.x +r ] = tex2D( tex_img_inc, j0 + +bdimX+threadIdx.x , i ) ; } __syncthreads(); @@ -35,7 +37,7 @@ __global__ void kernel_convoSepShx8pH(unsigned char *output, int j_dim, int r) for (jc=0 ; jc