ManagedCuda.NPP.NPPImage_8uC3.NPPImage_8uC3 C# (CSharp) Method

NPPImage_8uC3() public method

Allocates new memory on device using NPP-Api.
public NPPImage_8uC3 ( int nWidthPixels, int nHeightPixels ) : System
nWidthPixels int Image width in pixels
nHeightPixels int Image height in pixels
return System
        public NPPImage_8uC3(int nWidthPixels, int nHeightPixels)
        {
            _sizeOriginal.width = nWidthPixels;
            _sizeOriginal.height = nHeightPixels;
            _sizeRoi.width = nWidthPixels;
            _sizeRoi.height = nHeightPixels;
            _channels = 3;
            _isOwner = true;
            _typeSize = sizeof(byte);

            _devPtr = NPPNativeMethods.NPPi.MemAlloc.nppiMalloc_8u_C3(nWidthPixels, nHeightPixels, ref _pitch);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}, Pitch is: {3}, Number of color channels: {4}", DateTime.Now, "nppiMalloc_8u_C3", res, _pitch, _channels));

            if (_devPtr.Pointer == 0)
            {
                throw new NPPException("Device allocation error", null);
            }
            _devPtrRoi = _devPtr;
        }

Same methods

NPPImage_8uC3::NPPImage_8uC3 ( CUdeviceptr devPtr, NppiSize size, int pitch ) : System
NPPImage_8uC3::NPPImage_8uC3 ( CUdeviceptr devPtr, NppiSize size, int pitch, bool isOwner ) : System
NPPImage_8uC3::NPPImage_8uC3 ( CUdeviceptr devPtr, int width, int height, int pitch ) : System
NPPImage_8uC3::NPPImage_8uC3 ( CUdeviceptr devPtr, int width, int height, int pitch, bool isOwner ) : System
NPPImage_8uC3::NPPImage_8uC3 ( NPPImageBase image ) : System
NPPImage_8uC3::NPPImage_8uC3 ( NppiSize size ) : System
NPPImage_8uC3