]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/neg_row_test.cpp
1 // Copyright 2008-2022 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 #ifdef BOOST_QVM_TEST_SINGLE_HEADER
7 # include BOOST_QVM_TEST_SINGLE_HEADER
9 # include <boost/qvm/map_mat_mat.hpp>
10 # include <boost/qvm/mat_operations.hpp>
11 # include <boost/qvm/mat.hpp>
14 #include <boost/qvm/mat_traits_array.hpp>
15 #include "test_qvm.hpp"
16 #include "test_qvm_matrix.hpp"
21 template <int Rows
,int Cols
,int Row
>
25 using namespace boost::qvm
;
26 test_qvm::matrix
<M1
,Rows
,Cols
> x(42,1);
28 for( int i
=0; i
!=Rows
; ++i
)
29 for( int j
=0; j
!=Cols
; ++j
)
30 r1
[i
][j
]=(i
==Row
?-x
.a
[i
][j
]:x
.a
[i
][j
]);
32 assign(r2
,neg_row
<Row
>(x
));
33 BOOST_QVM_TEST_EQ(r1
,r2
);
34 neg_row
<Row
>(x
) + neg_row
<Row
>(x
);
59 return boost::report_errors();