3 boost/numeric/odeint/external/vexcl/vexcl_same_instance.hpp
6 Check if two VexCL containers are the same instance.
9 Copyright 2009-2011 Karsten Ahnert
10 Copyright 2009-2011 Mario Mulansky
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)
18 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_SAME_INSTANCE_HPP_INCLUDED
19 #define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_SAME_INSTANCE_HPP_INCLUDED
21 #include <vexcl/vector.hpp>
22 #include <vexcl/multivector.hpp>
24 #include <boost/numeric/odeint/util/same_instance.hpp>
31 struct same_instance_impl< vex::vector<T> , vex::vector<T> >
33 static bool same_instance( const vex::vector<T> &x1 , const vex::vector<T> &x2 )
36 static_cast<const vex::vector<T>*>(&x1) ==
37 static_cast<const vex::vector<T>*>(&x2);
41 template <typename T, size_t N>
42 struct same_instance_impl< vex::multivector<T, N> , vex::multivector<T, N> >
44 static bool same_instance( const vex::multivector<T, N> &x1 , const vex::multivector<T, N> &x2 )
47 static_cast<const vex::multivector<T, N>*>(&x1) ==
48 static_cast<const vex::multivector<T, N>*>(&x2);
53 } // namespace numeric
58 #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_SAME_INSTANCE_HPP_INCLUDED