Skip to content

Commit 391ea10

Browse files
committed
cudaarithm: fix the compile faiure of CUDA 12.
The slight API change of NPP nppiMeanStdDevGetBufferHostSize_8u_C1R The type of bufSize is size_t instead of int in CUDA 12
1 parent ac994ed commit 391ea10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/cudaarithm/src/reductions.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ void cv::cuda::meanStdDev(InputArray src, OutputArray dst, Stream& stream)
151151
sz.width = gsrc.cols;
152152
sz.height = gsrc.rows;
153153

154+
#if CUDA_VERSION >= 12000
155+
size_t bufSize; // detail: CUDA>=12 NPP nppi_statistics_functions.h
156+
#else
154157
int bufSize;
158+
#endif
159+
155160
#if (CUDA_VERSION <= 4020)
156161
nppSafeCall( nppiMeanStdDev8uC1RGetBufferHostSize(sz, &bufSize) );
157162
#else

0 commit comments

Comments
 (0)