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

Private GIT Repository
modif gillou
[book_gpu.git] / BookGPU / Chapters / chapter4 / code / convoGeneSh1.cu
index 53d9ba45d73f44d6bc4cac3b1075098526afa29a..dcb33793eda16bd3172b91819fea873283044342 100644 (file)
@@ -46,7 +46,7 @@ __global__ void kernel_convoNonSepSh_8p(unsigned char *output, int j_dim, int r)
        for( jc=0 ; jc<k ; jc++)
          {
                int baseRoi = __umul24(ic+threadIdx.y,(bdimX+k-1)) + jc+tidX ;
-               float valMask = masque[ __umul24(ic,k)+jc ] ;
+               float valMask = mask[ __umul24(ic,k)+jc ] ;
                outval0 += valMask*roi8p[ baseRoi ] ;
                outval1 += valMask*roi8p[ baseRoi +1 ] ;
                outval2 += valMask*roi8p[ baseRoi +2 ] ;
@@ -65,5 +65,5 @@ __global__ void kernel_convoNonSepSh_8p(unsigned char *output, int j_dim, int r)
   output[ idx++ ] = outval4 ;
   output[ idx++ ] = outval5 ;
   output[ idx++ ] = outval6 ;
-  output[ idx++ ] = outval7 ;
+  output[ idx   ] = outval7 ;
 }