From ee1ee295d6397e267564bfc7d673896a2355a8e6 Mon Sep 17 00:00:00 2001 From: anagainaru Date: Thu, 24 Oct 2024 12:29:21 -0400 Subject: [PATCH] Overload NdCopy instead of adding a new argument for the 2.10 release --- source/adios2/helper/adiosMemory.cpp | 11 +++++++++++ source/adios2/helper/adiosMemory.h | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/source/adios2/helper/adiosMemory.cpp b/source/adios2/helper/adiosMemory.cpp index 211f109674..53910e01c2 100644 --- a/source/adios2/helper/adiosMemory.cpp +++ b/source/adios2/helper/adiosMemory.cpp @@ -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 diff --git a/source/adios2/helper/adiosMemory.h b/source/adios2/helper/adiosMemory.h index 7c56dd9823..d7decb17ce 100644 --- a/source/adios2/helper/adiosMemory.h +++ b/source/adios2/helper/adiosMemory.h @@ -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 size_t PayloadSize(const T *data, const Dims &count) noexcept;