Commit 3bd72370b0c8a1fc6fcfd28a0c756726f292f4f9
1 parent
d46f9ac6
very minor indexing fix that slipped though
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
stim/cuda/filter.h
... | ... | @@ -19,13 +19,14 @@ texture<uchar, cudaTextureType2D, cudaReadModeElementType> texIn; |
19 | 19 | __device__ float filterKernel () |
20 | 20 | { |
21 | 21 | float t = 0; |
22 | + idx = j*kl+i; | |
22 | 23 | for(int i = 0; i < kl; i++){ |
23 | 24 | for(int j = 0; j < kl; j++){ |
24 | 25 | x = i - floor(kl); |
25 | 26 | y = j - floor(kl); |
26 | - LoG(i,j) = (-1/M_PI/sigma^4)* (1 - (x^2+y^2)/2/sigma^2) | |
27 | + LoG(idx) = (-1/M_PI/sigma^4)* (1 - (x^2+y^2)/2/sigma^2) | |
27 | 28 | *exp(-(x^2+y^2)/2/sigma^2); |
28 | - t +=LoG(i,j); | |
29 | + t +=LoG(idx); | |
29 | 30 | } |
30 | 31 | } |
31 | 32 | LoG =/ t; | ... | ... |