This commit is contained in:
2026-03-23 20:54:41 +08:00
commit e13b3650e9
4596 changed files with 1015768 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl.hpp
[begin_description]
includes all headers required for using vexcl in odeint
[end_description]
Copyright 2013 Karsten Ahnert
Copyright 2013 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_HPP_DEFINED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_HPP_DEFINED
#include <boost/numeric/odeint/external/vexcl/vexcl_algebra_dispatcher.hpp>
#include <boost/numeric/odeint/external/vexcl/vexcl_resize.hpp>
#include <boost/numeric/odeint/external/vexcl/vexcl_same_instance.hpp>
#include <boost/numeric/odeint/external/vexcl/vexcl_norm_inf.hpp>
#include <boost/numeric/odeint/external/vexcl/vexcl_abs.hpp>
#include <boost/numeric/odeint/external/vexcl/vexcl_copy.hpp>
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_HPP_DEFINED

View File

@@ -0,0 +1,61 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl_abs.hpp
[begin_description]
abs() specialization for vexcl
[end_description]
Copyright 2009-2013 Karsten Ahnert
Copyright 2009-2013 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED
#include <vexcl/vector.hpp>
#include <vexcl/multivector.hpp>
#include <vexcl/operations.hpp>
namespace vex {
template <typename T, size_t N>
typename std::enable_if<
std::is_integral<T>::value,
typename boost::proto::result_of::make_expr<
boost::proto::tag::function,
abs_func,
const vex::multivector<T, N>&
>::type const
>::type
abs(const multivector<T, N> &arg) {
return boost::proto::make_expr<boost::proto::tag::function>(
abs_func(),
boost::ref(arg)
);
}
template <typename T, size_t N>
typename std::enable_if<
!std::is_integral<T>::value,
typename boost::proto::result_of::make_expr<
boost::proto::tag::function,
fabs_func,
const vex::multivector<T, N>&
>::type const
>::type
abs(const multivector<T, N> &arg) {
return boost::proto::make_expr<boost::proto::tag::function>(
fabs_func(),
boost::ref(arg)
);
}
} // namespace vex
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ABS_HPP_DEFINED

View File

