Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-30 08:21:41

0001 /*
0002   [auto_generated]
0003   boost/numeric/odeint/external/thrust/thrust_operations_dispatcher.hpp
0004 
0005   [begin_description]
0006   operations_dispatcher specialization for thrust
0007   [end_description]
0008 
0009   Copyright 2013-2014 Karsten Ahnert
0010   Copyright 2013-2014 Mario Mulansky
0011 
0012   Distributed under the Boost Software License, Version 1.0.
0013   (See accompanying file LICENSE_1_0.txt or
0014   copy at http://www.boost.org/LICENSE_1_0.txt)
0015 */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_OPERATIONS_DISPATCHER_HPP_DEFINED
0019 #define BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_OPERATIONS_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_operations.hpp>
0025 #include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
0026 
0027 // support for the standard thrust containers
0028 
0029 namespace boost {
0030 namespace numeric {
0031 namespace odeint {
0032 
0033 // specialization for thrust host_vector
0034 template< class T , class A >
0035 struct operations_dispatcher< thrust::host_vector< T , A > >
0036 {
0037     typedef thrust_operations operations_type;
0038 };
0039 
0040 // specialization for thrust device_vector
0041 template< class T , class A >
0042 struct operations_dispatcher< thrust::device_vector< T , A > >
0043 {
0044     typedef thrust_operations operations_type;
0045 };
0046 
0047 } // namespace odeint
0048 } // namespace numeric
0049 } // namespace boost
0050 
0051 // add support for thrust backend vectors, if available
0052 
0053 #include <thrust/version.h>
0054 
0055 #if THRUST_VERSION >= 101000
0056 
0057 #include <thrust/detail/vector_base.h>
0058 namespace boost { namespace numeric { namespace odeint {
0059     template< class T , class A >
0060     struct operations_dispatcher< thrust::detail::vector_base< T , A > >
0061     {
0062         typedef thrust_operations operations_type;
0063     };
0064 } } }
0065 
0066 #elif THRUST_VERSION >= 100600
0067 
0068 // specialization for thrust cpp vector
0069 #include <thrust/system/cpp/vector.h>
0070 namespace boost { namespace numeric { namespace odeint {
0071     template< class T , class A >
0072     struct operations_dispatcher< thrust::cpp::vector< T , A > >
0073     {
0074         typedef thrust_operations operations_type;
0075     };
0076 } } }
0077 
0078 // specialization for thrust omp vector
0079 #ifdef _OPENMP
0080 #include <thrust/system/omp/vector.h>
0081 namespace boost { namespace numeric { namespace odeint {
0082     template< class T , class A >
0083     struct operations_dispatcher< thrust::omp::vector< T , A > >
0084     {
0085         typedef thrust_operations operations_type;
0086     };
0087 } } }
0088 #endif // _OPENMP
0089 
0090 // specialization for thrust tbb vector
0091 #ifdef TBB_VERSION_MAJOR
0092 #include <thrust/system/tbb/vector.h>
0093 namespace boost { namespace numeric { namespace odeint {
0094     template< class T , class A >
0095     struct operations_dispatcher< thrust::tbb::vector< T , A > >
0096     {
0097         typedef thrust_operations operations_type;
0098     };
0099 } } }
0100 #endif // TBB_VERSION_MAJOR
0101 
0102 // specialization for thrust cuda vector
0103 #ifdef __CUDACC__
0104 #include <thrust/system/cuda/vector.h>
0105 namespace boost { namespace numeric { namespace odeint {
0106     template< class T , class A >
0107     struct operations_dispatcher< thrust::cuda::vector< T , A > >
0108     {
0109         typedef thrust_operations operations_type;
0110     };
0111 } } }
0112 #endif // __CUDACC__
0113 
0114 #endif // THRUST_VERSION >= 100600
0115 
0116 
0117 #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_THRUST_THRUST_OPERATIONS_DISPATCHER_HPP_DEFINED
0118