]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/del_row_test.cpp
8ce14c5cf13a474c4c82491824f957aba55eba87
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 Row
>
20 using namespace boost::qvm
;
21 test_qvm::matrix
<M1
,Rows
,Cols
> x(42,1);
22 float r1
[Rows
-1][Cols
];
23 for( int i
=0; i
!=Rows
-1; ++i
)
24 for( int j
=0; j
!=Cols
; ++j
)
25 r1
[i
][j
]=x
.a
[i
+(i
>=Row
)][j
];
26 float r2
[Rows
-1][Cols
];
27 assign(r2
,del_row
<Row
>(x
));
28 BOOST_QVM_TEST_EQ(r1
,r2
);
30 for( int i
=0; i
!=Rows
-1; ++i
)
31 for( int j
=0; j
!=Cols
; ++j
)
32 r1
[i
][j
]=x
.a
[i
+(i
>=Row
)][j
];
33 assign(r2
,del_row
<Row
>(x
));
34 BOOST_QVM_TEST_EQ(r1
,r2
);
35 del_row
<Row
>(x
)+del_row
<Row
>(x
);
60 return boost::report_errors();