MCPcopy Create free account
hub / github.com/Derious/cuMPC / array_integer

Function array_integer

dependence/eigen-3.4.0/test/array_cwise.cpp:645–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643};
644
645template<typename ArrayType> void array_integer(const ArrayType& m)
646{
647 Index rows = m.rows();
648 Index cols = m.cols();
649
650 ArrayType m1 = ArrayType::Random(rows, cols),
651 m2(rows, cols);
652
653 m2 = m1.template shiftLeft<2>();
654 VERIFY( (m2 == m1.unaryExpr(shift_left<2>())).all() );
655 m2 = m1.template shiftLeft<9>();
656 VERIFY( (m2 == m1.unaryExpr(shift_left<9>())).all() );
657
658 m2 = m1.template shiftRight<2>();
659 VERIFY( (m2 == m1.unaryExpr(arithmetic_shift_right<2>())).all() );
660 m2 = m1.template shiftRight<9>();
661 VERIFY( (m2 == m1.unaryExpr(arithmetic_shift_right<9>())).all() );
662}
663
664EIGEN_DECLARE_TEST(array_cwise)
665{

Callers 1

EIGEN_DECLARE_TESTFunction · 0.85

Calls 3

rowsMethod · 0.45
colsMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected