![]() |
Mali OpenCL SDK v1.1.0
|
Go to the source code of this file.
Functions | |
bool | printProfilingInfo (cl_event event) |
Print the profiling information associated with an OpenCL event. | |
bool | printSupported2DImageFormats (cl_context context) |
Print a list of the 2D OpenCL image formats supported. | |
string | imageChannelOrderToString (cl_channel_order channelOrder) |
Convert cl_channel_order values into their string form. | |
string | imageChannelDataTypeToString (cl_channel_type channelDataType) |
Convert cl_channel_type values into their string form. | |
bool | cleanUpOpenCL (cl_context context, cl_command_queue commandQueue, cl_program program, cl_kernel kernel, cl_mem *memoryObjects, int numberOfMemoryObjects) |
Release any OpenCL objects that have been created. | |
bool | createContext (cl_context *context) |
Create an OpenCL context on a GPU on the first available platform. | |
bool | createCommandQueue (cl_context context, cl_command_queue *commandQueue, cl_device_id *device) |
Create an OpenCL command queue for a given context. | |
bool | createProgram (cl_context context, cl_device_id device, string filename, cl_program *program) |
bool | checkSuccess (cl_int errorNumber) |
Check an OpenCL error number for errors. | |
string | errorNumberToString (cl_int errorNumber) |
Convert OpenCL error numbers to their string form. | |
bool | isExtensionSupported (cl_device_id device, string extension) |
|
inline |
Check an OpenCL error number for errors.
If errorNumber is not CL_SUCESS, the function will print the string form of the error number.
[in] | errorNumber | The error number returned from an OpenCL command. |
Definition at line 358 of file common.cpp.
bool cleanUpOpenCL | ( | cl_context | context, |
cl_command_queue | commandQueue, | ||
cl_program | program, | ||
cl_kernel | kernel, | ||
cl_mem * | memoryObjects, | ||
int | numberOfMemoryObjects | ||
) |
Release any OpenCL objects that have been created.
If any of the OpenCL objects passed in are not NULL, they will be freed using the appropriate OpenCL function.
Definition at line 170 of file common.cpp.
bool createCommandQueue | ( | cl_context | context, |
cl_command_queue * | commandQueue, | ||
cl_device_id * | device | ||
) |
Create an OpenCL command queue for a given context.
[in] | context | The OpenCL context to use. |
[out] | commandQueue | The created OpenCL command queue. |
[out] | device | The device in which the command queue is created. |
Definition at line 255 of file common.cpp.
bool createContext | ( | cl_context * | context | ) |
Create an OpenCL context on a GPU on the first available platform.
[out] | context | Pointer to the created OpenCL context. |
Definition at line 224 of file common.cpp.
bool createProgram | ( | cl_context | context, |
cl_device_id | device, | ||
string | filename, | ||
cl_program * | program | ||
) |
Definition at line 298 of file common.cpp.
string errorNumberToString | ( | cl_int | errorNumber | ) |
Convert OpenCL error numbers to their string form.
Uses the error number definitions from cl.h.
[in] | errorNumber | The error number returned from an OpenCL command. |
Definition at line 368 of file common.cpp.
string imageChannelDataTypeToString | ( | cl_channel_type | channelDataType | ) |
Convert cl_channel_type values into their string form.
Uses the channel data type definitions from cl.h.
[in] | channelDataType | The channel data type value to convert. |
Definition at line 131 of file common.cpp.
string imageChannelOrderToString | ( | cl_channel_order | channelOrder | ) |
Convert cl_channel_order values into their string form.
Uses the channel order definitions from cl.h.
[in] | channelOrder | The channel order value to convert. |
Definition at line 96 of file common.cpp.
bool isExtensionSupported | ( | cl_device_id | device, |
string | extension | ||
) |
Definition at line 471 of file common.cpp.
bool printProfilingInfo | ( | cl_event | event | ) |
Print the profiling information associated with an OpenCL event.
Prints the time spent in the command queue, the time spent waiting before being submitted to a device, and the execution time.
[in] | event | The event to get profiling information for. |
Definition at line 18 of file common.cpp.
bool printSupported2DImageFormats | ( | cl_context | context | ) |
Print a list of the 2D OpenCL image formats supported.
[in] | context | The OpenCL context to use. |
Definition at line 57 of file common.cpp.