Skip to content

Commit d943e1d

Browse files
authored
Merge pull request #3964 from asmorkalov:as/threshold_otsu_fix
Fixed out-of-bound access in CUDA Otsu threshold implementation.
2 parents 28e6ce5 + b72527f commit d943e1d

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)