Skip to content

Commit

Permalink
Overload NdCopy instead of adding a new argument for the 2.10 release
Browse files Browse the repository at this point in the history
  • Loading branch information
anagainaru authored and vicentebolea committed Oct 24, 2024
1 parent d8e8822 commit fbd9036
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/adios2/helper/adiosMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,18 @@ int NdCopy(const char *in, const CoreDims &inStart, const CoreDims &inCount,
const bool outIsLittleEndian, const int typeSize, const CoreDims &inMemStart,
const CoreDims &inMemCount, const CoreDims &outMemStart, const CoreDims &outMemCount,
const bool safeMode, MemorySpace MemSpace)
{
return NdCopy(in, inStart, inCount, inIsRowMajor, inIsLittleEndian, out, outStart, outCount,
outIsRowMajor, outIsLittleEndian, typeSize, inMemStart, inMemCount, outMemStart,
outMemCount, safeMode, MemSpace, false);
}

int NdCopy(const char *in, const CoreDims &inStart, const CoreDims &inCount,
const bool inIsRowMajor, const bool inIsLittleEndian, char *out,
const CoreDims &outStart, const CoreDims &outCount, const bool outIsRowMajor,
const bool outIsLittleEndian, const int typeSize, const CoreDims &inMemStart,
const CoreDims &inMemCount, const CoreDims &outMemStart, const CoreDims &outMemCount,
const bool safeMode, const MemorySpace MemSpace, const bool duringWrite)
{

// use values of ioStart and ioCount if ioMemStart and ioMemCount are
Expand Down
7 changes: 7 additions & 0 deletions source/adios2/helper/adiosMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@ int NdCopy(const char *in, const CoreDims &inStart, const CoreDims &inCount,
const CoreDims &outMemStart = CoreDims(), const CoreDims &outMemCount = CoreDims(),
const bool safeMode = false, MemorySpace MemSpace = MemorySpace::Host);

int NdCopy(const char *in, const CoreDims &inStart, const CoreDims &inCount,
const bool inIsRowMajor, const bool inIsLittleEndian, char *out,
const CoreDims &outStart, const CoreDims &outCount, const bool outIsRowMajor,
const bool outIsLittleEndian, const int typeSize, const CoreDims &inMemStart,
const CoreDims &inMemCount, const CoreDims &outMemStart, const CoreDims &outMemCount,
const bool safeMode, const MemorySpace MemSpace, const bool duringWrite);

template <class T>
size_t PayloadSize(const T *data, const Dims &count) noexcept;

Expand Down

0 comments on commit fbd9036

Please sign in to comment.