5 # ifndef VCCC_MATH_MATRIX_MATRIX_MUL_MATRIX_HPP
6 # define VCCC_MATH_MATRIX_MATRIX_MUL_MATRIX_HPP
16 template<
typename LhsType,
typename RhsType>
17 struct traits<MatrixMulMatrix<LhsType, RhsType>> {
19 rows = traits<LhsType>::rows,
20 cols = traits<RhsType>::cols,
25 option = traits<LhsType>::option | traits<RhsType>::option | Flag::kAliasUnsafe | Flag::kReferenceUnsafe
27 using value_type =
typename LhsType::value_type;
36 template<
typename LhsType,
typename RhsType>
40 using value_type =
typename internal::math::traits<MatrixMulMatrix>::value_type;
41 using lhs_type = internal::math::hold_type_selector_t<LhsType>;
42 using rhs_type = internal::math::hold_type_selector_t<RhsType>;
44 constexpr
MatrixMulMatrix(
const LhsType& lhs,
const RhsType& rhs) : lhs(lhs), rhs(rhs) {};
47 constexpr
auto operator() (std::size_t i, std::size_t j)
const;
54 using tag = internal::math::tag<int, LhsType::rows, LhsType::cols, RhsType::cols>;
73 template<
typename E1,
typename E2,
74 std::enable_if_t<(internal::math::traits<E1>::cols == internal::math::traits<E2>::rows),
int> = 0>
82 template<
typename LhsType,
typename RhsType>
86 sum += lhs(i, k) * rhs(k, j);
90 template<
typename LhsType,
typename RhsType>
92 return operator()(i / base::cols, i % base::cols);
95 template<
typename LhsType,
typename RhsType>
97 return operator()(i / base::cols, i % base::cols);
Definition: matrix_base.hpp:20
Definition: matrix_mul_matrix.hpp:37
internal::math::hold_type_selector_t< RhsType > rhs_type
Definition: matrix_mul_matrix.hpp:42
internal::math::hold_type_selector_t< LhsType > lhs_type
Definition: matrix_mul_matrix.hpp:41
constexpr auto operator[](std::size_t i) const
typename internal::math::traits< MatrixMulMatrix >::value_type value_type
Definition: matrix_mul_matrix.hpp:40
constexpr auto operator()(std::size_t i) const
constexpr MatrixMulMatrix(const LhsType &lhs, const RhsType &rhs)
Definition: matrix_mul_matrix.hpp:44
constexpr auto sum(InputIterator first, InputIterator last)
sum of iterator [first, last)
Definition: sum.hpp:57
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > second
Definition: key_value.hpp:36
constexpr auto size(const C &c) -> decltype(c.size())
Definition: size.hpp:16