2022-10-13 19:12:23 +02:00
|
|
|
|
|
|
|
#ifndef __cxz_xpr_base_cc_h__
|
|
|
|
#define __cxz_xpr_base_cc_h__
|
|
|
|
|
|
|
|
#include "xpr_base.h"
|
|
|
|
|
|
|
|
namespace CNORXZ
|
|
|
|
{
|
|
|
|
|
|
|
|
/************
|
|
|
|
* VXpr *
|
|
|
|
************/
|
|
|
|
|
|
|
|
template <class Xpr>
|
|
|
|
VXpr<Xpr>::VXpr(const XprInterface<Xpr>& a) :
|
|
|
|
Xpr(a.THIS())
|
|
|
|
{}
|
|
|
|
|
|
|
|
template <class Xpr>
|
|
|
|
Uptr<VXprBase> VXpr<Xpr>::copy() const
|
|
|
|
{
|
|
|
|
return std::make_unique<VXpr<Xpr>>(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Xpr>
|
2022-10-16 00:55:14 +02:00
|
|
|
SizeT VXpr<Xpr>::vexec(const UPos& mlast, const DPos& last) const
|
2022-10-13 19:12:23 +02:00
|
|
|
{
|
|
|
|
return (*this)(mlast, last);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Xpr>
|
2022-10-16 00:55:14 +02:00
|
|
|
SizeT VXpr<Xpr>::vexec() const
|
2022-10-13 19:12:23 +02:00
|
|
|
{
|
2022-10-16 00:55:14 +02:00
|
|
|
return (*this)();
|
2022-10-13 19:12:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class Xpr>
|
2022-10-16 18:37:14 +02:00
|
|
|
DPos VXpr<Xpr>::vrootSteps(const IndexId<0>& id) const
|
2022-10-13 19:12:23 +02:00
|
|
|
{
|
|
|
|
return DPos(this->rootSteps(ptrId));
|
|
|
|
}
|
|
|
|
|
|
|
|
/************
|
|
|
|
* DXpr *
|
|
|
|
************/
|
|
|
|
|
|
|
|
template <class Xpr>
|
|
|
|
explicit DXpr::DXpr(const Xpr& a) :
|
|
|
|
ObjHandle<VXprBase>(VXpr<Xpr>(a))
|
|
|
|
{}
|
|
|
|
|
|
|
|
template <class PosT>
|
2022-10-16 00:55:14 +02:00
|
|
|
inline SizeT DXpr::operator()(const UPos& mlast, const PosT& last) const
|
2022-10-13 19:12:23 +02:00
|
|
|
{
|
|
|
|
DPosRef dlast(&last);
|
|
|
|
return mC->vexec(mlast, dlast);
|
|
|
|
}
|
|
|
|
|
2022-10-16 00:55:14 +02:00
|
|
|
inline SizeT DXpr::operator()() const
|
2022-10-13 19:12:23 +02:00
|
|
|
{
|
2022-10-16 00:55:14 +02:00
|
|
|
return mC->vexec();
|
2022-10-13 19:12:23 +02:00
|
|
|
}
|
|
|
|
|
2022-10-16 18:37:14 +02:00
|
|
|
template <SizeT I>
|
|
|
|
inline DPos DXpr::rootSteps(const IndexId<I>& id) const
|
2022-10-13 19:12:23 +02:00
|
|
|
{
|
2022-10-16 18:37:14 +02:00
|
|
|
return mC->rootSteps(IndexId<0>(id.id()));
|
2022-10-13 19:12:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|