CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
buf_xpr.cc.h
Go to the documentation of this file.
1// -*- C++ -*-
12#include "buf_xpr.h"
13
14namespace CNORXZ
15{
16 template <typename T, class IXprF>
18 mBuf(in.mBuf),
19 mIXprF(in.mIXprF),
20 mIXpr(mIXprF(mBuf))
21 {}
22
23 template <typename T, class IXprF>
25 mBuf(std::move(in.mBuf)),
26 mIXprF(std::move(in.mIXprF)),
27 mIXpr(mIXprF(mBuf))
28 {}
29
30 template <typename T, class IXprF>
32 {
33 mBuf = in.mBuf;
34 mIXprF = in.mIXprF;
35 mIXpr = mIXprF(mBuf);
36 return *this;
37 }
38
39 template <typename T, class IXprF>
41 {
42 mBuf = std::move(in.mBuf);
43 mIXprF = std::move(in.mIXprF);
44 mIXpr = mIXprF(mBuf);
45 return *this;
46 }
47
48 template <typename T, class IXprF>
50 mIXprF(std::forward<IXprF>(ixprf)),
51 mIXpr(mIXprF(mBuf))
52 {}
53
54 template <typename T, class IXprF>
55 template <class PosT>
56 inline decltype(auto) BufXpr<T,IXprF>::operator()(const PosT& last) const
57 {
58 mIXpr(last);
59 return mBuf;
60 }
61
62 template <typename T, class IXprF>
63 inline decltype(auto) BufXpr<T,IXprF>::operator()() const
64 {
65 mIXpr();
66 return mBuf;
67 }
68
69 template <typename T, class IXprF>
70 template <SizeT I>
71 inline decltype(auto) BufXpr<T,IXprF>::rootSteps(const IndexId<I>& id) const
72 {
73 return mIXpr.rootSteps(id);
74 }
75
76 template <typename T, class IXprF>
77 constexpr decltype(auto) bufxpr(IXprF&& ixprf)
78 {
79 return BufXpr<T,IXprF>( std::forward<IXprF>(ixprf) );
80 }
81}
Buffer xpression declarations.
BufXpr()=default
BufXpr & operator=(const BufXpr &in)
Definition buf_xpr.cc.h:31
decltype(auto) rootSteps(const IndexId< I > &id) const
Definition buf_xpr.cc.h:71
constexpr decltype(auto) bufxpr(IXprF &&ixprf)
Definition buf_xpr.cc.h:77
Sptr< Range > rangeCast(const RangePtr r)