Skip to content

Commit

Permalink
Add the VariableExprStr function in the CampaignReader class so bpls …
Browse files Browse the repository at this point in the history
…can show the expression (ornladios#4401)
  • Loading branch information
anagainaru authored Nov 17, 2024
1 parent a902da6 commit 64218a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/adios2/engine/campaign/CampaignReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@ bool CampaignReader::VariableMinMax(const VariableBase &Var, const size_t Step,
return false;
}

std::string CampaignReader::VariableExprStr(const VariableBase &Var)
{
auto it = m_VarInternalInfo.find(Var.m_Name);
if (it != m_VarInternalInfo.end())
{
VariableBase *vb = reinterpret_cast<VariableBase *>(it->second.originalVar);
Engine *e = m_Engines[it->second.engineIdx];
return e->VariableExprStr(*vb);
}
return "";
}

#define declare_type(T) \
void CampaignReader::DoGetSync(Variable<T> &variable, T *data) \
{ \
Expand Down
1 change: 1 addition & 0 deletions source/adios2/engine/campaign/CampaignReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class CampaignReader : public Engine
MinVarInfo *MinBlocksInfo(const VariableBase &, const size_t Step) const;
bool VarShape(const VariableBase &Var, const size_t Step, Dims &Shape) const;
bool VariableMinMax(const VariableBase &, const size_t Step, MinMaxStruct &MinMax);
std::string VariableExprStr(const VariableBase &Var);

private:
UserOptions::Campaign m_Options;
Expand Down

0 comments on commit 64218a2

Please sign in to comment.