Raytrix Light Field SDK  4.0
Logo
Public Member Functions | List of all members
Rx::LFR::Net::ICudaDataImages Class Reference

Detailed Description

A CUDA data images.

Inherits NativeExternWrapper< Rx::LFR::ICudaDataImages >.

Public Member Functions

 ICudaDataImages (Rx::LFR::ICudaDataImages *pxNative)
 Constructor. More...
 
 ~ICudaDataImages ()
 Destructor. More...
 
virtual void Download (EImage eImgID, Rx::Net::Image^ xImg)
 Downloads the image with the given image ID. More...
 
virtual void Free (EImage eImgID)
 Frees memory used by image defined by eImgID. This invalidates the image. More...
 
virtual void FreeAll ()
 Frees the memory used by all images. This invalidates all images. More...
 
virtual size_t GetDevicePointerPitch (EImage eImgID)
 Gets device pointer pitch, which is the width in bytes of the allocation. Given a row and column of an array element of type T, the address is computed as: More...
 
virtual System::IntPtr GetImageDevicePointer (EImage eImgID)
 Gets the CUDA device pointer to the data of the image defined by the given ID. More...
 
virtual Rx::Net::ImageFormatGetImageFormat (EImage eImgID)
 Gets the image format of the image defined by the given ID. More...
 
virtual bool IsValid (EImage eImgID)
 Query if the image with the given image ID is valid. More...
 
virtual void Upload (EImage eImgID, Rx::Net::Image^ xImg)
 Uploads the image with the given image ID. More...
 

Constructor & Destructor Documentation

Rx::LFR::Net::ICudaDataImages::ICudaDataImages ( Rx::LFR::ICudaDataImages pxNative)
inline

Constructor.

Parameters
pxNative[in,out] If non-null, the pointer to the native representation.
Rx::LFR::Net::ICudaDataImages::~ICudaDataImages ( )
inline

Destructor.

Member Function Documentation

virtual void Rx::LFR::Net::ICudaDataImages::Download ( EImage  eImgID,
Rx::Net::Image xImg 
)
inlinevirtual

Downloads the image with the given image ID.

Parameters
eImgIDThe image ID.
xImg[in,out] If non-null, the image.
virtual void Rx::LFR::Net::ICudaDataImages::Free ( EImage  eImgID)
inlinevirtual

Frees memory used by image defined by eImgID. This invalidates the image.

Parameters
eImgIDThe image ID.
virtual void Rx::LFR::Net::ICudaDataImages::FreeAll ( )
inlinevirtual

Frees the memory used by all images. This invalidates all images.

virtual size_t Rx::LFR::Net::ICudaDataImages::GetDevicePointerPitch ( EImage  eImgID)
inlinevirtual

Gets device pointer pitch, which is the width in bytes of the allocation. Given a row and column of an array element of type T, the address is computed as:

T* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column;

Parameters
eImgIDThe image ID.
Returns
The device pointer pitch.
// Host code:
// Assuming the image in this example is of type luminance, float (TPixel_L_f).
char* pcBaseAdress = (char*) GetImageDevicePointer(EImage::DepthRay);
// CUDA code:
// Get the pointer of the pixel on the CUDA device, at row 10 and column 42.
Rx::TPixel_L_f* tPixel = (((Rx::TPixel_L_f*) (pcBaseAdress + 10 * nPitch)) + 42);
virtual System::IntPtr Rx::LFR::Net::ICudaDataImages::GetImageDevicePointer ( EImage  eImgID)
inlinevirtual

Gets the CUDA device pointer to the data of the image defined by the given ID.

The pointer maps to the memory on a CUDA device and cannot be used on the host.

Parameters
eImgIDThe image ID.
Returns
The image device pointer.
virtual Rx::Net::ImageFormat ^ Rx::LFR::Net::ICudaDataImages::GetImageFormat ( EImage  eImgID)
inlinevirtual

Gets the image format of the image defined by the given ID.

Parameters
eImgIDThe image ID.
Returns
The image format.
virtual bool Rx::LFR::Net::ICudaDataImages::IsValid ( EImage  eImgID)
inlinevirtual

Query if the image with the given image ID is valid.

Parameters
eImgIDThe image ID.
Returns
True if valid, false if not.
virtual void Rx::LFR::Net::ICudaDataImages::Upload ( EImage  eImgID,
Rx::Net::Image xImg 
)
inlinevirtual

Uploads the image with the given image ID.

Parameters
eImgIDThe image ID.
xImg[in,out] If non-null, the image.