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

Coal::NativeKernelEvent Class Reference

Executing a native function as a kernel. More...

#include <events.h>

Inheritance diagram for Coal::NativeKernelEvent:
Collaboration diagram for Coal::NativeKernelEvent:

List of all members.

Public Member Functions

 NativeKernelEvent (CommandQueue *parent, void(*user_func)(void *), void *args, size_t cb_args, cl_uint num_mem_objects, const MemObject **mem_list, const void **args_mem_loc, cl_uint num_events_in_wait_list, const Event **event_wait_list, cl_int *errcode_ret)
 ~NativeKernelEvent ()
Type type () const
 Say the event is a Coal::Event::NativeKernel one.
void * function () const
 Host function to call.
void * args () const
 Args to give to the host function.

Private Attributes

void * p_user_func
void * p_args

Detailed Description

Executing a native function as a kernel.

This event builds an argument list to give to the native function. It needs for example to replace all occurence of a Coal::MemObject by a pointer to data the host CPU can actually access, using Coal::DeviceBuffer::nativeGlobalPointer().

Definition at line 562 of file events.h.


Constructor & Destructor Documentation

NativeKernelEvent::NativeKernelEvent ( CommandQueue parent,
void(*)(void *)  user_func,
void *  args,
size_t  cb_args,
cl_uint  num_mem_objects,
const MemObject **  mem_list,
const void **  args_mem_loc,
cl_uint  num_events_in_wait_list,
const Event **  event_wait_list,
cl_int *  errcode_ret 
)
NativeKernelEvent::~NativeKernelEvent ( )

Definition at line 600 of file events.cpp.

References p_args.


Member Function Documentation

void * NativeKernelEvent::args ( ) const

Args to give to the host function.

Definition at line 616 of file events.cpp.

References p_args.

Referenced by NativeKernelEvent(), and worker().

void * NativeKernelEvent::function ( ) const

Host function to call.

Definition at line 611 of file events.cpp.

References p_user_func.

Referenced by worker().

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

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

Implements Coal::Event.

Definition at line 606 of file events.cpp.

References Coal::Event::NativeKernel.


Member Data Documentation

Definition at line 584 of file events.h.

Referenced by args(), NativeKernelEvent(), and ~NativeKernelEvent().

Definition at line 583 of file events.h.

Referenced by function().


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