]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/del_col_test.cpp
1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include <boost/qvm/map_mat_mat.hpp>
7 #include <boost/qvm/mat_operations.hpp>
8 #include <boost/qvm/mat_traits_array.hpp>
9 #include <boost/qvm/mat.hpp>
10 #include "test_qvm.hpp"
11 #include "test_qvm_matrix.hpp"
16 template <int Rows
,int Cols
,int Col
>
20 using namespace boost::qvm
;
21 test_qvm::matrix
<M1
,Rows
,Cols
> x(42,1);
22 float r1
[Rows
][Cols
-1];
23 for( int i
=0; i
!=Rows
; ++i
)
24 for( int j
=0; j
!=Cols
-1; ++j
)
25 r1
[i
][j
]=x
.a
[i
][j
+(j
>=Col
)];
26 float r2
[Rows
][Cols
-1];
27 assign(r2
,del_col
<Col
>(x
));
28 BOOST_QVM_TEST_EQ(r1
,r2
);
30 for( int i
=0; i
!=Rows
; ++i
)
31 for( int j
=0; j
!=Cols
-1; ++j
)
32 r1
[i
][j
]=x
.a
[i
][j
+(j
>=Col
)];
33 assign(r2
,del_col
<Col
>(x
));
34 BOOST_QVM_TEST_EQ(r1
,r2
);
35 del_col
<Col
>(x
) + del_col
<Col
>(x
);
60 return boost::report_errors();