NPPImage_*.Sum() expects a CudaDeviceVariable as parameter. However the following code does not work:
var nppImage = SomeCodeLoadsAnImage();
var deviceSum = new CudaDeviceVariable<long>(1);
nppImage.Sum(deviceSum);
var sumData = new long[1];
deviceSum.CopyToHost(sumData);
var sum = sumData[0];
NPPImage_*.Sum()
expects aCudaDeviceVariable
as parameter. However the following code does not work:An exception will be thrown in the
Sum()
call:CUDA version 10.0.130 managedCuda version 10.0.31 (from NUGET)