Library/ManagedCuda/NPP/NPPImage_8uC1.cs
/// <summary>
/// image mean with 64-bit double precision result. Buffer is internally allocated and freed.
/// </summary>
/// <param name="mean">Allocated device memory with size of at least 1 * sizeof(double)</param>
/// <param name="mask">If the mask is filled with zeros, then all the returned values are zeros, i.e., pMinIndex = {0, 0}, pMaxIndex = {0, 0}, pMinValue = 0, pMaxValue = 0.</param>
image mean with 64-bit double precision result. Buffer is internally allocated and freed.
image mean with 64 - bit double precision result . Buffer is internally allocated and freed .
public void Mean(CudaDeviceVariable<double> mean, NPPImage_8uC1 mask)
		{
			int bufferSize = MeanMaskedGetBufferHostSize();
			CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);
			status = NPPNativeMethods.NPPi.MeanNew.nppiMean_8u_C1MR(_devPtrRoi, _pitch, mask.DevicePointerRoi, mask.Pitch, _sizeRoi, buffer.DevicePointer, mean.DevicePointer);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMean_8u_C1MR", status));
			buffer.Dispose();
			NPPException.CheckNppStatus(status, this);
		}
public void Mean ( CudaDeviceVariable < double > mean , NPPImage_8uC1 mask ) { int bufferSize = MeanMaskedGetBufferHostSize ( ) ; CudaDeviceVariable < byte > buffer = new CudaDeviceVariable < byte > ( bufferSize ) ; status = NPPNativeMethods . NPPi . MeanNew . nppiMean_8u_C1MR ( _devPtrRoi , _pitch , mask . DevicePointerRoi , mask . Pitch , _sizeRoi , buffer . DevicePointer , mean . DevicePointer ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , status ) ) ; buffer . Dispose ( ) ; NPPException . CheckNppStatus ( status , this ) ; }
image mean with 64-bit double precision result.
image mean with 64 - bit double precision result .
mean
CudaDeviceVariable<double>
Allocated device memory with size of at least 1 * sizeof(double)
Allocated device memory with size of at least 1 * sizeof ( double )
mask
NPPImage_8uC1
If the mask is filled with zeros, then all the returned values are zeros, i.e., pMinIndex = {0, 0}, pMaxIndex = {0, 0}, pMinValue = 0, pMaxValue = 0.
If the mask is filled with zeros then all the returned values are zeros i . e . pMinIndex = { 0 0 } pMaxIndex = { 0 0 } pMinValue = 0 pMaxValue = 0 .