Skip to content

Commit

Permalink
Put MAX_DIMS in helper, in adiosMemory.h, to specify the maximum numb…
Browse files Browse the repository at this point in the history
…er of dimensions that can be handled
  • Loading branch information
eisenhauer committed Mar 15, 2022
1 parent 7b9e349 commit 8eaa40a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions source/adios2/helper/adiosMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace adios2
namespace helper
{

const size_t MAX_DIMS = 32;

#ifdef ADIOS2_HAVE_ENDIAN_REVERSE
template <class T>
void CopyEndianReverse(const char *src, const size_t payloadStride, T *dest);
Expand Down
6 changes: 3 additions & 3 deletions source/adios2/toolkit/format/bp5/BP5Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "adios2/operator/OperatorFactory.h"

#include <array>
#include <float.h>
#include <limits.h>
#include <math.h>
Expand Down Expand Up @@ -1148,9 +1149,8 @@ BP5Deserializer::GenerateReadRequests()
for (size_t Block = 0; Block < writer_meta_base->BlockCount;
Block++)
{
#define maxdims 10
size_t intersectionstart[maxdims];
size_t intersectioncount[maxdims];
std::array<size_t, helper::MAX_DIMS> intersectionstart;
std::array<size_t, helper::MAX_DIMS> intersectioncount;

size_t StartDim = Block * Req->VarRec->DimCount;
if (IntersectionStartCount(
Expand Down

0 comments on commit 8eaa40a

Please sign in to comment.