12 template <
typename, my_
size_t,
typename>
class Op>
16 static_assert(is_same_v<typename EXPR::value_type, ScalarT>,
17 "ScalarExprRHS: EXPR value_type and ScalarT must be the same");
27 using Layout =
typename EXPR::Layout;
31 const EXPR &
expr() const noexcept {
return _expr; }
32 ScalarT
scalar() const noexcept {
return _scalar; }
34 template <
typename Output>
37 return _expr.may_alias(output);
40 template <my_
size_t length>
43 using T = std::decay_t<
decltype(_expr(indices))>;
44 return Op<T, 0, GENERICARCH>::apply(
49 template <
typename T, my_
size_t Bits,
typename Arch>
50 inline typename Op<T, Bits, Arch>::type
evalu(
const my_size_t flat)
const noexcept
52 return Op<T, Bits, Arch>::apply(
53 _expr.template evalu<T, Bits, Arch>(flat),
57 template <
typename T, my_
size_t Bits,
typename Arch>
60 return Op<T, Bits, Arch>::apply(
61 _expr.template logical_evalu<T, Bits, Arch>(logical_flat),
67 return _expr.getNumDims();
72 return _expr.getDim(i);
77 return _expr.getTotalSize();
83 using T = std::decay_t<
decltype(_expr(indices))>;
84 return Op<T, 0, GENERICARCH>::apply(
93 template <
typename, my_
size_t,
typename>
class Op>
97 static_assert(is_same_v<typename EXPR::value_type, ScalarT>,
98 "ScalarExprRHS: EXPR value_type and ScalarT must be the same");
112 const EXPR &
expr() const noexcept {
return _expr; }
113 ScalarT
scalar() const noexcept {
return _scalar; }
115 template <
typename Output>
118 return _expr.may_alias(output);
121 template <my_
size_t length>
124 using T = std::decay_t<
decltype(_expr(indices))>;
125 return Op<T, 0, GENERICARCH>::apply(
130 template <
typename T, my_
size_t Bits,
typename Arch>
131 inline typename Op<T, Bits, Arch>::type
evalu(
const my_size_t flat)
const noexcept
133 return Op<T, Bits, Arch>::apply(
135 _expr.template evalu<T, Bits, Arch>(flat));
138 template <
typename T, my_
size_t Bits,
typename Arch>
141 return Op<T, Bits, Arch>::apply(
143 _expr.template logical_evalu<T, Bits, Arch>(logical_flat));
148 return _expr.getNumDims();
153 return _expr.getDim(i);
158 return _expr.getTotalSize();
Definition ScalarExpr.h:95
ScalarExprLHS(const EXPR &expr, ScalarT scalar)
Definition ScalarExpr.h:110
const EXPR & expr() const noexcept
Definition ScalarExpr.h:112
my_size_t getNumDims() const noexcept
Definition ScalarExpr.h:146
my_size_t getDim(my_size_t i) const
Definition ScalarExpr.h:151
typename EXPR::Layout Layout
Definition ScalarExpr.h:108
bool may_alias(const Output &output) const noexcept
Definition ScalarExpr.h:116
auto operator()(my_size_t(&indices)[length]) const noexcept
Definition ScalarExpr.h:122
my_size_t getTotalSize() const noexcept
Definition ScalarExpr.h:156
ScalarT scalar() const noexcept
Definition ScalarExpr.h:113
static constexpr my_size_t NumDims
Definition ScalarExpr.h:104
Op< T, Bits, Arch >::type logical_evalu(my_size_t logical_flat) const noexcept
Definition ScalarExpr.h:139
static constexpr const my_size_t * Dim
Definition ScalarExpr.h:105
Op< T, Bits, Arch >::type evalu(const my_size_t flat) const noexcept
Definition ScalarExpr.h:131
typename EXPR::value_type value_type
Definition ScalarExpr.h:107
static constexpr my_size_t TotalSize
Definition ScalarExpr.h:106
Definition ScalarExpr.h:14
static constexpr const my_size_t * Dim
Definition ScalarExpr.h:24
static constexpr my_size_t NumDims
Definition ScalarExpr.h:23
typename EXPR::value_type value_type
Definition ScalarExpr.h:26
static constexpr my_size_t TotalSize
Definition ScalarExpr.h:25
auto operator()(const my_size_t *indices) const noexcept
Definition ScalarExpr.h:81
my_size_t getDim(my_size_t i) const
Definition ScalarExpr.h:70
auto operator()(my_size_t(&indices)[length]) const noexcept
Definition ScalarExpr.h:41
const EXPR & expr() const noexcept
Definition ScalarExpr.h:31
my_size_t getNumDims() const noexcept
Definition ScalarExpr.h:65
ScalarT scalar() const noexcept
Definition ScalarExpr.h:32
Op< T, Bits, Arch >::type logical_evalu(my_size_t logical_flat) const noexcept
Definition ScalarExpr.h:58
Op< T, Bits, Arch >::type evalu(const my_size_t flat) const noexcept
Definition ScalarExpr.h:50
bool may_alias(const Output &output) const noexcept
Definition ScalarExpr.h:35
my_size_t getTotalSize() const noexcept
Definition ScalarExpr.h:75
typename EXPR::Layout Layout
Definition ScalarExpr.h:27
ScalarExprRHS(const EXPR &expr, ScalarT scalar)
Definition ScalarExpr.h:29
#define my_size_t
Size/index type used throughout the library.
Definition config.h:126