comment out formatFrom/slice ...
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
944db31e02
commit
7e182ded83
15 changed files with 44 additions and 30 deletions
|
@ -100,7 +100,7 @@ namespace CNORXZ
|
|||
template <class Index>
|
||||
COpRoot<T,Index> CArrayBase<T>::operator()(const Sptr<Index>& i) const
|
||||
{
|
||||
this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
//this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
return coproot(*this, i);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ namespace CNORXZ
|
|||
inline decltype(auto) CArrayBase<T>::operator()(const SPack<Indices...>& pack) const
|
||||
{
|
||||
auto i = mindexPtr(pack);
|
||||
this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
//this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
return coproot(*this, i);
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ namespace CNORXZ
|
|||
inline decltype(auto) CArrayBase<T>::operator()(const DPack& pack) const
|
||||
{
|
||||
auto i = yindexPtr(pack);
|
||||
this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
//this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
return coproot(*this, i);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ namespace CNORXZ
|
|||
template <class Index>
|
||||
OpRoot<T,Index> ArrayBase<T>::operator()(const Sptr<Index>& i)
|
||||
{
|
||||
this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
//this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
return oproot(*this, i);
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ namespace CNORXZ
|
|||
inline decltype(auto) ArrayBase<T>::operator()(const SPack<Indices...>& pack)
|
||||
{
|
||||
auto i = mindexPtr(pack);
|
||||
this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
//this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
return oproot(*this, i);
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ namespace CNORXZ
|
|||
inline decltype(auto) ArrayBase<T>::operator()(const DPack& pack)
|
||||
{
|
||||
auto i = yindexPtr(pack);
|
||||
this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
//this->checkFormatCompatibility(toVec(i->deepFormat()));
|
||||
return oproot(*this, i);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace CNORXZ
|
|||
return UPos(id == this->id() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
template <class Index>
|
||||
decltype(auto) CIndex::formatFrom(const Index& ind) const
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace CNORXZ
|
|||
}
|
||||
return std::make_shared<CIndex>(*this);
|
||||
}
|
||||
|
||||
*/
|
||||
template <class Xpr, class F>
|
||||
decltype(auto) CIndex::ifor(const Xpr& xpr, F&& f) const
|
||||
{
|
||||
|
|
|
@ -47,14 +47,14 @@ namespace CNORXZ
|
|||
CIndex& at(const SizeT& metaPos);
|
||||
COpRoot<SizeT,CIndex> xpr(const Sptr<CIndex>& _this) const;
|
||||
|
||||
SizeT deepFormat() const { return 1; }
|
||||
|
||||
SizeT deepFormat() const;
|
||||
/*
|
||||
template <class Index>
|
||||
decltype(auto) formatFrom(const Index& ind) const;
|
||||
|
||||
template <class Index>
|
||||
decltype(auto) slice(const Sptr<Index>& ind) const;
|
||||
|
||||
*/
|
||||
template <class Xpr, class F = NoF>
|
||||
decltype(auto) ifor(const Xpr& xpr, F&& f) const;
|
||||
|
||||
|
|
|
@ -54,8 +54,7 @@ namespace CNORXZ
|
|||
DType meta() const;
|
||||
DIndex& at(const DType& meta);
|
||||
DXpr<SizeT> xpr(const Sptr<DIndex>& _this) const;
|
||||
|
||||
Vector<SizeT> deepFormat() const { return mI->deepFormat(); }
|
||||
Vector<SizeT> deepFormat() const;
|
||||
|
||||
DXpr<SizeT> ifor(const DXpr<SizeT>& xpr, std::function<SizeT(SizeT,SizeT)>&& f) const;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace CNORXZ
|
|||
decltype(auto) meta() const { return THIS().meta(); }
|
||||
I& at(const MetaType& meta) { return THIS().at(meta); }
|
||||
decltype(auto) xpr(const Sptr<I>& _this) const { return THIS().xpr(_this); }
|
||||
|
||||
/*
|
||||
template <class Index>
|
||||
decltype(auto) formatTo(const Sptr<Index>& ind) const { return ind->formatFrom(THIS()); }
|
||||
|
||||
|
@ -62,7 +62,7 @@ namespace CNORXZ
|
|||
decltype(auto) formatFrom(const Index& ind) const // yes this is const,
|
||||
// changes only MIndex/YIndex format, in this case we can just copy the pointers to the sub-index instances
|
||||
{ return THIS().formatFrom(ind); }
|
||||
|
||||
*/
|
||||
decltype(auto) deepFormat() const { return THIS().deepFormat(); }
|
||||
|
||||
//template <class Index>
|
||||
|
|
|
@ -382,7 +382,7 @@ namespace CNORXZ
|
|||
( [&](auto i) { return mIPack[i]->stepSize(id) * format()[i]; },
|
||||
[](const auto&... ss) { return ( ss + ... ); });
|
||||
}
|
||||
|
||||
/*
|
||||
template <class FormatT, class... Indices>
|
||||
template <class Index>
|
||||
decltype(auto) GMIndex<FormatT,Indices...>::formatFrom(const Index& ind) const
|
||||
|
@ -392,7 +392,7 @@ namespace CNORXZ
|
|||
<< " need index of at least the same dimension, got " << ind.dim());
|
||||
return *this;
|
||||
}
|
||||
|
||||
*/
|
||||
template <class FormatT, class... Indices>
|
||||
String GMIndex<FormatT,Indices...>::stringMeta() const
|
||||
{
|
||||
|
|
|
@ -63,8 +63,8 @@ namespace CNORXZ
|
|||
template <SizeT I>
|
||||
decltype(auto) stepSize(const IndexId<I>& id) const;
|
||||
|
||||
template <class Index>
|
||||
decltype(auto) formatFrom(const Index& ind) const;
|
||||
//template <class Index>
|
||||
//decltype(auto) formatFrom(const Index& ind) const;
|
||||
|
||||
String stringMeta() const;
|
||||
MetaType meta() const;
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace CNORXZ
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
template <typename MetaT, SizeT S>
|
||||
template <class Index>
|
||||
decltype(auto) SIndex<MetaT,S>::formatFrom(const Index& ind) const
|
||||
|
@ -165,7 +165,7 @@ namespace CNORXZ
|
|||
}
|
||||
return std::make_shared<SIndex<MetaType,S>>(*this);
|
||||
}
|
||||
|
||||
*/
|
||||
template <typename MetaT, SizeT S>
|
||||
template <class Xpr, class F>
|
||||
decltype(auto) SIndex<MetaT,S>::ifor(const Xpr& xpr, F&& f) const
|
||||
|
|
|
@ -49,13 +49,13 @@ namespace CNORXZ
|
|||
decltype(auto) xpr(const Sptr<SIndex<MetaType,S>>& _this) const;
|
||||
|
||||
SizeT deepFormat() const;
|
||||
|
||||
/*
|
||||
template <class Index>
|
||||
decltype(auto) formatFrom(const Index& ind) const;
|
||||
|
||||
template <class Index>
|
||||
decltype(auto) slice(const Sptr<Index>& ind) const;
|
||||
|
||||
*/
|
||||
template <class Xpr, class F>
|
||||
decltype(auto) ifor(const Xpr& xpr, F&& f) const;
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace CNORXZ
|
|||
return UPos(id == this->id() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
template <typename MetaType>
|
||||
template <class Index>
|
||||
decltype(auto) UIndex<MetaType>::formatFrom(const Index& ind) const
|
||||
|
@ -174,7 +174,7 @@ namespace CNORXZ
|
|||
}
|
||||
return std::make_shared<UIndex<MetaType>>(*this);
|
||||
}
|
||||
|
||||
*/
|
||||
template <typename MetaType>
|
||||
template <class Xpr, class F>
|
||||
decltype(auto) UIndex<MetaType>::ifor(const Xpr& xpr, F&& f) const
|
||||
|
|
|
@ -56,13 +56,13 @@ namespace CNORXZ
|
|||
decltype(auto) xpr(const Sptr<UIndex<MetaType>>& _this) const;
|
||||
|
||||
SizeT deepFormat() const;
|
||||
|
||||
/*
|
||||
template <class Index>
|
||||
decltype(auto) formatFrom(const Index& ind) const;
|
||||
|
||||
template <class Index>
|
||||
decltype(auto) slice(const Sptr<Index>& ind) const;
|
||||
|
||||
*/
|
||||
template <class Xpr, class F>
|
||||
decltype(auto) ifor(const Xpr& xpr, F&& f) const;
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ namespace CNORXZ
|
|||
Sptr<YRange> range() const;
|
||||
UPos stepSize(const IndexId<0> id) const;
|
||||
|
||||
template <class Index>
|
||||
YIndex formatFrom(const Index& ind) const;
|
||||
//template <class Index>
|
||||
//YIndex formatFrom(const Index& ind) const;
|
||||
|
||||
String stringMeta() const;
|
||||
Vector<DType> meta() const;
|
||||
|
@ -65,7 +65,7 @@ namespace CNORXZ
|
|||
YIndex& operator()();
|
||||
|
||||
const DPack& pack() const;
|
||||
Vector<SizeT> deepFormat() const { CXZ_ERROR("implement!!!"); return Vector<SizeT> {1}; }
|
||||
Vector<SizeT> deepFormat() const;
|
||||
const YFormat& format() const;
|
||||
const YFormat& lexFormat() const;
|
||||
YIndex& setFormat(const YFormat& bs);
|
||||
|
|
|
@ -116,6 +116,10 @@ namespace CNORXZ
|
|||
return coproot(m.data(), _this);
|
||||
}
|
||||
|
||||
SizeT CIndex::deepFormat() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* CRangeFactory *
|
||||
|
|
|
@ -167,6 +167,11 @@ namespace CNORXZ
|
|||
return mI->xpr(_this->xptr());
|
||||
}
|
||||
|
||||
Vector<SizeT> DIndex::deepFormat() const
|
||||
{
|
||||
return mI->deepFormat();
|
||||
}
|
||||
|
||||
DXpr<SizeT> DIndex::ifor(const DXpr<SizeT>& xpr, std::function<SizeT(SizeT,SizeT)>&& f) const
|
||||
{
|
||||
return DXpr<SizeT>(mI->ifor(xpr, std::forward<std::function<SizeT(SizeT,SizeT)>>(f)) );
|
||||
|
|
|
@ -367,6 +367,12 @@ namespace CNORXZ
|
|||
{
|
||||
return mIs;
|
||||
}
|
||||
|
||||
Vector<SizeT> YIndex::deepFormat() const
|
||||
{
|
||||
CXZ_ERROR("implement!!!");
|
||||
return Vector<SizeT> {1};
|
||||
}
|
||||
|
||||
const YFormat& YIndex::format() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue