Newton Dynamics  4.00
dOpenclBuffer< T > Class Template Reference
Inheritance diagram for dOpenclBuffer< T >:
ndArray< T > ndClassAlloc

Public Member Functions

 dOpenclBuffer (cl_mem_flags flags)
 
void Cleanup ()
 
void SyncSize (cl_context context, ndInt32 size)
 
void ReadData (cl_command_queue commandQueue)
 
void WriteData (cl_command_queue commandQueue)
 
- Public Member Functions inherited from ndArray< T >
 ndArray ()
 constructor, set count and capacity to zero, not memory is allocated.
 
 ndArray (ndInt32 count)
 constructor, set count and capacity, allocated space for count elements.
 
 ndArray (const ndArray &source)
 copy constructor, allocate and copy only m_size elements from source.
 
 ~ndArray ()
 deallocate all memory, dos not call destructor on any of th elements.
 
ndInt32 GetCount () const
 return the size of the array.
 
void SetCount (ndInt32 count)
 Set a new size. More...
 
void Resize (ndInt32 count)
 Set a new size. More...
 
ndInt32 GetCapacity () const
 return the capacity of the array.
 
T & operator[] (ndInt32 i)
 Get the i element for the array. More...
 
const T & operator[] (ndInt32 i) const
 Get the i element for the array. More...
 
void Swap (ndArray &other)
 Interchange all the information with other. More...
 
void PushBack (const T &element)
 Add element to the end of the buffer. More...
 
- Public Member Functions inherited from ndClassAlloc
 ndClassAlloc ()
 Empty default constructor.
 
 ~ndClassAlloc ()
 Empty.
 

Public Attributes

cl_mem m_gpuBuffer
 
cl_mem_flags m_flags
 

Additional Inherited Members

- Static Public Member Functions inherited from ndClassAlloc
D_OPERATOR_NEW_AND_DELETE static D_CORE_API void * Malloc (size_t size)
 Generic allocation for any function subclass from ndClassAlloc.
 
static D_CORE_API void Free (void *const ptr)
 Generic destruction for any function subclass from ndClassAlloc.
 
- Protected Attributes inherited from ndArray< T >
T * m_array
 
ndInt32 m_size
 
ndInt32 m_capacity