Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overload NdCopy instead of adding a new argument for the 2.10 release #4377

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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