QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsOpenClUtils::CPLAllocator< T > Struct Template Reference

Tiny smart-pointer-like wrapper around CPLMalloc and CPLFree: this is needed because OpenCL C++ API may throw exceptions. More...

#include <qgsopenclutils.h>

Public Member Functions

 CPLAllocator (unsigned long size)
 ~CPLAllocator ()
T * get ()
T & operator* ()
T & operator[] (const int index)
T * release ()
void reset (T *newData)
void reset (unsigned long size)

Detailed Description

template<typename T>
struct QgsOpenClUtils::CPLAllocator< T >

Tiny smart-pointer-like wrapper around CPLMalloc and CPLFree: this is needed because OpenCL C++ API may throw exceptions.

Definition at line 246 of file qgsopenclutils.h.

Constructor & Destructor Documentation

◆ CPLAllocator()

template<typename T>
QgsOpenClUtils::CPLAllocator< T >::CPLAllocator ( unsigned long size)
inlineexplicit

Definition at line 251 of file qgsopenclutils.h.

◆ ~CPLAllocator()

template<typename T>
QgsOpenClUtils::CPLAllocator< T >::~CPLAllocator ( )
inline

Definition at line 253 of file qgsopenclutils.h.

Member Function Documentation

◆ get()

template<typename T>
T * QgsOpenClUtils::CPLAllocator< T >::get ( )
inline

Definition at line 288 of file qgsopenclutils.h.

◆ operator*()

template<typename T>
T & QgsOpenClUtils::CPLAllocator< T >::operator* ( )
inline

Definition at line 270 of file qgsopenclutils.h.

◆ operator[]()

template<typename T>
T & QgsOpenClUtils::CPLAllocator< T >::operator[] ( const int index)
inline

Definition at line 283 of file qgsopenclutils.h.

◆ release()

template<typename T>
T * QgsOpenClUtils::CPLAllocator< T >::release ( )
inline

Definition at line 276 of file qgsopenclutils.h.

◆ reset() [1/2]

template<typename T>
void QgsOpenClUtils::CPLAllocator< T >::reset ( T * newData)
inline

Definition at line 258 of file qgsopenclutils.h.

◆ reset() [2/2]

template<typename T>
void QgsOpenClUtils::CPLAllocator< T >::reset ( unsigned long size)
inline

Definition at line 265 of file qgsopenclutils.h.


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