mpi: rrange: fix operator()

This commit is contained in:
Christian Zimmermann 2024-12-02 12:44:37 -08:00
parent cb8d854f88
commit e619650902

View file

@ -247,6 +247,7 @@ namespace CNORXZ
template <class IndexI, class IndexK> template <class IndexI, class IndexK>
String RIndex<IndexI,IndexK>::stringMeta() const String RIndex<IndexI,IndexK>::stringMeta() const
{ {
CXZ_ASSERT(isSynchronous(), "index not in synchronous position");
const SizeT r = mK->lex()*mRankFormat; const SizeT r = mK->lex()*mRankFormat;
String o; String o;
if(r == getRankNumber()){ if(r == getRankNumber()){
@ -259,6 +260,7 @@ namespace CNORXZ
template <class IndexI, class IndexK> template <class IndexI, class IndexK>
typename RIndex<IndexI,IndexK>::MetaType RIndex<IndexI,IndexK>::meta() const typename RIndex<IndexI,IndexK>::MetaType RIndex<IndexI,IndexK>::meta() const
{ {
CXZ_ASSERT(isSynchronous(), "index not in synchronous position");
MetaType o; MetaType o;
if constexpr(Typemap<MetaType>::exists){ if constexpr(Typemap<MetaType>::exists){
const SizeT r = mK->lex()*mRankFormat; const SizeT r = mK->lex()*mRankFormat;
@ -405,6 +407,9 @@ namespace CNORXZ
} }
} }
} }
else {
mLex = mK->lex() * mI->lmax().val() + mI->lex();
}
//IB::mPos = mK->pos() * mStepRatio + mI->pos(); //IB::mPos = mK->pos() * mStepRatio + mI->pos();
IB::mPos = mK->pos() * mI->pmax().val() + mI->pos(); IB::mPos = mK->pos() * mI->pmax().val() + mI->pos();
return *this; return *this;