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

Coal::MapImageEvent Class Reference

Mapping an image. More...

#include <events.h>

Inheritance diagram for Coal::MapImageEvent:
Collaboration diagram for Coal::MapImageEvent:

List of all members.

Public Member Functions

 MapImageEvent (CommandQueue *parent, Image2D *image, cl_map_flags map_flags, const size_t origin[3], const size_t region[3], 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::MapImage one.
size_t origin (unsigned int index) const
 Origin of the mapping, in pixels, for the given dimension.
size_t region (unsigned int index) const
 Region of the mapping, in pixels, for the given dimension.
cl_map_flags flags () const
 Flags of the mapping.
void * ptr () const
 Pointer at which the data is mapped.
size_t row_pitch () const
 Row pitch of the mapped data.
size_t slice_pitch () const
 Slice pitch of the mapped data.
void setPtr (void *ptr)
 Set the memory location at which the image is mapped.
void setRowPitch (size_t row_pitch)
 Set row pitch.
void setSlicePitch (size_t slice_pitch)
 Set slice pitch.

Private Attributes

cl_map_flags p_map_flags
size_t p_origin [3]
size_t p_region [3]
void * p_ptr
size_t p_slice_pitch
size_t p_row_pitch

Detailed Description

Mapping an image.

Definition at line 185 of file events.h.


Constructor & Destructor Documentation

MapImageEvent::MapImageEvent ( CommandQueue parent,
Image2D image,
cl_map_flags  map_flags,
const size_t  origin[3],
const size_t  region[3],
cl_uint  num_events_in_wait_list,
const Event **  event_wait_list,
cl_int *  errcode_ret 
)

Member Function Documentation

cl_map_flags MapImageEvent::flags ( ) const

Flags of the mapping.

Definition at line 329 of file events.cpp.

References p_map_flags.

size_t MapImageEvent::origin ( unsigned int  index) const

Origin of the mapping, in pixels, for the given dimension.

Parameters:
indexdimension for which the origin is retrieved
Returns:
origin of the mapping for the given dimension

Definition at line 334 of file events.cpp.

References p_origin.

Referenced by Coal::CPUDevice::initEventDeviceData().

void * MapImageEvent::ptr ( ) const

Pointer at which the data is mapped.

Definition at line 354 of file events.cpp.

References p_ptr.

Referenced by clEnqueueMapImage(), and setPtr().

size_t MapImageEvent::region ( unsigned int  index) const

Region of the mapping, in pixels, for the given dimension.

Parameters:
indexdimension for which the region is retrieved
Returns:
region of the mapping for the given dimension

Definition at line 339 of file events.cpp.

References p_region.

size_t MapImageEvent::row_pitch ( ) const

Row pitch of the mapped data.

Definition at line 344 of file events.cpp.

References p_row_pitch.

Referenced by clEnqueueMapImage(), and setRowPitch().

void MapImageEvent::setPtr ( void *  ptr)

Set the memory location at which the image is mapped.

This function must be called by Coal::DeviceInterface::initEventDeviceData(). Row and slice pitches must also be set by this function by calling setRowPitch() and setSlicePitch().

Parameters:
ptrpointer at which the data is available

Definition at line 369 of file events.cpp.

References p_ptr, and ptr().

Referenced by Coal::CPUDevice::initEventDeviceData().

void MapImageEvent::setRowPitch ( size_t  row_pitch)

Set row pitch.

Definition at line 359 of file events.cpp.

References p_row_pitch, and row_pitch().

Referenced by Coal::CPUDevice::initEventDeviceData().

void MapImageEvent::setSlicePitch ( size_t  slice_pitch)

Set slice pitch.

Definition at line 364 of file events.cpp.

References p_slice_pitch, and slice_pitch().

Referenced by Coal::CPUDevice::initEventDeviceData().

size_t MapImageEvent::slice_pitch ( ) const

Slice pitch of the mapped data.

Definition at line 349 of file events.cpp.

References p_slice_pitch.

Referenced by clEnqueueMapImage(), and setSlicePitch().

Event::Type MapImageEvent::type ( ) const [virtual]

Say the event is a Coal::Event::MapImage one.

Implements Coal::Event.

Definition at line 323 of file events.cpp.

References Coal::Event::MapImage.


Member Data Documentation

cl_map_flags Coal::MapImageEvent::p_map_flags [private]

Definition at line 233 of file events.h.

Referenced by flags().

size_t Coal::MapImageEvent::p_origin[3] [private]

Definition at line 234 of file events.h.

Referenced by MapImageEvent(), and origin().

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

Definition at line 235 of file events.h.

Referenced by ptr(), and setPtr().

size_t Coal::MapImageEvent::p_region[3] [private]

Definition at line 234 of file events.h.

Referenced by MapImageEvent(), and region().

Definition at line 236 of file events.h.

Referenced by row_pitch(), and setRowPitch().

Definition at line 236 of file events.h.

Referenced by setSlicePitch(), and slice_pitch().


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