Loading bindings/C/c/adios2_c_FILE.cpp +5 −10 Original line number Diff line number Diff line Loading @@ -103,8 +103,7 @@ adios2_FILE *adios2_fopen_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen")); adios2::helper::ExceptionToError("adios2_fopen"); } return stream; } Loading @@ -128,8 +127,7 @@ adios2_FILE *adios2_fopen_config_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen_config")); adios2::helper::ExceptionToError("adios2_fopen_config"); } return stream; } Loading Loading @@ -164,8 +162,7 @@ adios2_FILE *adios2_fopen_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen")); adios2::helper::ExceptionToError("adios2_fopen"); } return stream; } Loading @@ -189,8 +186,7 @@ adios2_FILE *adios2_fopen_config_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen_config")); adios2::helper::ExceptionToError("adios2_fopen_config"); } return stream; } Loading Loading @@ -433,8 +429,7 @@ adios2_step *adios2_fgets(adios2_step *step, adios2_FILE *stream) } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fgets")); adios2::helper::ExceptionToError("adios2_fgets"); } return step; } Loading bindings/CXX11/cxx11/Variable.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,14 @@ namespace adios2 } \ \ template <> \ void Variable<T>::SetBlockSelection(const size_t blockID) \ { \ helper::CheckForNullptr(m_Variable, \ "in call to Variable<T>::SetBlockSelection"); \ m_Variable->SetBlockSelection(blockID); \ } \ \ template <> \ void Variable<T>::SetSelection(const Box<Dims> &selection) \ { \ helper::CheckForNullptr(m_Variable, \ Loading Loading @@ -134,6 +142,14 @@ namespace adios2 } \ \ template <> \ size_t Variable<T>::BlockID() const \ { \ helper::CheckForNullptr(m_Variable, \ "in call to Variable<T>::BlockID"); \ return m_Variable->m_BlockID; \ } \ \ template <> \ size_t Variable<T>::AddOperation(const Operator op, \ const Params ¶meters) \ { \ Loading bindings/CXX11/cxx11/Variable.h +17 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,16 @@ public: */ void SetShape(const adios2::Dims &shape); /** * Read mode only. Required for reading local variables, ShapeID() = * ShapeID::LocalArray or ShapeID::LocalValue. For Global Arrays it will Set * the appropriate Start and Count Selection for the global array * coordinates. * @param blockID: variable block index defined at write time. Blocks can be * inspected with bpls -D variableName */ void SetBlockSelection(const size_t blockID); /** * Sets a variable selection modifying current {start, count} * Count is the dimension from Start point Loading Loading @@ -153,6 +163,13 @@ public: */ size_t StepsStart() const; /** * For read mode, retrieve current BlockID, default = 0 if not set with * SetBlockID * @return current block id */ size_t BlockID() const; /** * EXPERIMENTAL: carries information about an Operation added with * AddOperation Loading source/adios2/ADIOSTypes.h +7 −6 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ namespace adios2 * DefineVariable */ enum class ShapeID { Unknown, ///< undefined shapeID GlobalValue, ///< single global value, common case GlobalArray, ///< global (across MPI_Comm) array, common case JoinedArray, ///< global array with a common (joinable) dimension Loading Loading @@ -136,8 +137,8 @@ using std::uint64_t; using cfloat = std::complex<float>; using cdouble = std::complex<double>; // Limit constexpr size_t MaxSizeT = std::numeric_limits<size_t>::max(); // Limit, using uint64_t to make it portable constexpr uint64_t MaxSizeT = std::numeric_limits<uint64_t>::max(); // adios defaults #ifdef _WIN32 Loading @@ -153,7 +154,7 @@ constexpr size_t DefaultInitialBufferSize = 16 * 1024; /** default maximum bp buffer size, unlimited, in bytes. * Needs to be studied for optimizing applications */ constexpr size_t DefaultMaxBufferSize = MaxSizeT - 1; constexpr uint64_t DefaultMaxBufferSize = MaxSizeT - 1; /** default buffer growth factor. Needs to be studied * for optimizing applications*/ Loading @@ -174,9 +175,9 @@ constexpr char PathSeparator = constexpr bool DebugON = true; constexpr bool DebugOFF = false; constexpr size_t UnknownDim = 0; constexpr size_t JoinedDim = MaxSizeT - 1; constexpr size_t LocalValueDim = MaxSizeT - 2; constexpr size_t IrregularDim = MaxSizeT - 3; constexpr uint64_t JoinedDim = MaxSizeT - 1; constexpr uint64_t LocalValueDim = MaxSizeT - 2; constexpr uint64_t IrregularDim = MaxSizeT - 3; constexpr bool ConstantDims = true; constexpr bool endl = true; Loading source/adios2/core/Variable.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ namespace core info.Shape = m_Shape; \ info.Start = m_Start; \ info.Count = m_Count; \ info.BlockID = m_BlockID; \ info.Selection = m_SelectionType; \ info.MemoryStart = m_MemoryStart; \ info.MemoryCount = m_MemoryCount; \ info.StepsStart = stepsStart; \ Loading Loading
bindings/C/c/adios2_c_FILE.cpp +5 −10 Original line number Diff line number Diff line Loading @@ -103,8 +103,7 @@ adios2_FILE *adios2_fopen_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen")); adios2::helper::ExceptionToError("adios2_fopen"); } return stream; } Loading @@ -128,8 +127,7 @@ adios2_FILE *adios2_fopen_config_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen_config")); adios2::helper::ExceptionToError("adios2_fopen_config"); } return stream; } Loading Loading @@ -164,8 +162,7 @@ adios2_FILE *adios2_fopen_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen")); adios2::helper::ExceptionToError("adios2_fopen"); } return stream; } Loading @@ -189,8 +186,7 @@ adios2_FILE *adios2_fopen_config_glue(const char *name, const char *mode, } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fopen_config")); adios2::helper::ExceptionToError("adios2_fopen_config"); } return stream; } Loading Loading @@ -433,8 +429,7 @@ adios2_step *adios2_fgets(adios2_step *step, adios2_FILE *stream) } catch (...) { static_cast<adios2_error>( adios2::helper::ExceptionToError("adios2_fgets")); adios2::helper::ExceptionToError("adios2_fgets"); } return step; } Loading
bindings/CXX11/cxx11/Variable.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,14 @@ namespace adios2 } \ \ template <> \ void Variable<T>::SetBlockSelection(const size_t blockID) \ { \ helper::CheckForNullptr(m_Variable, \ "in call to Variable<T>::SetBlockSelection"); \ m_Variable->SetBlockSelection(blockID); \ } \ \ template <> \ void Variable<T>::SetSelection(const Box<Dims> &selection) \ { \ helper::CheckForNullptr(m_Variable, \ Loading Loading @@ -134,6 +142,14 @@ namespace adios2 } \ \ template <> \ size_t Variable<T>::BlockID() const \ { \ helper::CheckForNullptr(m_Variable, \ "in call to Variable<T>::BlockID"); \ return m_Variable->m_BlockID; \ } \ \ template <> \ size_t Variable<T>::AddOperation(const Operator op, \ const Params ¶meters) \ { \ Loading
bindings/CXX11/cxx11/Variable.h +17 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,16 @@ public: */ void SetShape(const adios2::Dims &shape); /** * Read mode only. Required for reading local variables, ShapeID() = * ShapeID::LocalArray or ShapeID::LocalValue. For Global Arrays it will Set * the appropriate Start and Count Selection for the global array * coordinates. * @param blockID: variable block index defined at write time. Blocks can be * inspected with bpls -D variableName */ void SetBlockSelection(const size_t blockID); /** * Sets a variable selection modifying current {start, count} * Count is the dimension from Start point Loading Loading @@ -153,6 +163,13 @@ public: */ size_t StepsStart() const; /** * For read mode, retrieve current BlockID, default = 0 if not set with * SetBlockID * @return current block id */ size_t BlockID() const; /** * EXPERIMENTAL: carries information about an Operation added with * AddOperation Loading
source/adios2/ADIOSTypes.h +7 −6 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ namespace adios2 * DefineVariable */ enum class ShapeID { Unknown, ///< undefined shapeID GlobalValue, ///< single global value, common case GlobalArray, ///< global (across MPI_Comm) array, common case JoinedArray, ///< global array with a common (joinable) dimension Loading Loading @@ -136,8 +137,8 @@ using std::uint64_t; using cfloat = std::complex<float>; using cdouble = std::complex<double>; // Limit constexpr size_t MaxSizeT = std::numeric_limits<size_t>::max(); // Limit, using uint64_t to make it portable constexpr uint64_t MaxSizeT = std::numeric_limits<uint64_t>::max(); // adios defaults #ifdef _WIN32 Loading @@ -153,7 +154,7 @@ constexpr size_t DefaultInitialBufferSize = 16 * 1024; /** default maximum bp buffer size, unlimited, in bytes. * Needs to be studied for optimizing applications */ constexpr size_t DefaultMaxBufferSize = MaxSizeT - 1; constexpr uint64_t DefaultMaxBufferSize = MaxSizeT - 1; /** default buffer growth factor. Needs to be studied * for optimizing applications*/ Loading @@ -174,9 +175,9 @@ constexpr char PathSeparator = constexpr bool DebugON = true; constexpr bool DebugOFF = false; constexpr size_t UnknownDim = 0; constexpr size_t JoinedDim = MaxSizeT - 1; constexpr size_t LocalValueDim = MaxSizeT - 2; constexpr size_t IrregularDim = MaxSizeT - 3; constexpr uint64_t JoinedDim = MaxSizeT - 1; constexpr uint64_t LocalValueDim = MaxSizeT - 2; constexpr uint64_t IrregularDim = MaxSizeT - 3; constexpr bool ConstantDims = true; constexpr bool endl = true; Loading
source/adios2/core/Variable.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ namespace core info.Shape = m_Shape; \ info.Start = m_Start; \ info.Count = m_Count; \ info.BlockID = m_BlockID; \ info.Selection = m_SelectionType; \ info.MemoryStart = m_MemoryStart; \ info.MemoryCount = m_MemoryCount; \ info.StepsStart = stepsStart; \ Loading