12#ifndef __cxz_op_types_h__
13#define __cxz_op_types_h__
30 const OpT&
THIS()
const {
return static_cast<const OpT&
>(*this); }
32 constexpr decltype(
auto)
r() {
return THIS(); }
33 constexpr decltype(
auto)
r()
const {
return THIS(); }
35 template <
class F,
class IndexT>
38 template <
class IndexT>
41 template <
class F,
class...
Args>
55 const OpT&
THIS()
const {
return static_cast<const OpT&
>(*this); }
66 {
static constexpr bool value = std::is_base_of<COpInterface<T>,
T>
::value; };
70 {
static constexpr bool value = std::is_base_of<OpInterface<T>,
T>
::value; };
76 template <
typename T,
class IndexT>
89 constexpr decltype(
auto)
operator()(
const PosT& pos)
const;
91 constexpr decltype(
auto)
operator()()
const;
96 const T*
data()
const;
99 const T* mData =
nullptr;
103 template <
typename T,
class IndexT>
106 template <
typename T,
class IndexT>
109 template <
class IndexT,
class Op>
119 template <
class PosT>
120 constexpr decltype(
auto)
operator()(
const PosT& pos)
const;
122 constexpr decltype(
auto)
operator()()
const;
127 constexpr decltype(
auto)
data()
const;
136 template <
class IndexT,
class Op>
139 template <
typename T,
class IndexT>
153 constexpr decltype(
auto)
r();
154 constexpr decltype(
auto)
r()
const;
164 template <
class PosT>
165 constexpr decltype(
auto)
operator()(
const PosT& pos)
const;
167 constexpr decltype(
auto)
operator()()
const;
173 const T*
data()
const;
181 template <
typename T,
class IndexT>
201 template <
class PosT>
202 constexpr decltype(
auto)
operator()(
const PosT& pos)
const;
204 constexpr decltype(
auto)
operator()()
const;
217 template <
typename T,
class IndexT>
220 template <
class F,
class...
Ops>
230 template <
class PosT>
231 constexpr decltype(
auto)
operator()(
const PosT& pos)
const;
233 constexpr decltype(
auto)
operator()()
const;
240 constexpr decltype(
auto) exec(std::index_sequence<Is...>
is)
const;
243 constexpr decltype(
auto) rootStepsi(
const IndexId<I>&
id,
244 std::index_sequence<Is...>
is)
const;
251 template <
class F,
class...
Ops>
254 template <
class Tar,
class Src>
257 template <
class Tar,
class Src>
260 template <
class F,
class...
Ops>
264 template <
class CXpr>
274 template <
class PosT>
275 constexpr decltype(
auto)
operator()(
const PosT& pos)
const;
277 constexpr decltype(
auto)
operator()()
const;
286 template <
class CXpr>
290 template <
class F,
class Op,
class IndexT>
293 template <
class IndexT>
Array base class declarations.
constexpr decltype(auto) c(const Sptr< IndexT > &ind) const
constexpr decltype(auto) o(F &&f, Args &&... args) const
constexpr decltype(auto) r() const
constexpr decltype(auto) c(F &&f, const Sptr< IndexT > &ind) const
constexpr COpInterface()=default
constexpr decltype(auto) r()
constexpr COpRoot & init(const T *data, const Sptr< IndexT > &ind)
constexpr decltype(auto) rootSteps(const IndexId< I > &id) const
constexpr COpRoot()=default
OpInterface< COpRoot< T, IndexT > > OI
constexpr Contraction()=default
constexpr decltype(auto) rootSteps(const IndexId< I > &id) const
OpInterface< Contraction< CXpr > > OI
constexpr OpCont & operator+=(const Op &in)
OpInterface< OpCont< T, IndexT > > OI
constexpr OpCont & operator=(const Op &in)
Container< T, index_const_size< IndexT >::value, index_has_const_size< IndexT >::value >::type CT
constexpr decltype(auto) rootSteps(const IndexId< I > &id) const
constexpr OpCont & init(const Sptr< IndexT > &ind)
constexpr OpCont()=default
constexpr decltype(auto) r()
constexpr decltype(auto) ax(const Sptr< IndexT > &ind, F &&f, const Args &... args)
constexpr OpInterface()=default
void a(const Sptr< IndexT > &ind, F &&f, const Args &... args)
constexpr OpRoot & operator+=(const Op &in)
constexpr decltype(auto) rootSteps(const IndexId< I > &id) const
constexpr OpRoot()=default
constexpr OpRoot & init(T *data, const Sptr< IndexT > &ind)
constexpr OpRoot & operator=(const Op &in)
OpInterface< OpRoot< T, IndexT > > OI
OpInterface< Operation< F, Ops... > > OI
constexpr decltype(auto) rootSteps(const IndexId< I > &id) const
constexpr Operation()=default
constexpr decltype(auto) rootSteps(const IndexId< I > &id) const
constexpr decltype(auto) data() const
constexpr POpRoot()=default
COpInterface< POpRoot< IndexT, Op > > OI
constexpr decltype(auto) indexOp(const Sptr< IndexT > &i)
constexpr decltype(auto) poproot(const Sptr< IndexT > &ind, const SizeT *parts, Op &&op)
constexpr decltype(auto) coproot(const CArrayBase< T > &a, const Sptr< IndexT > &ind)
std::vector< T, Allocator< T > > Vector
constexpr decltype(auto) contraction(F &&f, Op &&op, const Sptr< IndexT > &i)
Sptr< Range > rangeCast(const RangePtr r)
constexpr decltype(auto) operation(F &&f, const Ops &... ops)
constexpr decltype(auto) assignxpr(const Tar &tar, const Src &src)
std::shared_ptr< T > Sptr
constexpr decltype(auto) oproot(ArrayBase< T > &a, const Sptr< IndexT > &ind)
static constexpr bool value
static constexpr bool value
static constexpr SizeT value
Xpression base declarations.