mindex: copy sub-index instances in copy constr/assign + mpi: fixes

This commit is contained in:
Christian Zimmermann 2024-10-19 21:15:26 -07:00
parent 03afacb1e5
commit 462be41f1d
3 changed files with 11 additions and 2 deletions

View file

@ -169,6 +169,9 @@ namespace CNORXZ
mLMax(mkLMax(mIPack)),
mPMax(mkPMax(mIPack,mFormat))
{
mIPack = iter<0,sizeof...(Indices)>
( [&](auto j) { return i.pack()[j]; },
[](const auto&... e) { return SPack<Indices...>(std::make_shared<Indices>(*e) ...); } );
*this = i.lex();
}
@ -182,6 +185,10 @@ namespace CNORXZ
mFormat = i.mFormat;
mLMax = mkLMax(mIPack);
mPMax = mkPMax(mIPack,mFormat);
//iter<0,sizeof...(Indices)>( [&](auto j) { *mIPack[j] = *i.pack()[j]; }, NoF {} );
mIPack = iter<0,sizeof...(Indices)>
( [&](auto j) { return i.pack()[j]; },
[](const auto&... e) { return SPack<Indices...>(std::make_shared<Indices>(*e) ...); } );
return *this = i.lex();
}

View file

@ -149,6 +149,7 @@ namespace CNORXZ
mPMax(mkPMax()),
mLMax(mkLMax())
{
// TODO: copy sub-index instances!!!
*this = i.lex();
}
@ -161,6 +162,7 @@ namespace CNORXZ
mLexFormat = i.mLexFormat;
mPMax = mkPMax();
mLMax = mkLMax();
// TODO: copy sub-index instances!!!
return *this = i.lex();
}

View file

@ -247,7 +247,7 @@ namespace CNORXZ
template <class IndexI, class IndexK>
String RIndex<IndexI,IndexK>::stringMeta() const
{
const SizeT r = mK->lex();
const SizeT r = mK->lex()*mRankFormat;
String o;
if(r == getRankNumber()){
o = mI->stringMeta();
@ -261,7 +261,7 @@ namespace CNORXZ
{
MetaType o;
if constexpr(Typemap<MetaType>::exists){
const SizeT r = mK->lex();
const SizeT r = mK->lex()*mRankFormat;
if(r == getRankNumber()){
o = mI->meta();
}