Loading bindings/CXX11/cxx11/Variable.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -38,11 +38,11 @@ namespace adios2 } \ \ template <> \ void Variable<T>::SetMemorySelection(const Box<Dims> &selection) \ void Variable<T>::SetMemoryStart(const Dims &memoryStart) \ { \ helper::CheckForNullptr(m_Variable, \ "in call to Variable<T>::SetMemorySelection"); \ m_Variable->SetMemorySelection(selection); \ "in call to Variable<T>::SetMemoryStart"); \ m_Variable->SetMemoryStart(memoryStart); \ } \ \ template <> \ Loading bindings/CXX11/cxx11/Variable.h +10 −6 Original line number Diff line number Diff line Loading @@ -60,12 +60,16 @@ public: void SetSelection(const adios2::Box<adios2::Dims> &selection); /** * Sets the description of the pointer or vector memory given at Put and Get * for non-contiguous memory writes and reads. Most commonly used in I/O of * non ghost-cells into a larger array containing ghost cells. * @param selection input {start, count} of memory to be given at Put or Get */ void SetMemorySelection(const adios2::Box<adios2::Dims> &selection); * Set the local start (offset) point to the memory pointer passed at Put. * Currently not working for calls to Get. * Used for non-contiguous memory writes and reads (e.g. multidimensional * ghost-cells). * @param memoryStart relative local offset to the memory pointer passed at * Put. * e.g. if variable start = {0,0} and there is 1 ghost cell per dimension, * then memoryStart = {1,1} */ void SetMemoryStart(const adios2::Dims &memoryStart); /** * Sets a step selection modifying current startStep, countStep Loading source/adios2/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ add_library(adios2 #helper helper/adiosDynamicBinder.h helper/adiosDynamicBinder.cpp helper/adiosMath.cpp helper/adiosMemory.cpp helper/adiosMPIFunctions.cpp helper/adiosString.cpp helper/adiosSystem.cpp Loading source/adios2/core/Engine.tcc +7 −16 Original line number Diff line number Diff line Loading @@ -185,23 +185,14 @@ void Engine::CommonChecks(Variable<T> &variable, const T *data, data, "for data argument in non-zero count block, " + hint); } if (!variable.m_MemoryStart.empty() && !variable.m_MemoryCount.empty()) { const Box<Dims> selectionBox = helper::StartEndBox(variable.m_Start, variable.m_Count); const Box<Dims> memoryBox = helper::StartEndBox(variable.m_MemoryStart, variable.m_MemoryCount); const Box<Dims> intersectionBox = helper::IntersectionBox(selectionBox, memoryBox); if (intersectionBox.first != selectionBox.first || intersectionBox.second != selectionBox.second) { throw std::invalid_argument( "ERROR: variable start and count do not fall inside " "SetMemorySelection start and count for variable " + variable.m_Name + ", " + hint); } if (!variable.m_MemoryStart.empty() && m_OpenMode == adios2::Mode::Read) { throw std::invalid_argument("ERROR: from Engine " + m_Name + " and Variable " + variable.m_Name + ", Variable<T>::SetMemoryStart not yet " "implemented for Engines in Open Read " "mode, " + hint + "\n"); } } Loading source/adios2/core/Variable.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ namespace core info.Start = m_Start; \ info.Count = m_Count; \ info.MemoryStart = m_MemoryStart; \ info.MemoryCount = m_MemoryCount; \ info.StepsStart = stepsStart; \ info.StepsCount = stepsCount; \ info.Data = const_cast<T *>(data); \ Loading Loading
bindings/CXX11/cxx11/Variable.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -38,11 +38,11 @@ namespace adios2 } \ \ template <> \ void Variable<T>::SetMemorySelection(const Box<Dims> &selection) \ void Variable<T>::SetMemoryStart(const Dims &memoryStart) \ { \ helper::CheckForNullptr(m_Variable, \ "in call to Variable<T>::SetMemorySelection"); \ m_Variable->SetMemorySelection(selection); \ "in call to Variable<T>::SetMemoryStart"); \ m_Variable->SetMemoryStart(memoryStart); \ } \ \ template <> \ Loading
bindings/CXX11/cxx11/Variable.h +10 −6 Original line number Diff line number Diff line Loading @@ -60,12 +60,16 @@ public: void SetSelection(const adios2::Box<adios2::Dims> &selection); /** * Sets the description of the pointer or vector memory given at Put and Get * for non-contiguous memory writes and reads. Most commonly used in I/O of * non ghost-cells into a larger array containing ghost cells. * @param selection input {start, count} of memory to be given at Put or Get */ void SetMemorySelection(const adios2::Box<adios2::Dims> &selection); * Set the local start (offset) point to the memory pointer passed at Put. * Currently not working for calls to Get. * Used for non-contiguous memory writes and reads (e.g. multidimensional * ghost-cells). * @param memoryStart relative local offset to the memory pointer passed at * Put. * e.g. if variable start = {0,0} and there is 1 ghost cell per dimension, * then memoryStart = {1,1} */ void SetMemoryStart(const adios2::Dims &memoryStart); /** * Sets a step selection modifying current startStep, countStep Loading
source/adios2/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ add_library(adios2 #helper helper/adiosDynamicBinder.h helper/adiosDynamicBinder.cpp helper/adiosMath.cpp helper/adiosMemory.cpp helper/adiosMPIFunctions.cpp helper/adiosString.cpp helper/adiosSystem.cpp Loading
source/adios2/core/Engine.tcc +7 −16 Original line number Diff line number Diff line Loading @@ -185,23 +185,14 @@ void Engine::CommonChecks(Variable<T> &variable, const T *data, data, "for data argument in non-zero count block, " + hint); } if (!variable.m_MemoryStart.empty() && !variable.m_MemoryCount.empty()) { const Box<Dims> selectionBox = helper::StartEndBox(variable.m_Start, variable.m_Count); const Box<Dims> memoryBox = helper::StartEndBox(variable.m_MemoryStart, variable.m_MemoryCount); const Box<Dims> intersectionBox = helper::IntersectionBox(selectionBox, memoryBox); if (intersectionBox.first != selectionBox.first || intersectionBox.second != selectionBox.second) { throw std::invalid_argument( "ERROR: variable start and count do not fall inside " "SetMemorySelection start and count for variable " + variable.m_Name + ", " + hint); } if (!variable.m_MemoryStart.empty() && m_OpenMode == adios2::Mode::Read) { throw std::invalid_argument("ERROR: from Engine " + m_Name + " and Variable " + variable.m_Name + ", Variable<T>::SetMemoryStart not yet " "implemented for Engines in Open Read " "mode, " + hint + "\n"); } } Loading
source/adios2/core/Variable.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ namespace core info.Start = m_Start; \ info.Count = m_Count; \ info.MemoryStart = m_MemoryStart; \ info.MemoryCount = m_MemoryCount; \ info.StepsStart = stepsStart; \ info.StepsCount = stepsCount; \ info.Data = const_cast<T *>(data); \ Loading