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_abstract_dev_container_wrapper.h
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 
32 #ifndef __CCL_ABSTRACT_DEV_CONTAINER_WRAPPER_H_
33 #define __CCL_ABSTRACT_DEV_CONTAINER_WRAPPER_H_
34 
35 #include "ccl_oclversions.h"
36 #include "ccl_common.h"
37 #include "ccl_errors.h"
38 #include "ccl_device_wrapper.h"
39 #include "ccl_abstract_wrapper.h"
40 #include "_ccl_abstract_wrapper.h"
41 
49 
54  CCLWrapper base;
55 
60  cl_uint num_devices;
61 
66  CCLDevice** devices;
67 
68 };
69 
86 typedef CCLWrapperInfo* (*ccl_dev_container_get_cldevices)(
87  CCLDevContainer* devcon, CCLErr** err);
88 
89 /* Release the devices held by the given #CCLDevContainer
90  * object. */
91 void ccl_dev_container_release_devices(CCLDevContainer* devcon);
92 
93 /* Get all ::CCLDevice wrappers in device container. */
94 CCLDevice* const* ccl_dev_container_get_all_devices(
95  CCLDevContainer* devcon,
96  ccl_dev_container_get_cldevices get_devices, CCLErr** err);
97 
98 /* Get ::CCLDevice wrapper at given index. */
99 CCLDevice* ccl_dev_container_get_device(CCLDevContainer* devcon,
100  ccl_dev_container_get_cldevices get_devices,
101  cl_uint index, CCLErr** err);
102 
103 /* Return number of devices in device container. */
104 cl_uint ccl_dev_container_get_num_devices(CCLDevContainer* devcon,
105  ccl_dev_container_get_cldevices get_devices, CCLErr** err);
106 
107 #endif
108 
109 
Definition of a wrapper class and its methods for OpenCL device objects.
Base class for wrappers which contain devices, i.e., CCLPlatform, CCLProgram and CCLContext.
Base class for all OpenCL wrappers.
Definition of an abstract wrapper class and its methods for OpenCL objects.
Header for normalizing OpenCL versions within cf4ocl.
Convert OpenCL error codes to readable strings (function header).
Class which represents information about a wrapped OpenCL object.
GError CCLErr
Error handling class.
Definition: ccl_common.h:291
Common cf4ocl definitions.
Device wrapper class.