static void exec(LHS &lhs, RHS const &rhs) { expr::evaluate(rhs); length_type const size0 = lhs.size(3, 0); length_type const size1 = lhs.size(3, 1); length_type const size2 = lhs.size(3, 2); for (index_type i=0; i<size0; ++i) for (index_type k=0; k<size2; ++k) for (index_type j=0; j<size1; ++j) lhs.put(i, j, k, rhs.get(i, j, k)); }
static void exec(LHS &lhs, RHS const &rhs) { expr::evaluate(rhs); length_type const size = lhs.size(1, 0); for (index_type i=0; i<size; ++i) lhs.put(i, rhs.get(i)); }
static void exec(LHS &lhs, RHS const &rhs) { expr::evaluate(rhs); length_type const rows = lhs.size(2, 0); length_type const cols = lhs.size(2, 1); for (index_type j=0; j<cols; ++j) for (index_type i=0; i<rows; ++i) lhs.put(i, j, rhs.get(i, j)); }
static void exec(LHS &lhs, RHS const &rhs) { VBlock const& vblock = rhs.get_vblk(); MBlock const& mblock = rhs.get_mblk(); typedef typename get_block_layout<LHS>::order_type order_type; Matrix<lhs_value_type, LHS> m_dst(lhs); const_Vector<v_value_type, VBlock> v(const_cast<VBlock&>(vblock)); const_Matrix<m_value_type, MBlock> m(const_cast<MBlock&>(mblock)); if (is_same<order_type, row2_type>::value) { if (D == row) { for (index_type r = 0; r < lhs.size(2, 0); ++r) m_dst.row(r) = v * m.row(r); } else { for (index_type r = 0; r < lhs.size(2, 0); ++r) m_dst.row(r) = v.get(r) * m.row(r); } } else // col2_type { if (D == row) { for (index_type c = 0; c < lhs.size(2, 1); ++c) m_dst.col(c) = v.get(c) * m.col(c); } else { for (index_type c = 0; c < lhs.size(2, 1); ++c) m_dst.col(c) = v * m.col(c); } } }
//Standard case: LHS is the vector type and carries the correct size static unsigned int size(LHS & lhs, RHS & rhs) { return lhs.size(); }