Library/ManagedCuda/NPP/NPPImage_16sC4.cs
/// <summary>
/// Histogram with evenly distributed bins. Buffer is internally allocated and freed.
/// </summary>
/// <param name="histogram">Allocated device memory of size nLevels (4 Variables)</param>
/// <param name="nLowerLevel">Lower boundary of lowest level bin. E.g. 0 for [0..255]. Size = 4</param>
/// <param name="nUpperLevel">Upper boundary of highest level bin. E.g. 256 for [0..255]. Size = 4</param>
Histogram with evenly distributed bins. Buffer is internally allocated and freed.
Histogram with evenly distributed bins . Buffer is internally allocated and freed .
public void HistogramEven(CudaDeviceVariable<int>[] histogram, int[] nLowerLevel, int[] nUpperLevel)
		{
			int[] size = new int[] { histogram[0].Size + 1, histogram[1].Size + 1, histogram[2].Size + 1, histogram[3].Size + 1 };
			CUdeviceptr[] devPtrs = new CUdeviceptr[] { histogram[0].DevicePointer, histogram[1].DevicePointer, histogram[2].DevicePointer, histogram[3].DevicePointer };
			int bufferSize = HistogramEvenGetBufferSize(size);
			CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);
			status = NPPNativeMethods.NPPi.Histogram.nppiHistogramEven_16s_C4R(_devPtrRoi, _pitch, _sizeRoi, devPtrs, size, nLowerLevel, nUpperLevel, buffer.DevicePointer);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiHistogramEven_16s_C4R", status));
			buffer.Dispose();
			NPPException.CheckNppStatus(status, this);
		}
public void HistogramEven ( CudaDeviceVariable < int > [ ] histogram , int [ ] nLowerLevel , int [ ] nUpperLevel ) { int [ ] size = new int [ ] { histogram [ 0 ] . Size + 1 , histogram [ 1 ] . Size + 1 , histogram [ 2 ] . Size + 1 , histogram [ 3 ] . Size + 1 } ; CUdeviceptr [ ] devPtrs = new CUdeviceptr [ ] { histogram [ 0 ] . DevicePointer , histogram [ 1 ] . DevicePointer , histogram [ 2 ] . DevicePointer , histogram [ 3 ] . DevicePointer } ; int bufferSize = HistogramEvenGetBufferSize ( size ) ; CudaDeviceVariable < byte > buffer = new CudaDeviceVariable < byte > ( bufferSize ) ; status = NPPNativeMethods . NPPi . Histogram . nppiHistogramEven_16s_C4R ( _devPtrRoi , _pitch , _sizeRoi , devPtrs , size , nLowerLevel , nUpperLevel , buffer . DevicePointer ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , status ) ) ; buffer . Dispose ( ) ; NPPException . CheckNppStatus ( status , this ) ; }
Histogram with evenly distributed bins.
Histogram with evenly distributed bins .
histogram
CudaDeviceVariable<int>[]
Allocated device memory of size nLevels (4 Variables)
Allocated device memory of size nLevels ( 4 Variables )
nLowerLevel
int[]
Lower boundary of lowest level bin. E.g.
Lower boundary of lowest level bin . E . g .
nUpperLevel
int[]
Upper boundary of highest level bin. E.g.
Upper boundary of highest level bin . E . g .