12 #ifndef MFEM_TEMPLATE_ASSIGN
13 #define MFEM_TEMPLATE_ASSIGN
15 #include "../config/tconfig.hpp"
16 #include "../general/cuda.hpp"
17 #include "../general/hip.hpp"
39 template <AssignOp::Type Op>
43 struct AssignOp_Impl<AssignOp::Set>
45 template <
typename lvalue_t,
typename rvalue_t>
47 static inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
54 struct AssignOp_Impl<AssignOp::
Add>
56 template <
typename lvalue_t,
typename rvalue_t>
58 static inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
66 struct AssignOp_Impl<AssignOp::
Mult>
68 template <
typename lvalue_t,
typename rvalue_t>
70 static inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
78 struct AssignOp_Impl<AssignOp::Div>
80 template <
typename lvalue_t,
typename rvalue_t>
82 static inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
90 struct AssignOp_Impl<AssignOp::rDiv>
92 template <
typename lvalue_t,
typename rvalue_t>
94 static inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
103 template <AssignOp::Type Op,
typename lvalue_t,
typename rvalue_t>
105 inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
112 #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 & Assign(lvalue_t &a, const rvalue_t &b)