![]() |
Clover Git
OpenCL 1.1 software implementation
|
Executing a native function as a kernel. More...
#include <events.h>
Inheritance diagram for Coal::NativeKernelEvent:
Collaboration diagram for Coal::NativeKernelEvent: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 |
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().
| 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 | ||
| ) |
Definition at line 498 of file events.cpp.
References args(), Coal::MemObject::deviceBuffer(), Coal::DeviceInterface::info(), Coal::CommandQueue::info(), Coal::DeviceBuffer::nativeGlobalPointer(), and p_args.
| NativeKernelEvent::~NativeKernelEvent | ( | ) |
Definition at line 600 of file events.cpp.
References p_args.
| 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.
void* Coal::NativeKernelEvent::p_args [private] |
Definition at line 584 of file events.h.
Referenced by args(), NativeKernelEvent(), and ~NativeKernelEvent().
void* Coal::NativeKernelEvent::p_user_func [private] |
Definition at line 583 of file events.h.
Referenced by function().
1.7.3