Image Utilities (IU)
|
Linear device memory class. More...
#include <lineardevicememory.h>
Data Structures | |
struct | KernelData |
Struct pointer KernelData that can be used in CUDA kernels. More... | |
Public Types | |
typedef PixelType | pixel_type |
Public Member Functions | |
LinearDeviceMemory () | |
virtual | ~LinearDeviceMemory () |
LinearDeviceMemory (const Size< Ndim > &size) | |
LinearDeviceMemory (const unsigned int &numel) | |
LinearDeviceMemory (PixelType *device_data, const Size< Ndim > &size, bool ext_data_pointer=false) | |
LinearDeviceMemory (PixelType *device_data, const unsigned int &numel, bool ext_data_pointer=false) | |
PixelType * | data (unsigned int offset=0) |
const PixelType * | data (unsigned int offset=0) const |
thrust::device_ptr< PixelType > | begin (void) |
thrust::device_ptr< PixelType > | end (void) |
virtual size_t | bytes () const |
virtual unsigned int | bitDepth () const |
virtual bool | onDevice () const |
ndarray_ref< PixelType, Ndim > | ref () const |
LinearDeviceMemory (const ndarray_ref< PixelType, Ndim > &x) | |
template<> | |
LinearDeviceMemory (const ndarray_ref< float, 1 > &x) | |
Public Member Functions inherited from iu::LinearMemory< Ndim > | |
LinearMemory () | |
LinearMemory (const Size< Ndim > &size) | |
LinearMemory (const unsigned int &numel) | |
bool | sameType (const LinearMemory &from) |
virtual | ~LinearMemory () |
unsigned int | numel () const |
Size< Ndim > | size () const |
Size< Ndim > | stride () const |
Static Public Attributes | |
static const unsigned int | ndim = Ndim |
Additional Inherited Members | |
Protected Member Functions inherited from iu::LinearMemory< Ndim > | |
void | computeStride () |
Protected Attributes inherited from iu::LinearMemory< Ndim > | |
Size< Ndim > | size_ |
Linear device memory class.
typedef PixelType iu::LinearDeviceMemory< PixelType, Ndim >::pixel_type |
Define the current pixel type.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inline |
Special constructor.
size | size of linear memory |
|
inline |
Special constructor.
numel | Number of elements of linear memory |
|
inline |
Special constructor.
device_data | Device data pointer |
size | size of the memory |
ext_data_pointer | Use external data pointer as internal data pointer |
|
inline |
Special constructor.
device_data | Device data pointer |
numel | Number of elements of the memory |
ext_data_pointer | Use external data pointer as internal data pointer |
iu::LinearDeviceMemory< PixelType, Ndim >::LinearDeviceMemory | ( | const ndarray_ref< PixelType, Ndim > & | x | ) |
construct from ndarray_ref – include ndarray/ndarray_iu.h
iu::LinearDeviceMemory< float, 1 >::LinearDeviceMemory | ( | const ndarray_ref< float, 1 > & | x | ) |
Template specialization. Construct from ndarray_ref.
|
inline |
Returns a thrust device pointer that can be used in custom operators
|
inlinevirtual |
Returns the bit depth of the data pointer.
Reimplemented from iu::LinearMemory< Ndim >.
|
inlinevirtual |
Returns the total amount of bytes saved in the data buffer.
Reimplemented from iu::LinearMemory< Ndim >.
|
inline |
Returns a pointer to the device buffer. The pointer can be offset to position offset.
offset | Offset of the pointer array. |
|
inline |
Returns a const pointer to the device buffer. The pointer can be offset to position offset.
offset | Offset of the pointer array. |
|
inline |
Returns a thrust device pointer that can be used in custom operators
|
inlinevirtual |
Returns flag if the image data resides on the device/GPU (TRUE) or host/GPU (FALSE)
Reimplemented from iu::LinearMemory< Ndim >.
ndarray_ref<PixelType, Ndim> iu::LinearDeviceMemory< PixelType, Ndim >::ref | ( | ) | const |
convert to ndarray_ref – include ndarray/ndarray_iu.h