@@ -281,8 +281,13 @@ cv::Ptr<cv::cuda::CLAHE> cv::cuda::createCLAHE(double clipLimit, cv::Size tileGr
281
281
282
282
namespace
283
283
{
284
+ #if (CUDA_VERSION >= 12040)
285
+ typedef NppStatus (*get_buf_size_c1_t )(NppiSize oSizeROI, int nLevels, size_t * hpBufferSize);
286
+ typedef NppStatus (*get_buf_size_c4_t )(NppiSize oSizeROI, int nLevels[], size_t * hpBufferSize);
287
+ #else
284
288
typedef NppStatus (*get_buf_size_c1_t )(NppiSize oSizeROI, int nLevels, int * hpBufferSize);
285
289
typedef NppStatus (*get_buf_size_c4_t )(NppiSize oSizeROI, int nLevels[], int * hpBufferSize);
290
+ #endif
286
291
287
292
template <int SDEPTH> struct NppHistogramEvenFuncC1
288
293
{
@@ -315,7 +320,11 @@ namespace
315
320
sz.width = src.cols ;
316
321
sz.height = src.rows ;
317
322
323
+ #if (CUDA_VERSION >= 12040)
324
+ size_t buf_size;
325
+ #else
318
326
int buf_size;
327
+ #endif
319
328
get_buf_size (sz, levels, &buf_size);
320
329
321
330
BufferPool pool (stream);
@@ -349,7 +358,11 @@ namespace
349
358
350
359
Npp32s* pHist[] = {hist[0 ].ptr <Npp32s>(), hist[1 ].ptr <Npp32s>(), hist[2 ].ptr <Npp32s>(), hist[3 ].ptr <Npp32s>()};
351
360
361
+ #if (CUDA_VERSION >= 12040)
362
+ size_t buf_size;
363
+ #else
352
364
int buf_size;
365
+ #endif
353
366
get_buf_size (sz, levels, &buf_size);
354
367
355
368
BufferPool pool (stream);
@@ -419,7 +432,11 @@ namespace
419
432
sz.width = src.cols ;
420
433
sz.height = src.rows ;
421
434
435
+ #if (CUDA_VERSION >= 12040)
436
+ size_t buf_size;
437
+ #else
422
438
int buf_size;
439
+ #endif
423
440
get_buf_size (sz, levels.cols , &buf_size);
424
441
425
442
BufferPool pool (stream);
@@ -460,7 +477,11 @@ namespace
460
477
sz.width = src.cols ;
461
478
sz.height = src.rows ;
462
479
480
+ #if (CUDA_VERSION >= 12040)
481
+ size_t buf_size;
482
+ #else
463
483
int buf_size;
484
+ #endif
464
485
get_buf_size (sz, nLevels, &buf_size);
465
486
466
487
BufferPool pool (stream);
0 commit comments