Browse Source

Fixed out-of-bound access in CUDA Otsu threshold implementation.

pull/3964/head
Alexander Smorkalov 2 weeks ago
parent
commit
b72527fbca
  1. 2
      modules/cudaarithm/src/cuda/threshold.cu

2
modules/cudaarithm/src/cuda/threshold.cu

@ -178,7 +178,7 @@ otsu_score(uint *otsu_threshold, uint *threshold_sums, float2 *variance) @@ -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;

Loading…
Cancel
Save