Clover Git
OpenCL 1.1 software implementation
|
Device-specific memory buffer. More...
#include <deviceinterface.h>
Public Member Functions | |
DeviceBuffer () | |
virtual | ~DeviceBuffer () |
virtual bool | allocate ()=0 |
Allocate the buffer on the device. | |
virtual DeviceInterface * | device () const =0 |
Coal::DeviceInterface of this buffer | |
virtual bool | allocated () const =0 |
Allocation status. | |
virtual void * | nativeGlobalPointer () const =0 |
Host-accessible memory pointer. |
Device-specific memory buffer.
This class is the backing-store used on a device for a Coal::MemObject
. It is created by Coal::DeviceInterface::createDeviceBuffer()
.
Definition at line 170 of file deviceinterface.h.
Coal::DeviceBuffer::DeviceBuffer | ( | ) | [inline] |
Definition at line 173 of file deviceinterface.h.
virtual Coal::DeviceBuffer::~DeviceBuffer | ( | ) | [inline, virtual] |
Definition at line 174 of file deviceinterface.h.
virtual bool Coal::DeviceBuffer::allocate | ( | ) | [pure virtual] |
Allocate the buffer on the device.
Implemented in Coal::CPUBuffer.
Referenced by Coal::MemObject::allocate().
virtual bool Coal::DeviceBuffer::allocated | ( | ) | const [pure virtual] |
Allocation status.
Implemented in Coal::CPUBuffer.
Referenced by Coal::MemObject::allocate().
virtual DeviceInterface* Coal::DeviceBuffer::device | ( | ) | const [pure virtual] |
Coal::DeviceInterface
of this buffer
Coal::DeviceInterface
Implemented in Coal::CPUBuffer.
virtual void* Coal::DeviceBuffer::nativeGlobalPointer | ( | ) | const [pure virtual] |
Host-accessible memory pointer.
This function returns what is passed as arguments to native kernels (clEnqueueNativeKernel()
, Coal::NativeKernelEvent
) in place of Coal::MemObject
pointers.
For Coal::CPUDevice
, it's simply a pointer in RAM, but hardware-accelerated devices may need to do some copying or mapping.
Implemented in Coal::CPUBuffer.
Referenced by Coal::NativeKernelEvent::NativeKernelEvent().