Clover Git
OpenCL 1.1 software implementation
Public Member Functions | Private Attributes

Coal::MapBufferEvent Class Reference

Mapping a buffer. More...

#include <events.h>

Inheritance diagram for Coal::MapBufferEvent:
Collaboration diagram for Coal::MapBufferEvent:

List of all members.

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

Detailed Description

Mapping a buffer.

Definition at line 146 of file events.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

size_t MapBufferEvent::cb ( ) const

Number of bytes to map.

Definition at line 245 of file events.cpp.

References p_cb.

cl_map_flags MapBufferEvent::flags ( ) const

Flags of the mapping.

Definition at line 250 of file events.cpp.

References p_map_flags.

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().

Parameters:
ptrthe address at which the buffer has been mapped

Definition at line 260 of file events.cpp.

References p_ptr, and ptr().

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.


Member Data Documentation

size_t Coal::MapBufferEvent::p_cb [private]

Definition at line 177 of file events.h.

Referenced by cb().

cl_map_flags Coal::MapBufferEvent::p_map_flags [private]

Definition at line 178 of file events.h.

Referenced by flags().

Definition at line 177 of file events.h.

Referenced by offset().

void* Coal::MapBufferEvent::p_ptr [private]

Definition at line 179 of file events.h.

Referenced by ptr(), and setPtr().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines