Mali OpenCL SDK v1.1.0
 All Classes Files Functions Variables Macros Pages
common.h
Go to the documentation of this file.
1 /*
2  * This confidential and proprietary software may be used only as
3  * authorised by a licensing agreement from ARM Limited
4  * (C) COPYRIGHT 2013 ARM Limited
5  * ALL RIGHTS RESERVED
6  * The entire notice above must be reproduced on all authorised
7  * copies and copies may only be made to the extent permitted
8  * by a licensing agreement from ARM Limited.
9  */
10 
11 #ifndef COMMON_H
12 #define COMMON_H
13 
14 #include <CL/cl.h>
15 #include <string>
16 
28 bool printProfilingInfo(cl_event event);
29 
35 bool printSupported2DImageFormats(cl_context context);
36 
43 std::string imageChannelOrderToString(cl_channel_order channelOrder);
44 
51 std::string imageChannelDataTypeToString(cl_channel_type channelDataType);
52 
58 bool cleanUpOpenCL(cl_context context, cl_command_queue commandQueue, cl_program program, cl_kernel kernel, cl_mem* memoryObjects, int numberOfMemoryObjects);
59 
65 bool createContext(cl_context* context);
66 
74 bool createCommandQueue(cl_context context, cl_command_queue* commandQueue, cl_device_id* device);
75 
84 bool createProgram(cl_context context, cl_device_id device, std::string filename, cl_program* program);
85 
92 std::string errorNumberToString(cl_int errorNumber);
93 
100 bool checkSuccess(cl_int errorNumber);
101 
108 bool isExtensionSupported(cl_device_id device, std::string extension);
109 #endif