ViennaCL - The Vienna Computing Library  1.2.0
handle.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_TRAITS_HANDLE_HPP_
2 #define VIENNACL_TRAITS_HANDLE_HPP_
3 
4 /* =========================================================================
5  Copyright (c) 2010-2011, Institute for Microelectronics,
6  Institute for Analysis and Scientific Computing,
7  TU Wien.
8 
9  -----------------
10  ViennaCL - The Vienna Computing Library
11  -----------------
12 
13  Project Head: Karl Rupp rupp@iue.tuwien.ac.at
14 
15  (A list of authors and contributors can be found in the PDF manual)
16 
17  License: MIT (X11), see file LICENSE in the base directory
18 ============================================================================= */
19 
24 #include <string>
25 #include <fstream>
26 #include <sstream>
27 #include "viennacl/forwards.h"
28 
29 #ifdef __APPLE__
30 #include <OpenCL/cl.h>
31 #else
32 #include <CL/cl.h>
33 #endif
34 
35 namespace viennacl
36 {
37  namespace traits
38  {
39 
40  // Returns the OpenCL handle of a ViennaCL object
41  template <typename T>
43  {
44  return obj.handle();
45  }
46 
47  template <typename T>
49  {
50  return handle(obj.get());
51  }
52 
53  template <typename T>
55  {
56  return handle(obj.get());
57  }
58 
59  template <typename T>
61  {
62  return handle(obj.get());
63  }
64 
65  template <typename T>
67  {
68  return handle(obj.get());
69  }
70 
71  } //namespace traits
72 } //namespace viennacl
73 
74 
75 #endif