CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
xpr_base.cc.h
Go to the documentation of this file.
1// -*- C++ -*-
12#ifndef __cxz_xpr_base_cc_h__
13#define __cxz_xpr_base_cc_h__
14
15#include "xpr_base.h"
16
17namespace CNORXZ
18{
19
20 /*==========+
21 | VXpr |
22 +==========*/
23
24 template <typename T, class Xpr>
26 Xpr(a.THIS())
27 {}
28
29 template <typename T, class Xpr>
31 {
32 return std::make_unique<VXpr<T,Xpr>>(*this);
33 }
34
35 template <typename T, class Xpr>
37 {
38 return (*this)(last);
39 }
40
41 template <typename T, class Xpr>
43 {
44 return (*this)();
45 }
46
47 template <typename T, class Xpr>
49 {
50 return DPos(this->rootSteps(id));
51 }
52
53 /*==========+
54 | DXpr |
55 +==========*/
56
57 template <typename T>
58 template <class Xpr>
59 DXpr<T>::DXpr(const Xpr& a) :
60 ObjHandle<VXprBase<T>>(std::make_unique<VXpr<T,Xpr>>(a))
61 {}
62
63 template <typename T>
64 inline T DXpr<T>::operator()(const DPos& last) const
65 {
66 return VB::mC->vexec(last);
67 }
68
69 template <typename T>
70 inline T DXpr<T>::operator()() const
71 {
72 return VB::mC->vexec();
73 }
74
75 template <typename T>
76 template <SizeT I>
77 inline DPos DXpr<T>::rootSteps(const IndexId<I>& id) const
78 {
79 return VB::mC->vrootSteps(IndexId<0>(id.id()));
80 }
81}
82
83#endif
DPos rootSteps(const IndexId< I > &id) const
Definition xpr_base.cc.h:77
DXpr(const Xpr &a)
Definition xpr_base.cc.h:59
T operator()() const
Definition xpr_base.cc.h:70
virtual T vexec(const DPos &last) const =0
virtual T vexec() const override final
Definition xpr_base.cc.h:42
virtual Uptr< VXprBase< T > > copy() const override final
Definition xpr_base.cc.h:30
virtual DPos vrootSteps(const IndexId< 0 > &id) const override final
Definition xpr_base.cc.h:48
VXpr(const XprInterface< Xpr > &a)
Definition xpr_base.cc.h:25
std::unique_ptr< T > Uptr
Definition types.h:54
Sptr< Range > rangeCast(const RangePtr r)
Xpression base declarations.