Image Utilities (IU)
|
Base class for linear memory classes. More...
#include <linearmemory.h>
Public Member Functions | |
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 |
virtual size_t | bytes () const |
virtual unsigned int | bitDepth () const |
virtual bool | onDevice () const |
Protected Member Functions | |
void | computeStride () |
Protected Attributes | |
Size< Ndim > | size_ |
Friends | |
std::ostream & | operator<< (std::ostream &out, LinearMemory const &linmem) |
Base class for linear memory classes.
|
inline |
Constructor.
|
inline |
Special constructor.
size | size of the linear memory |
|
inline |
Special constructor.
numel | number of elements of linear memory. Size[0] equals the number of elements, the other dimensions are 1. |
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Returns the bit depth of the data pointer.
Reimplemented in iu::LinearDeviceMemory< PixelType, Ndim >, iu::LinearDeviceMemory< PixelType, 1 >, iu::LinearHostMemory< PixelType, Ndim >, and iu::LinearHostMemory< PixelType, 1 >.
|
inlinevirtual |
Returns the total amount of bytes saved in the data buffer.
Reimplemented in iu::LinearDeviceMemory< PixelType, Ndim >, iu::LinearDeviceMemory< PixelType, 1 >, iu::LinearHostMemory< PixelType, Ndim >, and iu::LinearHostMemory< PixelType, 1 >.
|
inlineprotected |
Compute the strides of the memory
|
inline |
Returns the number of elements saved in the buffer. (numel of buffer)
|
inlinevirtual |
Returns flag if the image data resides on the device/GPU (TRUE) or host/GPU (FALSE)
Reimplemented in iu::LinearHostMemory< PixelType, Ndim >, iu::LinearHostMemory< PixelType, 1 >, iu::LinearDeviceMemory< PixelType, Ndim >, and iu::LinearDeviceMemory< PixelType, 1 >.
|
inline |
Compares the LinearMemory type to a target LinearMemory.
from | Target LinearMemory. |
|
inline |
Returns the number of elements saved in the buffer. (numel of buffer) Returns size of the linear memory
|
inline |
Returns size of the linear memory
|
friend |
Operator<< overloading. Output of LinearMemory class.
|
protected |
size of the memory.