Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
iu::LinearMemory< Ndim > Class Template Reference

Base class for linear memory classes. More...

#include <linearmemory.h>

Inheritance diagram for iu::LinearMemory< Ndim >:
iu::LinearDeviceMemory< PixelType, Ndim > iu::LinearHostMemory< PixelType, Ndim > iu::LinearDeviceMemory< PixelType, 1 > iu::LinearHostMemory< PixelType, 1 > iu::TensorGpu< PixelType > iu::TensorCpu< PixelType >

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)
 

Detailed Description

template<unsigned int Ndim = 1>
class iu::LinearMemory< Ndim >

Base class for linear memory classes.

Constructor & Destructor Documentation

template<unsigned int Ndim = 1>
iu::LinearMemory< Ndim >::LinearMemory ( )
inline

Constructor.

template<unsigned int Ndim = 1>
iu::LinearMemory< Ndim >::LinearMemory ( const Size< Ndim > &  size)
inline

Special constructor.

Parameters
sizesize of the linear memory
template<unsigned int Ndim = 1>
iu::LinearMemory< Ndim >::LinearMemory ( const unsigned int &  numel)
inline

Special constructor.

Parameters
numelnumber of elements of linear memory. Size[0] equals the number of elements, the other dimensions are 1.
template<unsigned int Ndim = 1>
virtual iu::LinearMemory< Ndim >::~LinearMemory ( )
inlinevirtual

Destructor.

Member Function Documentation

template<unsigned int Ndim = 1>
virtual unsigned int iu::LinearMemory< Ndim >::bitDepth ( ) const
inlinevirtual
template<unsigned int Ndim = 1>
virtual size_t iu::LinearMemory< Ndim >::bytes ( ) const
inlinevirtual
template<unsigned int Ndim = 1>
void iu::LinearMemory< Ndim >::computeStride ( )
inlineprotected

Compute the strides of the memory

template<unsigned int Ndim = 1>
unsigned int iu::LinearMemory< Ndim >::numel ( ) const
inline

Returns the number of elements saved in the buffer. (numel of buffer)

template<unsigned int Ndim = 1>
virtual bool iu::LinearMemory< Ndim >::onDevice ( ) const
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 >.

template<unsigned int Ndim = 1>
bool iu::LinearMemory< Ndim >::sameType ( const LinearMemory< Ndim > &  from)
inline

Compares the LinearMemory type to a target LinearMemory.

Parameters
fromTarget LinearMemory.
Returns
Returns true if target class is of the same type (using RTTI).
template<unsigned int Ndim = 1>
Size<Ndim> iu::LinearMemory< Ndim >::size ( ) const
inline

Returns the number of elements saved in the buffer. (numel of buffer) Returns size of the linear memory

template<unsigned int Ndim = 1>
Size<Ndim> iu::LinearMemory< Ndim >::stride ( ) const
inline

Returns size of the linear memory

Friends And Related Function Documentation

template<unsigned int Ndim = 1>
std::ostream& operator<< ( std::ostream &  out,
LinearMemory< Ndim > const &  linmem 
)
friend

Operator<< overloading. Output of LinearMemory class.

Field Documentation

template<unsigned int Ndim = 1>
Size<Ndim> iu::LinearMemory< Ndim >::size_
protected

size of the memory.


The documentation for this class was generated from the following file: