12 #ifndef MFEM_TEMPLATE_ASSIGN
13 #define MFEM_TEMPLATE_ASSIGN
15 #include "../config/tconfig.hpp"
38 template <AssignOp::Type Op>
42 struct AssignOp_Impl<AssignOp::Set>
44 template <
typename lvalue_t,
typename rvalue_t>
45 static inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
50 template <
typename lvalue_t,
typename rvalue_t>
52 static inline lvalue_t &
AssignHD(lvalue_t &a,
const rvalue_t &b)
59 struct AssignOp_Impl<AssignOp::
Add>
61 template <
typename lvalue_t,
typename rvalue_t>
62 static inline lvalue_t &
Assign(lvalue_t &a,
const rvalue_t &b)
68 template <
typename lvalue_t,
typename rvalue_t>
70 static inline lvalue_t &
AssignHD(lvalue_t &a,
const rvalue_t &b)
78 struct AssignOp_Impl<AssignOp::
Mult>
80 template <
typename lvalue_t,
typename rvalue_t>
81 static inline lvalue_t &
Assign(lvalue_t &a,
const rvalue_t &b)
87 template <
typename lvalue_t,
typename rvalue_t>
89 static inline lvalue_t &
AssignHD(lvalue_t &a,
const rvalue_t &b)
97 struct AssignOp_Impl<AssignOp::Div>
99 template <
typename lvalue_t,
typename rvalue_t>
100 static inline lvalue_t &
Assign(lvalue_t &a,
const rvalue_t &b)
106 template <
typename lvalue_t,
typename rvalue_t>
108 static inline lvalue_t &
AssignHD(lvalue_t &a,
const rvalue_t &b)
116 struct AssignOp_Impl<AssignOp::rDiv>
118 template <
typename lvalue_t,
typename rvalue_t>
119 static inline lvalue_t &
Assign(lvalue_t &a,
const rvalue_t &b)
125 template <
typename lvalue_t,
typename rvalue_t>
127 static inline lvalue_t &
AssignHD(lvalue_t &a,
const rvalue_t &b)
136 template <AssignOp::Type Op,
typename lvalue_t,
typename rvalue_t>
137 inline lvalue_t &
Assign(lvalue_t &a,
const rvalue_t &b)
142 template <AssignOp::Type Op,
typename lvalue_t,
typename rvalue_t>
144 inline lvalue_t &
AssignHD(lvalue_t &a,
const rvalue_t &b)
151 #endif // MFEM_TEMPLATE_ASSIGN
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
void Add(const DenseMatrix &A, const DenseMatrix &B, double alpha, DenseMatrix &C)
C = A + alpha*B.
MFEM_HOST_DEVICE lvalue_t & AssignHD(lvalue_t &a, const rvalue_t &b)
lvalue_t & Assign(lvalue_t &a, const rvalue_t &b)