File indexing completed on 2025-01-18 09:42:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_ALGEBRA_DISPATCHER_HPP_DEFINED
0019 #define BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_ALGEBRA_DISPATCHER_HPP_DEFINED
0020
0021 #include <thrust/host_vector.h>
0022 #include <thrust/device_vector.h>
0023
0024 #include <boost/numeric/odeint/external/thrust/thrust_algebra.hpp>
0025 #include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
0026
0027
0028
0029 namespace boost {
0030 namespace numeric {
0031 namespace odeint {
0032
0033
0034 template< class T , class A >
0035 struct algebra_dispatcher< thrust::host_vector< T , A > >
0036 {
0037 typedef thrust_algebra algebra_type;
0038 };
0039
0040
0041 template< class T , class A >
0042 struct algebra_dispatcher< thrust::device_vector< T , A > >
0043 {
0044 typedef thrust_algebra algebra_type;
0045 };
0046
0047 }
0048 }
0049 }
0050
0051
0052
0053
0054 #include <thrust/version.h>
0055
0056 #if THRUST_VERSION >= 100600
0057
0058
0059 #include <thrust/system/cpp/vector.h>
0060 namespace boost { namespace numeric { namespace odeint {
0061 template< class T , class A >
0062 struct algebra_dispatcher< thrust::cpp::vector< T , A > >
0063 {
0064 typedef thrust_algebra algebra_type;
0065 };
0066 } } }
0067
0068
0069 #ifdef _OPENMP
0070 #include <thrust/system/omp/vector.h>
0071 namespace boost { namespace numeric { namespace odeint {
0072 template< class T , class A >
0073 struct algebra_dispatcher< thrust::omp::vector< T , A > >
0074 {
0075 typedef thrust_algebra algebra_type;
0076 };
0077 } } }
0078 #endif
0079
0080
0081 #ifdef TBB_VERSION_MAJOR
0082 #include <thrust/system/tbb/vector.h>
0083 namespace boost { namespace numeric { namespace odeint {
0084 template< class T , class A >
0085 struct algebra_dispatcher< thrust::tbb::vector< T , A > >
0086 {
0087 typedef thrust_algebra algebra_type;
0088 };
0089 } } }
0090 #endif
0091
0092
0093 #ifdef __CUDACC__
0094 #include <thrust/system/cuda/vector.h>
0095 namespace boost { namespace numeric { namespace odeint {
0096 template< class T , class A >
0097 struct algebra_dispatcher< thrust::cuda::vector< T , A > >
0098 {
0099 typedef thrust_algebra algebra_type;
0100 };
0101 } } }
0102 #endif
0103
0104 #endif
0105
0106 #endif
0107