Clover Git
OpenCL 1.1 software implementation
|
Mapping a buffer. More...
#include <events.h>
Public Member Functions | |
MapBufferEvent (CommandQueue *parent, MemObject *buffer, size_t offset, size_t cb, cl_map_flags map_flags, cl_uint num_events_in_wait_list, const Event **event_wait_list, cl_int *errcode_ret) | |
Type | type () const |
Say the event is a Coal::Event::MapBuffer one. | |
size_t | offset () const |
Offset in the buffer at which the mapping begins, in bytes. | |
size_t | cb () const |
Number of bytes to map. | |
cl_map_flags | flags () const |
Flags of the mapping. | |
void * | ptr () const |
Pointer at which the data has been mapped. | |
void | setPtr (void *ptr) |
Set the memory location at which the data has been mapped. | |
Private Attributes | |
size_t | p_offset |
size_t | p_cb |
cl_map_flags | p_map_flags |
void * | p_ptr |
MapBufferEvent::MapBufferEvent | ( | CommandQueue * | parent, |
MemObject * | buffer, | ||
size_t | offset, | ||
size_t | cb, | ||
cl_map_flags | map_flags, | ||
cl_uint | num_events_in_wait_list, | ||
const Event ** | event_wait_list, | ||
cl_int * | errcode_ret | ||
) |
Definition at line 207 of file events.cpp.
References Coal::MemObject::size().
size_t MapBufferEvent::cb | ( | ) | const |
cl_map_flags MapBufferEvent::flags | ( | ) | const |
size_t MapBufferEvent::offset | ( | ) | const |
Offset in the buffer at which the mapping begins, in bytes.
Definition at line 240 of file events.cpp.
References p_offset.
Referenced by Coal::CPUDevice::initEventDeviceData().
void * MapBufferEvent::ptr | ( | ) | const |
Pointer at which the data has been mapped.
Definition at line 255 of file events.cpp.
References p_ptr.
Referenced by clEnqueueMapBuffer(), and setPtr().
void MapBufferEvent::setPtr | ( | void * | ptr | ) |
Set the memory location at which the data has been mapped.
This function is called by the device when it has successfully mapped the buffer. It must be called inside Coal::DeviceInterface::initEventDeviceData()
.
ptr | the address at which the buffer has been mapped |
Definition at line 260 of file events.cpp.
Referenced by Coal::CPUDevice::initEventDeviceData().
Event::Type MapBufferEvent::type | ( | ) | const [virtual] |
Say the event is a Coal::Event::MapBuffer
one.
Implements Coal::Event.
Definition at line 235 of file events.cpp.
References Coal::Event::MapBuffer.
size_t Coal::MapBufferEvent::p_cb [private] |
cl_map_flags Coal::MapBufferEvent::p_map_flags [private] |
size_t Coal::MapBufferEvent::p_offset [private] |
void* Coal::MapBufferEvent::p_ptr [private] |