Commit 06d27721 authored by Gaurav Kukreja's avatar Gaurav Kukreja

Indentation

Signed-off-by: 's avatarGaurav Kukreja <gmkukreja@gmail.com>
parent b44f67ad
...@@ -66,18 +66,18 @@ __device__ void convolveImage(float* imgIn, float* kernel, float* imgOut, int ra ...@@ -66,18 +66,18 @@ __device__ void convolveImage(float* imgIn, float* kernel, float* imgOut, int ra
if (idx < w * h * nc) if (idx < w * h * nc)
{ {
imgOut[idx] = 0; // initialize imgOut[idx] = 0; // initialize
float value = 0; float value = 0;
for(int j = -rad; j <= rad; j++) // for each row in kernel for(int j = -rad; j <= rad; j++) // for each row in kernel
{ {
int iny = gpu_max(0, gpu_min(iy+j, h-1)); int iny = gpu_max(0, gpu_min(iy+j, h-1));
for(int i = -rad; i <= rad; i++) // for each element in the kernel row for(int i = -rad; i <= rad; i++) // for each element in the kernel row
{ {
int inx = gpu_max(0, gpu_min(ix+i, w-1)); int inx = gpu_max(0, gpu_min(ix+i, w-1));
int inIdx = inx + (iny * w) + (iz * w * h); // Index of Input Image to be multiplied by corresponding element in kernel int inIdx = inx + (iny * w) + (iz * w * h); // Index of Input Image to be multiplied by corresponding element in kernel
value += imgIn[inIdx] * kernel[i+rad + ((j+rad) * (2 * rad + 1))]; value += imgIn[inIdx] * kernel[i+rad + ((j+rad) * (2 * rad + 1))];
}
} }
} imgOut[idx] = value;
imgOut[idx] = value;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment