]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/numeric/odeint/include/boost/numeric/odeint/external/thrust/thrust_operations_dispatcher.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / numeric / odeint / include / boost / numeric / odeint / external / thrust / thrust_operations_dispatcher.hpp
1 /*
2 [auto_generated]
3 boost/numeric/odeint/external/thrust/thrust_operations_dispatcher.hpp
4
5 [begin_description]
6 operations_dispatcher specialization for thrust
7 [end_description]
8
9 Copyright 2013-2014 Karsten Ahnert
10 Copyright 2013-2014 Mario Mulansky
11
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
15 */
16
17
18 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_OPERATIONS_DISPATCHER_HPP_DEFINED
19 #define BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_OPERATIONS_DISPATCHER_HPP_DEFINED
20
21 #include <thrust/host_vector.h>
22 #include <thrust/device_vector.h>
23
24 #include <boost/numeric/odeint/external/thrust/thrust_operations.hpp>
25 #include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
26
27 // support for the standard thrust containers
28
29 namespace boost {
30 namespace numeric {
31 namespace odeint {
32
33 // specialization for thrust host_vector
34 template< class T , class A >
35 struct operations_dispatcher< thrust::host_vector< T , A > >
36 {
37 typedef thrust_operations operations_type;
38 };
39
40 // specialization for thrust device_vector
41 template< class T , class A >
42 struct operations_dispatcher< thrust::device_vector< T , A > >
43 {
44 typedef thrust_operations operations_type;
45 };
46
47 } // namespace odeint
48 } // namespace numeric
49 } // namespace boost
50
51 // add support for thrust backend vectors, if available
52
53 #include <thrust/version.h>
54
55 #if THRUST_VERSION >= 100600
56
57 // specialization for thrust cpp vector
58 #include <thrust/system/cpp/vector.h>
59 namespace boost { namespace numeric { namespace odeint {
60 template< class T , class A >
61 struct operations_dispatcher< thrust::cpp::vector< T , A > >
62 {
63 typedef thrust_operations operations_type;
64 };
65 } } }
66
67 // specialization for thrust omp vector
68 #ifdef _OPENMP
69 #include <thrust/system/omp/vector.h>
70 namespace boost { namespace numeric { namespace odeint {
71 template< class T , class A >
72 struct operations_dispatcher< thrust::omp::vector< T , A > >
73 {
74 typedef thrust_operations operations_type;
75 };
76 } } }
77 #endif // _OPENMP
78
79 // specialization for thrust tbb vector
80 #ifdef TBB_VERSION_MAJOR
81 #include <thrust/system/tbb/vector.h>
82 namespace boost { namespace numeric { namespace odeint {
83 template< class T , class A >
84 struct operations_dispatcher< thrust::tbb::vector< T , A > >
85 {
86 typedef thrust_operations operations_type;
87 };
88 } } }
89 #endif // TBB_VERSION_MAJOR
90
91 // specialization for thrust cuda vector
92 #ifdef __CUDACC__
93 #include <thrust/system/cuda/vector.h>
94 namespace boost { namespace numeric { namespace odeint {
95 template< class T , class A >
96 struct operations_dispatcher< thrust::cuda::vector< T , A > >
97 {
98 typedef thrust_operations operations_type;
99 };
100 } } }
101 #endif // __CUDACC__
102
103 #endif // THRUST_VERSION >= 100600
104
105
106 #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_OPERATIONS_DISPATCHER_HPP_DEFINED
107