Research Article

True 4D Image Denoising on the GPU

Algorithm 1

//  Code  that  is  executed  before  the  kernel  is  launched
intthreadsInX  =  32;
intthreadsInY  =  16;
intblocksInX  =  DATA_W/threadsInX;
intblocksInX  =  DATA_H/threadsInY;
dimGrid  =  dim3(blocksInX,  blocksInY);
dimBlock  =  dim3(threadsInX,  threadsInY,  1);
//  Code  that  is  executed  inside  the  kernel
intx  =  blockIdx.x  *  blockDim.x  +  threadIdx.x;
inty  =  blockIdx.y  *  blockDim.y  +  threadIx.yd;