PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | List of all members
PIOpenCL::Kernel Class Reference

OpenCL kernel wrapper with reflected argument metadata. More...

#include <piopencl.h>

Public Member Functions

Programprogram () const
 Returns the program that owns the kernel.
 
bool execute ()
 Enqueues kernel execution for the configured global ranges.
 
void waitForFinish ()
 Waits until the context command queue finishes.
 
void setExecuteRange (int size)
 Sets one-dimensional execution range.
 
void setExecuteRanges (const PIVector< int > &ranges)
 Sets multi-dimensional execution ranges.
 
const PIStringname () const
 Returns the kernel function name.
 
const PIVector< KernelArg > & args () const
 Returns reflected descriptions of kernel arguments.
 
template<typename T >
bool setArgValue (int index, const T &value)
 Sets a scalar argument by index.
 
template<typename T >
bool setArgValue (const PIString &arg, const T &value)
 Sets a scalar argument by name.
 
bool setArgValue (const PIString &arg, const PIVariant &value)
 Sets a scalar argument from a PIVariant value.
 
bool bindArgValue (int index, Buffer *buffer)
 Binds a buffer argument by index.
 
bool bindArgValue (const PIString &arg, Buffer *buffer)
 Binds a buffer argument by name.
 

Detailed Description

OpenCL kernel wrapper with reflected argument metadata.