1 #define BOOST_TEST_MODULE odeint_vexcl_norm_inf 2 3 #include <boost/numeric/odeint/external/vexcl/vexcl_norm_inf.hpp> 4 #include <boost/test/unit_test.hpp> 5 6 template <class T> norm(const T & x)7double norm(const T &x) { 8 return boost::numeric::odeint::vector_space_norm_inf<T>()(x); 9 } 10 BOOST_AUTO_TEST_CASE(norm_inf)11BOOST_AUTO_TEST_CASE( norm_inf ) 12 { 13 vex::Context ctx(vex::Filter::Env); 14 std::cout << ctx << std::endl; 15 16 vex::vector<double> x(ctx, 1024); 17 x = 41; 18 19 vex::multivector<double, 2> y(ctx, 1024); 20 y = 42; 21 22 BOOST_CHECK_EQUAL( norm(x), 41 ); 23 BOOST_CHECK_EQUAL( norm(y), 42 ); 24 } 25 26