//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc. //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 UUID_9C471450B3A611DEAF56C1F155D89593 #define UUID_9C471450B3A611DEAF56C1F155D89593 #include #include #include #include "test_qvm.hpp" namespace test_qvm { template struct matrix { T a[Rows][Cols]; mutable T b[Rows][Cols]; explicit matrix( T start=T(0), T step=T(0) ) { for( int i=0; i!=Rows; ++i ) for( int j=0; j!=Cols; ++j,start+=step ) a[i][j]=b[i][j]=start; } }; template void dump_ab( matrix const & a, matrix const & b ) { detail::dump_ab(a.a,b.a); } } namespace boost { namespace qvm { template struct mat_traits< test_qvm::matrix >: mat_traits_defaults,T,Rows,Cols> { typedef mat_traits_defaults,T,Rows,Cols> base; template static typename base::scalar_type & write_element( typename base::mat_type & m ) { BOOST_QVM_STATIC_ASSERT(R>=0); BOOST_QVM_STATIC_ASSERT(R=0); BOOST_QVM_STATIC_ASSERT(C struct deduce_mat2,test_qvm::matrix,Rows,Cols> { typedef test_qvm::matrix type; }; } } namespace { struct M1; struct M2; struct M3; } #endif