From b72527fbcaeaff29b43cd387abb619052194786e Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 27 Jun 2025 17:04:23 +0300 Subject: [PATCH] Fixed out-of-bound access in CUDA Otsu threshold implementation. --- modules/cudaarithm/src/cuda/threshold.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cudaarithm/src/cuda/threshold.cu b/modules/cudaarithm/src/cuda/threshold.cu index c5586e61ab..6199081ba9 100644 --- a/modules/cudaarithm/src/cuda/threshold.cu +++ b/modules/cudaarithm/src/cuda/threshold.cu @@ -178,7 +178,7 @@ otsu_score(uint *otsu_threshold, uint *threshold_sums, float2 *variance) { const uint32_t n_thresholds = 256; - __shared__ float shared_memory[n_thresholds / WARP_SIZE]; + __shared__ float shared_memory[n_thresholds]; int threshold = threadIdx.x;