@@ -0,0 +1,51 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl_algebra_dispatcher.hpp
[begin_description]
algebra_dispatcher specialization for vexcl
[end_description]
Copyright 2013 Karsten Ahnert
Copyright 2013 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ALGEBRA_DISPATCHER_HPP_DEFINED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ALGEBRA_DISPATCHER_HPP_DEFINED
#include <vexcl/vector.hpp>
#include <vexcl/multivector.hpp>
#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
namespace boost {
namespace numeric {
namespace odeint {
// specialization for vexcl vector
template< typename T >
struct algebra_dispatcher< vex::vector< T > >
{
typedef vector_space_algebra algebra_type;
};
// specialization for vexcl multivector
template< typename T , size_t N >
struct algebra_dispatcher< vex::multivector< T , N > >
{
typedef vector_space_algebra algebra_type;
};
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ALGEBRA_DISPATCHER_HPP_DEFINED

View File

@@ -0,0 +1,55 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl_copy.hpp
[begin_description]
copy_impl specializations for vexcl
[end_description]
Copyright 2009-2011 Karsten Ahnert
Copyright 2009-2011 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_COPY_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_COPY_HPP_INCLUDED
#include <vexcl/vector.hpp>
#include <vexcl/multivector.hpp>
#include <boost/numeric/odeint/util/copy.hpp>
namespace boost {
namespace numeric {
namespace odeint {
template< typename T1, typename T2 >
struct copy_impl< vex::vector<T1>, vex::vector<T2> >
{
static void copy( const vex::vector<T1> &from , vex::vector<T2> &to )
{
to = from;
}
};
template< typename T1, typename T2, size_t N >
struct copy_impl< vex::multivector<T1, N>, vex::multivector<T2, N> >
{
static void copy( const vex::multivector<T1, N> &from , vex::multivector<T2, N> &to )
{
to = from;
}
};
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_COPY_HPP_INCLUDED

View File

@@ -0,0 +1,68 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl_norm_inf.hpp
[begin_description]
vector_space_norm_inf specialization for vexcl
[end_description]
Copyright 2009-2013 Karsten Ahnert
Copyright 2009-2013 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_NORM_INF_HPP_DEFINED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_NORM_INF_HPP_DEFINED
#include <map>
#include <algorithm>
#include <vexcl/vector.hpp>
#include <vexcl/multivector.hpp>
#include <vexcl/reductor.hpp>
#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
namespace boost {
namespace numeric {
namespace odeint {
// specialization for vexcl vector
template <typename T>
struct vector_space_norm_inf< vex::vector<T> > {
typedef T result_type;
T operator()( const vex::vector<T> &x ) const {
const auto &max = vex::get_reductor<T, vex::MAX>(x.queue_list());
return max( fabs(x) );
}
};
// specialization for vexcl multivector
template <typename T, size_t N>
struct vector_space_norm_inf< vex::multivector<T, N> > {
typedef T result_type;
T operator()( const vex::multivector<T, N> &x ) const {
const auto &max = vex::get_reductor<T, vex::MAX>(x.queue_list());
// Reducing a multivector results in std::array<T, N>:
auto m = max( fabs(x) );
// We will need to reduce it even further:
return *std::max_element(m.begin(), m.end());
}
};
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_NORM_INF_HPP_DEFINED

View File

@@ -0,0 +1,96 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl_resize.hpp
[begin_description]
Enable resizing for vexcl vector and multivector.
[end_description]
Copyright 2012 Karsten Ahnert
Copyright 2012 Mario Mulansky
Copyright 2012 Denis Demidov
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_RESIZE_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_RESIZE_HPP_INCLUDED
#include <type_traits>
#include <vexcl/vector.hpp>
#include <vexcl/multivector.hpp>
#include <boost/numeric/odeint/util/is_resizeable.hpp>
#include <boost/numeric/odeint/util/resize.hpp>
#include <boost/numeric/odeint/util/same_size.hpp>
namespace boost {
namespace numeric {
namespace odeint {
/*
* specializations for vex::vector< T >
*/
template< typename T >
struct is_resizeable< vex::vector< T > > : std::true_type { };
template< typename T >
struct resize_impl< vex::vector< T > , vex::vector< T > >
{
static void resize( vex::vector< T > &x1 , const vex::vector< T > &x2 )
{
x1.resize( x2.queue_list() , x2.size() );
}
};
template< typename T >
struct same_size_impl< vex::vector< T > , vex::vector< T > >
{
static bool same_size( const vex::vector< T > &x1 , const vex::vector< T > &x2 )
{
return x1.size() == x2.size();
}
};
/*
* specializations for vex::multivector< T >
*/
template< typename T , size_t N >
struct is_resizeable< vex::multivector< T , N > > : std::true_type { };
template< typename T , size_t N >
struct resize_impl< vex::multivector< T , N > , vex::multivector< T , N > >
{
static void resize( vex::multivector< T , N > &x1 , const vex::multivector< T , N > &x2 )
{
x1.resize( x2.queue_list() , x2.size() );
}
};
template< typename T , size_t N >
struct same_size_impl< vex::multivector< T , N > , vex::multivector< T , N > >
{
static bool same_size( const vex::multivector< T , N > &x1 , const vex::multivector< T , N > &x2 )
{
return x1.size() == x2.size();
}
};
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_RESIZE_HPP_INCLUDED

View File

@@ -0,0 +1,58 @@
/*
[auto_generated]
boost/numeric/odeint/external/vexcl/vexcl_same_instance.hpp
[begin_description]
Check if two VexCL containers are the same instance.
[end_description]
Copyright 2009-2011 Karsten Ahnert
Copyright 2009-2011 Mario Mulansky
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_SAME_INSTANCE_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_SAME_INSTANCE_HPP_INCLUDED
#include <vexcl/vector.hpp>
#include <vexcl/multivector.hpp>
#include <boost/numeric/odeint/util/same_instance.hpp>
namespace boost {
namespace numeric {
namespace odeint {
template <typename T>
struct same_instance_impl< vex::vector<T> , vex::vector<T> >
{
static bool same_instance( const vex::vector<T> &x1 , const vex::vector<T> &x2 )
{
return
static_cast<const vex::vector<T>*>(&x1) ==
static_cast<const vex::vector<T>*>(&x2);
}
};
template <typename T, size_t N>
struct same_instance_impl< vex::multivector<T, N> , vex::multivector<T, N> >
{
static bool same_instance( const vex::multivector<T, N> &x1 , const vex::multivector<T, N> &x2 )
{
return
static_cast<const vex::multivector<T, N>*>(&x1) ==
static_cast<const vex::multivector<T, N>*>(&x2);
}
};
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_SAME_INSTANCE_HPP_INCLUDED