summaryrefslogtreecommitdiff
path: root/enums.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'enums.hpp')
-rw-r--r--enums.hpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/enums.hpp b/enums.hpp
new file mode 100644
index 0000000..562ab41
--- /dev/null
+++ b/enums.hpp
@@ -0,0 +1,64 @@
+//
+// Copyright (C) 2012 Francisco Jerez
+//
+// clinfo is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// clinfo is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with clinfo. If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef __ENUMS_HPP__
+#define __ENUMS_HPP__
+
+#include <map>
+#include <CL/cl.hpp>
+
+namespace enums {
+ template<typename T>
+ struct __enum {
+ typedef T value_type;
+ typedef const std::map<T, std::string> map_type;
+ };
+
+ struct param : public __enum<cl_int> {
+ static map_type map;
+ };
+
+ struct boolean : public __enum<cl_bool> {
+ static map_type map;
+ };
+
+ struct device_type : public __enum<cl_device_type> {
+ static map_type map;
+ };
+
+ struct device_fp_config : public __enum<cl_device_fp_config> {
+ static map_type map;
+ };
+
+ struct device_mem_cache_type : public __enum<cl_device_mem_cache_type> {
+ static map_type map;
+ };
+
+ struct device_local_mem_type : public __enum<cl_device_local_mem_type> {
+ static map_type map;
+ };
+
+ struct device_exec_capabilities : public __enum<cl_device_exec_capabilities> {
+ static map_type map;
+ };
+
+ struct command_queue_properties : public __enum<cl_command_queue_properties> {
+ static map_type map;
+ };
+}
+
+#endif