    dim3 threads(32,16);
 
    backwardBilinearSampling <false> <<< blocks, threads, 0, THCState_getCurrentStream(state) >>> (
-                                                      THCudaTensor_data(state, inputImages), 
+                                                      THCudaTensor_data(state, inputImages),
                                                       THCudaTensor_stride(state, inputImages, 0),
                                                       THCudaTensor_stride(state, inputImages, 3),
                                                       THCudaTensor_stride(state, inputImages, 1),
                                                       THCudaTensor_stride(state, inputImages, 2),
-                                                      THCudaTensor_data(state, gradInputImages), 
+                                                      THCudaTensor_data(state, gradInputImages),
                                                       THCudaTensor_stride(state, gradInputImages, 0),
                                                       THCudaTensor_stride(state, gradInputImages, 3),
                                                       THCudaTensor_stride(state, gradInputImages, 1),
                                                       THCudaTensor_stride(state, gradInputImages, 2),
-                                                      THCudaTensor_data(state, grids), 
+                                                      THCudaTensor_data(state, grids),
                                                       THCudaTensor_stride(state, grids, 0),
                                                       THCudaTensor_stride(state, grids, 3),
                                                       THCudaTensor_stride(state, grids, 1),
                                                       THCudaTensor_stride(state, grids, 2),
-                                                      THCudaTensor_data(state, gradGrids), 
+                                                      THCudaTensor_data(state, gradGrids),
                                                       THCudaTensor_stride(state, gradGrids, 0),
                                                       THCudaTensor_stride(state, gradGrids, 3),
                                                       THCudaTensor_stride(state, gradGrids, 1),
                                                       THCudaTensor_stride(state, gradGrids, 2),
-                                                      THCudaTensor_data(state, gradOutput), 
+                                                      THCudaTensor_data(state, gradOutput),
                                                       THCudaTensor_stride(state, gradOutput, 0),
                                                       THCudaTensor_stride(state, gradOutput, 3),
                                                       THCudaTensor_stride(state, gradOutput, 1),
                                                       THCudaTensor_stride(state, gradOutput, 2),
                                                       THCudaTensor_size(state, inputImages, 3),
-                                                      THCudaTensor_size(state, inputImages, 1), 
+                                                      THCudaTensor_size(state, inputImages, 1),
                                                       THCudaTensor_size(state, inputImages, 2),
                                                       THCudaTensor_size(state, gradOutput, 2));
 

   }// must put a big if condition in order not to hang at __syncthreads()...
   __syncthreads();

   if(threadIdx.y==0 && withinGridBounds)      
       gradGrids_data[b*gradGrids_strideBatch + yOut*gradGrids_strideHeight + xOut*gradGrids_strideWidth + threadIdx.x] = gridData[threadIdx.x];   
}



        + (1 - xWeightTopLeft) * yWeightTopLeft * inTopRight
        + xWeightTopLeft * (1 - yWeightTopLeft) * inBottomLeft
        + (1 - xWeightTopLeft) * (1 - yWeightTopLeft) * inBottomRight;

      output_data[outAddress + t] = v;
   }
}
