#include <Kernel.hpp>
This class represents a Task's kernel.
Kernel::Kernel |
( |
const std::string & |
name, |
|
|
const ProgramObjectMap & |
programObjects |
|
) |
| |
Constructs the Kernel object. Only the Task class should do it. The proper way of creating a kernel is through Task::addKernel().
- Parameters
-
name | The kernel's name. |
programObjects | The program objects that the Task supports. |
- See also
- Task::addKernel
Buffer* Kernel::inputBuffer |
( |
| ) |
|
|
inline |
Returns the input buffer or nullptr if it wasn't set.
Buffer* Kernel::outputBuffer |
( |
| ) |
|
|
inline |
Returns the output buffer or nullptr if it wasn't set.
Kernel* Kernel::setArg |
( |
const std::string & |
name, |
|
|
std::shared_ptr< Buffer > |
buffer |
|
) |
| |
Sets an arbitrary buffer as a parameter, except for the first two, only to the device of the buffer.
Kernel* Kernel::setInputBuffer |
( |
std::shared_ptr< Buffer > |
buffer | ) |
|
Sets the input buffer to the kernel, only to the device of the buffer. The input buffer on OpenCL is always the first parameter of the kernel. Note that you can make this buffer readwrite on RenderScript by using the old prototype format and using pointers to access it. If the xDim, yDim and zDim weren't set previously, the dimensions of this buffer are used as the dimensions of the kernel.
Kernel* Kernel::setOutputBuffer |
( |
std::shared_ptr< Buffer > |
buffer | ) |
|
Sets the output buffer to the kernel, only to the device of the buffer. The output buffer on OpenCL is always the second parameter of the kernel. Note that you can make this buffer readwrite on RenderScript by using the old prototype format and using pointers to access it.
Kernel* Kernel::setWorkRange |
( |
int |
xDim, |
|
|
int |
yDim = 1 , |
|
|
int |
zDim = 1 |
|
) |
| |
|
inline |
Sets the range of execution.
- Parameters
-
xDim | Number of elements in the x dimension. |
yDim | Number of elements in the y dimension. |
zDim | Number of elements in the z dimension. |
The documentation for this class was generated from the following file: