12#ifndef MFEM_TEMPLATE_ASSIGN
13#define MFEM_TEMPLATE_ASSIGN
38template <AssignOp::Type Op>
42struct 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)
59struct 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)
78struct 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)
97struct 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)
116struct 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)
136template <AssignOp::Type Op,
typename lvalue_t,
typename rvalue_t>
137inline lvalue_t &
Assign(lvalue_t &
a,
const rvalue_t &
b)
139 return internal::AssignOp_Impl<Op>::Assign(
a,
b);
142template <AssignOp::Type Op,
typename lvalue_t,
typename rvalue_t>
146 return internal::AssignOp_Impl<Op>::AssignHD(
a,
b);
lvalue_t & Assign(lvalue_t &a, const rvalue_t &b)
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
void Add(const DenseMatrix &A, const DenseMatrix &B, real_t alpha, DenseMatrix &C)
C = A + alpha*B.
MFEM_HOST_DEVICE lvalue_t & AssignHD(lvalue_t &a, const rvalue_t &b)