X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/these_gilles.git/blobdiff_plain/1bdc5bd76352d829a51e2d6407ad331af7164113..HEAD:/THESE/Chapters/chapter6/code/convoSepShH.cu?ds=inline diff --git a/THESE/Chapters/chapter6/code/convoSepShH.cu b/THESE/Chapters/chapter6/code/convoSepShH.cu index c65c920..6b0b0a9 100644 --- a/THESE/Chapters/chapter6/code/convoSepShH.cu +++ b/THESE/Chapters/chapter6/code/convoSepShH.cu @@ -4,8 +4,8 @@ __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 tidX = threadIdx.x<<3 ; // offset paquet + 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 int j = (__umul24(blockIdx.x,blockDim.x) + threadIdx.x)<<3 ; @@ -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