diff --git a/stim/cuda/conv2.cuh b/stim/cuda/conv2.cuh index 4e778e5..a40fdd0 100644 --- a/stim/cuda/conv2.cuh +++ b/stim/cuda/conv2.cuh @@ -17,7 +17,7 @@ namespace stim{ //the radius of mask - unsigned r = (M - 1)/2; + int r = (M - 1)/2; //calculate the 1D index for this thread @@ -32,7 +32,7 @@ namespace stim{ if(i < w && j < h){ - //copy[idx] = tex2D(texObj, i, j); + //copy[idx] = tex2D(texObj, i+100, j+100); //return; //tex2D(texObj, i, j); @@ -49,12 +49,12 @@ namespace stim{ for (int x = i - r; x <= i + r; x++){ //idx to mask cordinates(xx, yy) - unsigned int xx = x - (i - r); - unsigned int yy = y - (j - r); + int xx = x - (i - r); + int yy = y - (j - r); //T temp = img[y * w + x] * mask[yy * M + xx]; //sum += img[y * w + x] * mask[yy * M + xx]; - sum += tex2D(texObj, x-50, y+100) * mask[yy * M + xx]; + sum += tex2D(texObj, x, y) * 1.0;//mask[yy * M + xx]; } } copy[idx] = sum; -- libgit2 0.21.4