JASPL
0.2
Just Another Signal Processing Library
|
The fundamental structure underlying all OpenCL Functions. More...
#include <taskqueuebase.h>
Public Member Functions | |
TaskQueueBase (uint platform_number=0, uint device_number=0) | |
Build a new TaskQueueBase and implicitly initialize OpenCL Context, Platform etc. More... | |
void | Execute () |
Run all TaskItems that are currently loaded. More... | |
void | AddTaskItem (TaskItem &item) |
Add a new TaskItem into the TaskQueue. More... | |
bool | RemoveTaskItem (TaskItem &item) |
Remove a TaskItem from the queue (if it exists) More... | |
void | PrintContents () |
Print all of the current elements in the queue in the order in which they will be executed. | |
void | ReknewSignal (cl::Buffer &processed_buff, size_t processed_bytes, size_t processed_size) |
![]() | |
OpenCLBase (uint platform_number=0, uint device_number=0) | |
Initialize OpenCL Objects Note that the Platform and Context are selected automatically: Platform is set to cl::Platform( 0 ) Context is set to cl::Context( device[ device_number ] ) More... | |
Protected Attributes | |
std::list< TaskItem * > | task_queue |
cl::Buffer | signal_input |
cl::Buffer | output |
size_t | signal_size |
size_t | signal_bytes |
bool | on_device = false |
Friends | |
class | TaskItem |
Additional Inherited Members | |
![]() | |
void | SetUp (uint platform_number, uint device_number) |
![]() | |
static bool | initalized = false |
static std::vector< cl::Platform > | all_platforms |
static cl::Platform | default_platform |
static std::vector< cl::Device > | all_devices |
static cl::Device | current_device |
static cl::Context | context |
static cl::CommandQueue | command_queue |
The fundamental structure underlying all OpenCL Functions.
Definition at line 30 of file taskqueuebase.h.
jaspl::ocl::TaskQueueBase::TaskQueueBase | ( | uint | platform_number = 0 , |
uint | device_number = 0 |
||
) |
Build a new TaskQueueBase and implicitly initialize OpenCL Context, Platform etc.
device_number | Number of the OpenCL device to use as described by cl::Platform::getDevices(CL_DEVICE_TYPE_ALL) |
Note that this will be the device that every TaskItem will be executed on.
Definition at line 18 of file taskqueuebase.cpp.
void jaspl::ocl::TaskQueueBase::AddTaskItem | ( | TaskItem & | item | ) |
Add a new TaskItem into the TaskQueue.
Items added to the queue need not be unique, repeated TaskItems are allowed.
item | The TaskItem to be inserted into the queue. |
Definition at line 42 of file taskqueuebase.cpp.
void jaspl::ocl::TaskQueueBase::Execute | ( | ) |
Run all TaskItems that are currently loaded.
Items are executed in the order in which they were added with AddTaskItem().
Definition at line 22 of file taskqueuebase.cpp.
bool jaspl::ocl::TaskQueueBase::RemoveTaskItem | ( | TaskItem & | item | ) |
Remove a TaskItem from the queue (if it exists)
item | The TaskItem to be removed. |
If item is not currently in the queue this function does nothing.
Definition at line 46 of file taskqueuebase.cpp.