summaryrefslogtreecommitdiff
path: root/enums.hpp
blob: 562ab41075a9cbb85397abb9442707661680f92f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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