Skip to content

Commit b72527f

Browse files
committed
Fixed out-of-bound access in CUDA Otsu threshold implementation.
1 parent 28e6ce5 commit b72527f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/cudaarithm/src/cuda/threshold.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ otsu_score(uint *otsu_threshold, uint *threshold_sums, float2 *variance)
178178
{
179179
const uint32_t n_thresholds = 256;
180180

181-
__shared__ float shared_memory[n_thresholds / WARP_SIZE];
181+
__shared__ float shared_memory[n_thresholds];
182182

183183
int threshold = threadIdx.x;
184184

0 commit comments

Comments
 (0)