mgcpp
A C++ Math Library Based on CUDA
scalar_dmat_mult.hpp
Go to the documentation of this file.
1 
2 // Copyright RedPortal, mujjingun 2017 - 2018.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef MGCPP_EXPRESSIONS_SCALAR_DMAT_MULT_EXPR_HPP
8 #define MGCPP_EXPRESSIONS_SCALAR_DMAT_MULT_EXPR_HPP
9 
10 #include <type_traits>
11 
15 
16 namespace mgcpp {
17 
18 struct scalar_dmat_mult_expr_type;
19 
20 template <typename ScalExpr, typename DMatExpr>
21 using scalar_dmat_mult_expr = binary_expr<scalar_dmat_mult_expr_type,
22  dmat_expr,
23  typename DMatExpr::result_type,
24  ScalExpr,
25  DMatExpr>;
26 
31 template <typename Scalar,
32  typename DMatExpr,
33  typename = typename std::enable_if<is_scalar<Scalar>::value>::type>
34 inline auto operator*(Scalar const& scalar,
35  dmat_expr<DMatExpr> const& exp) noexcept;
36 
41 template <typename Scalar,
42  typename DMatExpr,
43  typename = typename std::enable_if<is_scalar<Scalar>::value>::type>
44 inline auto operator*(dmat_expr<DMatExpr> const& exp,
45  Scalar const& scalar) noexcept;
46 
51 template <typename ScalExpr, typename DMatExpr>
52 inline auto operator*(scalar_expr<ScalExpr> const& scalar,
53  dmat_expr<DMatExpr> const& exp) noexcept;
54 
59 template <typename ScalExpr, typename DMatExpr>
60 inline auto operator*(dmat_expr<DMatExpr> const& exp,
61  scalar_expr<ScalExpr> const& scalar) noexcept;
62 
67 template <typename Scalar,
68  typename DMatExpr,
69  typename = typename std::enable_if<is_scalar<Scalar>::value>::type>
70 inline auto mult(Scalar const& scalar,
71  dmat_expr<DMatExpr> const& mat_exp) noexcept;
72 
77 template <typename Scalar,
78  typename DMatExpr,
79  typename = typename std::enable_if<is_scalar<Scalar>::value>::type>
80 inline auto mult(dmat_expr<DMatExpr> const& mat_exp,
81  Scalar const& scalar) noexcept;
82 
87 template <typename ScalExpr, typename DMatExpr>
88 inline auto mult(scalar_expr<ScalExpr> const& scalar,
89  dmat_expr<DMatExpr> const& mat_exp) noexcept;
90 
95 template <typename ScalExpr, typename DMatExpr>
96 inline auto mult(dmat_expr<DMatExpr> const& mat_exp,
97  scalar_expr<ScalExpr> const& scalar) noexcept;
98 } // namespace mgcpp
99 
101 #endif
Definition: adapter_base.hpp:12
dmat_dmat_mult_expr< LhsExpr, RhsExpr > mult(dmat_expr< LhsExpr > const &lhs, dmat_expr< RhsExpr > const &rhs) noexcept
binary_expr< scalar_dmat_mult_expr_type, dmat_expr, typename DMatExpr::result_type, ScalExpr, DMatExpr > scalar_dmat_mult_expr
Definition: scalar_dmat_mult.hpp:25
generic_expr< TagType, 0, ResultExprType, ResultType, 0, LhsExpr, RhsExpr > binary_expr
Definition: generic_expr.hpp:110
Definition: dmat_expr.hpp:19
Definition: scalar_expr.hpp:18
dmat_dmat_mult_expr< LhsExpr, RhsExpr > operator*(dmat_expr< LhsExpr > const &lhs, dmat_expr< RhsExpr > const &rhs) noexcept