public void Max(CudaDeviceVariable<byte> max)
{
int bufferSize = MaxGetBufferHostSize();
CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);
status = NPPNativeMethods.NPPi.Max.nppiMax_8u_C3R(_devPtrRoi, _pitch, _sizeRoi, buffer.DevicePointer, max.DevicePointer);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMax_8u_C3R", status));
buffer.Dispose();
NPPException.CheckNppStatus(status, this);
}