33 #ifdef ICL_HAVE_OPENCL 79 m_dimensions[0] = x; m_dimensions[1] = y; m_dimensions[2] = z;
95 this->m_type = other.
m_type;
97 this->m_size = other.
m_size;
107 this->m_type = other.
m_type;
109 this->m_size = other.
m_size;
122 if (m_type != Buffer)
124 return reinterpret_cast<CLBuffer*>(
this);
132 if (m_type != Image2D)
134 return reinterpret_cast<CLImage2D*>(
this);
CLMemory(MemoryType const type=Invalid)
CLMemory Default constructor. Only inherit classes can use this constructor.
Definition: CLMemory.h:68
undocument this line if you encounter any issues!
Definition: Any.h:37
CLImage2D * asCLImage2D()
asCLImage2D Casting function to cast to CLImage2D pointer (reinterpret_cast)
Definition: CLMemory.h:131
#define ICLUtils_API
this macros are important for creating dll's
Definition: CompatMacros.h:171
MemoryType
Memorys type available.
Definition: CLMemory.h:56
CLMemory(CLMemory const &other)
CLMemory default copy constructor.
Definition: CLMemory.h:94
CLBuffer * asCLBuffer()
asCLBuffer Casting function to cast to CLBuffer pointer (reinterpret_cast)
Definition: CLMemory.h:121
MemoryType m_type
The memory type of this instance (CLBuffer or CLImage2D)
Definition: CLMemory.h:86
int64_t icl64s
64bit signed integer type for the ICL
Definition: BasicTypes.h:94
Ipp32s icl32s
32bit signed integer type for the ICL
Definition: BasicTypes.h:58
SmartPtr< CLMemory > Ptr
smart pointer to this class type
Definition: CLMemory.h:53
Wrapper for an OpenCL Buffer.
Definition: CLBuffer.h:52
CLMemory & operator=(CLMemory const &other)
operator = default assignment operator
Definition: CLMemory.h:106
std::vector< icl32s > m_dimensions
size of each dimension x,y,z
Definition: CLMemory.h:71
const std::vector< icl32s > getDimensions() const
returns the dimensions (3Dim-std::vector for x,y,z dimensions)
Definition: CLMemory.h:138
Wrapper for an OpenCL Image2D.
Definition: CLImage2D.h:57
Class for an OpenCL Exception associated with buffers.
Definition: CLException.h:63
icl64s m_size
size in total x*y*z
Definition: CLMemory.h:73
The CLMemory class is a base class for CLBuffer and CLImage2D.
Definition: CLMemory.h:48
icl32s m_byte_depth
byte depth of the data type used (e.g. float32 = 4byte)
Definition: CLMemory.h:75
const icl32s getByteDepth() const
returns the bytedepth of the used data type (e.g. float32 = 4byte)
Definition: CLMemory.h:142
const icl64s getSize() const
returns total size of the memory (x*y*z)
Definition: CLMemory.h:140
Specialization of the SmartPtrBase class for Pointers.
Definition: SmartPtr.h:75
virtual ~CLMemory()
Destructor.
Definition: CLMemory.h:115
void setDimensions(icl32s const &x, icl32s const &y, icl32s const &z)
sets the dimensions x,y,z and total size
Definition: CLMemory.h:78
Definition: CLMemory.h:58
Definition: CLMemory.h:57