#include <oclutils.h>
List of all members.
Public Member Functions |
| | OpenCL_Kernel () |
| | Default constructor.
|
| | OpenCL_Kernel (std::string _filename, const cl_context &_context, const cl_device_id &_device_id) |
| | Creates an OpenCL kernel object.
|
| | ~OpenCL_Kernel () |
| | Class destructor.
|
| void | Initialize (std::string _filename, const cl_context &_context, const cl_device_id &_device_id) |
| | Initializes the kernel object parameters.
|
| void | Build (std::string _kernel_name) |
| | Creates an OpenCL kernel with the provided kernel file or source.
|
| void | Compute_Work_Size (size_t _global_x, size_t _global_y, size_t _local_x, size_t _local_y) |
| | Sets the desired OpenCL global and local sizes. Checks if work sizes are valid if not, tries to guess the correct ones.
|
| const cl_kernel & | Get_Kernel () const |
| | Obtains the associated OpenCL kernel.
|
| size_t * | Get_Global_Work_Size () const |
| | Obtains the global work sizes.
|
| size_t * | Get_Local_Work_Size () const |
| | Obtains the local work sizes.
|
| int | Get_Dimension () const |
| | Obtains the kernel dimensions.
|
| void | Append_Compiler_Option (const std::string option) |
| | Appends a certain kernel compiler option.
|
| void | Launch (const cl_command_queue &command_queue) |
| | Launch kernel in a certain OpenCL command queue.
|
Static Public Member Functions |
| static int | Get_Multiple (int n, int base) |
| | Obtains a multiple of a certain number.
|
Constructor & Destructor Documentation
Creates an OpenCL kernel object.
- Parameters:
-
| _filename | kernel file name or source code. |
| _context | OpenCL context in which the kernel will be launched. |
| _device_id | OpenCL device id in which the kernel will be launched. |
Member Function Documentation
Appends a certain kernel compiler option.
- Parameters:
-
| option | desired kernel compiler option. |
Creates an OpenCL kernel with the provided kernel file or source.
- Parameters:
-
| _kernel_name | OpenCL kernel name. |
Sets the desired OpenCL global and local sizes. Checks if work sizes are valid if not, tries to guess the correct ones.
- Parameters:
-
| _global_x | global size of the first dimension. |
| _global_y | global size of the second dimension. |
| _local_x | local size of the first dimension. |
| _local_y | local size of the second dimension. |
Obtains the kernel dimensions.
- Returns:
- kernel dimensions.
Obtains the global work sizes.
- Returns:
- gobal work sizes.
Obtains the associated OpenCL kernel.
- Returns:
- OpenCL kernel.
Obtains the local work sizes.
- Returns:
- local work sizes.
Obtains a multiple of a certain number.
- Parameters:
-
| n | number of which we want to compute the multiple. |
| base | base number of which the result will be a multiple. |
- Returns:
- multiple.
Initializes the kernel object parameters.
- Parameters:
-
| _filename | kernel file name or source code. |
| _context | OpenCL context in which the kernel will be launched. |
| _device_id | OpenCL device id in which the kernel will be launched. |
Launch kernel in a certain OpenCL command queue.
- Parameters:
-
| command_queue | OpenCL command queue. |
The documentation for this class was generated from the following files: