blob: 71481d29622c4ba458018fd02addaac2f804783d [file] [log] [blame]
Brian Silverman7c33ab22018-08-04 17:14:51 -07001#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
6template <class T>
7double norm(const T &x) {
8 return boost::numeric::odeint::vector_space_norm_inf<T>()(x);
9}
10
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