Image Component Library (ICL)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
icl::utils::CLMemory Class Reference

The CLMemory class is a base class for CLBuffer and CLImage2D. More...

#include <CLMemory.h>

Inheritance diagram for icl::utils::CLMemory:
icl::utils::CLBuffer icl::utils::CLImage2D

Public Types

enum  MemoryType { Buffer, Image2D, Invalid }
 Memorys type available. More...
 
typedef SmartPtr< CLMemoryPtr
 smart pointer to this class type More...
 

Public Member Functions

 CLMemory (CLMemory const &other)
 CLMemory default copy constructor. More...
 
CLMemoryoperator= (CLMemory const &other)
 operator = default assignment operator More...
 
virtual ~CLMemory ()
 Destructor. More...
 
CLBufferasCLBuffer ()
 asCLBuffer Casting function to cast to CLBuffer pointer (reinterpret_cast) More...
 
CLImage2DasCLImage2D ()
 asCLImage2D Casting function to cast to CLImage2D pointer (reinterpret_cast) More...
 
const std::vector< icl32sgetDimensions () const
 returns the dimensions (3Dim-std::vector for x,y,z dimensions) More...
 
const icl64s getSize () const
 returns total size of the memory (x*y*z) More...
 
const icl32s getByteDepth () const
 returns the bytedepth of the used data type (e.g. float32 = 4byte) More...
 

Protected Member Functions

 CLMemory (MemoryType const type=Invalid)
 CLMemory Default constructor. Only inherit classes can use this constructor. More...
 
void setDimensions (icl32s const &x, icl32s const &y, icl32s const &z)
 sets the dimensions x,y,z and total size More...
 

Protected Attributes

std::vector< icl32sm_dimensions
 size of each dimension x,y,z More...
 
icl64s m_size
 size in total x*y*z More...
 
icl32s m_byte_depth
 byte depth of the data type used (e.g. float32 = 4byte) More...
 

Private Attributes

MemoryType m_type
 The memory type of this instance (CLBuffer or CLImage2D) More...
 

Detailed Description

The CLMemory class is a base class for CLBuffer and CLImage2D.

Member Typedef Documentation

◆ Ptr

smart pointer to this class type

Member Enumeration Documentation

◆ MemoryType

Memorys type available.

Enumerator
Buffer 
Image2D 
Invalid 

Constructor & Destructor Documentation

◆ CLMemory() [1/2]

icl::utils::CLMemory::CLMemory ( MemoryType const  type = Invalid)
inlineprotected

CLMemory Default constructor. Only inherit classes can use this constructor.

Parameters
type

◆ CLMemory() [2/2]

icl::utils::CLMemory::CLMemory ( CLMemory const &  other)
inline

CLMemory default copy constructor.

Parameters
otherCLMemory instance to copy from

◆ ~CLMemory()

virtual icl::utils::CLMemory::~CLMemory ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ asCLBuffer()

CLBuffer* icl::utils::CLMemory::asCLBuffer ( )
inline

asCLBuffer Casting function to cast to CLBuffer pointer (reinterpret_cast)

Returns
Casted pointer to CLBuffer

◆ asCLImage2D()

CLImage2D* icl::utils::CLMemory::asCLImage2D ( )
inline

asCLImage2D Casting function to cast to CLImage2D pointer (reinterpret_cast)

Returns
Casted pointer to CLImage2D

◆ getByteDepth()

const icl32s icl::utils::CLMemory::getByteDepth ( ) const
inline

returns the bytedepth of the used data type (e.g. float32 = 4byte)

◆ getDimensions()

const std::vector<icl32s> icl::utils::CLMemory::getDimensions ( ) const
inline

returns the dimensions (3Dim-std::vector for x,y,z dimensions)

◆ getSize()

const icl64s icl::utils::CLMemory::getSize ( ) const
inline

returns total size of the memory (x*y*z)

◆ operator=()

CLMemory& icl::utils::CLMemory::operator= ( CLMemory const &  other)
inline

operator = default assignment operator

Parameters
otherCLMemory instance to copy from
Returns
This CLMemory instance

◆ setDimensions()

void icl::utils::CLMemory::setDimensions ( icl32s const &  x,
icl32s const &  y,
icl32s const &  z 
)
inlineprotected

sets the dimensions x,y,z and total size

Member Data Documentation

◆ m_byte_depth

icl32s icl::utils::CLMemory::m_byte_depth
protected

byte depth of the data type used (e.g. float32 = 4byte)

◆ m_dimensions

std::vector<icl32s> icl::utils::CLMemory::m_dimensions
protected

size of each dimension x,y,z

◆ m_size

icl64s icl::utils::CLMemory::m_size
protected

size in total x*y*z

◆ m_type

MemoryType icl::utils::CLMemory::m_type
private

The memory type of this instance (CLBuffer or CLImage2D)


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