ADIOS2
ADIOS2 copied to clipboard
Are Steps() bindings consistent?
I was looking at an old issue #987 about Python Steps() and trying to figure out if it was outdated. I suspect so, but I noticed what may be an inconsistency. In Py11Variable.cpp, the Steps() and StepsStart() functions are implemented like this:
size_t Variable::Steps() const
{
helper::CheckForNullptr(m_VariableBase, "in call to Variable::Steps");
return m_VariableBase->m_StepsCount;
}
size_t Variable::StepsStart() const
{
helper::CheckForNullptr(m_VariableBase, "in call to Variable::StepsStart");
return m_VariableBase->m_StepsStart;
}
but in the C++ bindings the use a different member variable:
template <> \
size_t Variable<T>::Steps() const \
{ \
helper::CheckForNullptr(m_Variable, "in call to Variable<T>::Steps"); \
return m_Variable->m_AvailableStepsCount; \
} \
\
template <> \
size_t Variable<T>::StepsStart() const \
{ \
helper::CheckForNullptr(m_Variable, "in call to Variable<T>::StepsStart"); \
return m_Variable->m_AvailableStepsStart; \
}
Which is right? I suspect the Python bindings are broken because it looks like m_StepsCount/Start are set in SetStepSelection(), so that would have just come from the application, no reason for a Steps() call to retrieve it. This needs to be fixed and probably the python bindings gone over with a fine-toothed comb...