cf4ocl (C Framework for OpenCL)  v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ccl_platforms.h
Go to the documentation of this file.
1 /*
2  * This file is part of cf4ocl (C Framework for OpenCL).
3  *
4  * cf4ocl is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, either version 3 of the
7  * License, or (at your option) any later version.
8  *
9  * cf4ocl is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with cf4ocl. If not, see
16  * <http://www.gnu.org/licenses/>.
17  * */
18 
30 #ifndef _CCL_PLATFORMS_H_
31 #define _CCL_PLATFORMS_H_
32 
33 #include "ccl_common.h"
34 #include "ccl_platform_wrapper.h"
35 #include "ccl_errors.h"
36 
73 /* Creates a new CCLPlatforms* object, which contains the list
74  * of OpenCL platforms available in the system. */
75 CCL_EXPORT
77 
78 /* Destroy a CCLPlatforms* object, including all underlying
79  * platforms, devices and data. */
80 CCL_EXPORT
81 void ccl_platforms_destroy(CCLPlatforms* platforms);
82 
83 /* Return number of OpenCL platforms found in CCLPlatforms*
84  * object. */
85 CCL_EXPORT
86 cl_uint ccl_platforms_count(CCLPlatforms* platforms);
87 
88 /* Get CCL platform wrapper object at given index. */
89 CCL_EXPORT
91  CCLPlatforms* platforms, cl_uint index);
92 
95 #endif
Definition of a wrapper class and its methods for OpenCL platform objects.
void ccl_platforms_destroy(CCLPlatforms *platforms)
Destroy a CCLPlatforms* object, including all underlying platforms, devices and data.
CCLPlatforms * ccl_platforms_new(CCLErr **err)
Creates a new CCLPlatforms* object, which contains the list of OpenCL platforms available in the syst...
Definition: ccl_platforms.c:68
cl_uint ccl_platforms_count(CCLPlatforms *platforms)
Return number of OpenCL platforms found in CCLPlatforms object.
Class which represents the OpenCL platforms available in the system.
Definition: ccl_platforms.c:37
GError CCLErr
Error handling class.
Definition: ccl_common.h:291
Common cf4ocl definitions.
CCLPlatform * ccl_platforms_get(CCLPlatforms *platforms, cl_uint index)
Get platform wrapper object at given index.
Convert OpenCL error codes to readable strings (function header).
The platform wrapper class.