-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
From 5f9bdb4e42a108ec19c2bf4034a3a2ddb0c5d951 Mon Sep 17 00:00:00 2001 | ||
From: Kai Germaschewski <[email protected]> | ||
Date: Sat, 29 Jun 2019 05:35:24 -0400 | ||
Subject: [PATCH] fix MSVC/conda build | ||
|
||
This simply renames `helper::CopyMemory` to `helper::CopyMemoryBlock` to | ||
avoid a name clash with the `CopyMemory` defined in the MSVC build in #1485. | ||
--- | ||
source/adios2/helper/adiosMemory.h | 16 ++++++++-------- | ||
source/adios2/helper/adiosMemory.inl | 12 ++++++------ | ||
.../adios2/toolkit/format/bp3/BP3Serializer.tcc | 2 +- | ||
.../adios2/toolkit/format/bp4/BP4Serializer.tcc | 2 +- | ||
4 files changed, 16 insertions(+), 16 deletions(-) | ||
|
||
diff --git a/source/adios2/helper/adiosMemory.h b/source/adios2/helper/adiosMemory.h | ||
index 91d5f1353..44a773c1b 100644 | ||
--- a/source/adios2/helper/adiosMemory.h | ||
+++ b/source/adios2/helper/adiosMemory.h | ||
@@ -111,14 +111,14 @@ T ReadValue(const std::vector<char> &buffer, size_t &position, | ||
* @param srcMemCount | ||
*/ | ||
template <class T, class U> | ||
-void CopyMemory(T *dest, const Dims &destStart, const Dims &destCount, | ||
- const bool destRowMajor, const U *src, const Dims &srcStart, | ||
- const Dims &srcCount, const bool srcRowMajor, | ||
- const bool endianReverse = false, | ||
- const Dims &destMemStart = Dims(), | ||
- const Dims &destMemCount = Dims(), | ||
- const Dims &srcMemStart = Dims(), | ||
- const Dims &srcMemCount = Dims()) noexcept; | ||
+void CopyMemoryBlock(T *dest, const Dims &destStart, const Dims &destCount, | ||
+ const bool destRowMajor, const U *src, | ||
+ const Dims &srcStart, const Dims &srcCount, | ||
+ const bool srcRowMajor, const bool endianReverse = false, | ||
+ const Dims &destMemStart = Dims(), | ||
+ const Dims &destMemCount = Dims(), | ||
+ const Dims &srcMemStart = Dims(), | ||
+ const Dims &srcMemCount = Dims()) noexcept; | ||
|
||
void CopyPayload(char *dest, const Dims &destStart, const Dims &destCount, | ||
const bool destRowMajor, const char *src, const Dims &srcStart, | ||
diff --git a/source/adios2/helper/adiosMemory.inl b/source/adios2/helper/adiosMemory.inl | ||
index e130030e9..7ff9d88de 100644 | ||
--- a/source/adios2/helper/adiosMemory.inl | ||
+++ b/source/adios2/helper/adiosMemory.inl | ||
@@ -252,12 +252,12 @@ void ClipVector(std::vector<T> &vec, const size_t start, | ||
} | ||
|
||
template <class T, class U> | ||
-void CopyMemory(T *dest, const Dims &destStart, const Dims &destCount, | ||
- const bool destRowMajor, const U *src, const Dims &srcStart, | ||
- const Dims &srcCount, const bool srcRowMajor, | ||
- const bool endianReverse, const Dims &destMemStart, | ||
- const Dims &destMemCount, const Dims &srcMemStart, | ||
- const Dims &srcMemCount) noexcept | ||
+void CopyMemoryBlock(T *dest, const Dims &destStart, const Dims &destCount, | ||
+ const bool destRowMajor, const U *src, | ||
+ const Dims &srcStart, const Dims &srcCount, | ||
+ const bool srcRowMajor, const bool endianReverse, | ||
+ const Dims &destMemStart, const Dims &destMemCount, | ||
+ const Dims &srcMemStart, const Dims &srcMemCount) noexcept | ||
{ | ||
// transform everything to payload dims | ||
const Dims destStartPayload = PayloadDims<T>(destStart, destRowMajor); | ||
diff --git a/source/adios2/toolkit/format/bp3/BP3Serializer.tcc b/source/adios2/toolkit/format/bp3/BP3Serializer.tcc | ||
index a66b9dc62..7d54681e6 100644 | ||
--- a/source/adios2/toolkit/format/bp3/BP3Serializer.tcc | ||
+++ b/source/adios2/toolkit/format/bp3/BP3Serializer.tcc | ||
@@ -862,7 +862,7 @@ void BP3Serializer::PutPayloadInBuffer( | ||
ProfilerStart("memcpy"); | ||
if (!blockInfo.MemoryStart.empty()) | ||
{ | ||
- helper::CopyMemory( | ||
+ helper::CopyMemoryBlock( | ||
reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position), | ||
blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data, | ||
blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(), | ||
diff --git a/source/adios2/toolkit/format/bp4/BP4Serializer.tcc b/source/adios2/toolkit/format/bp4/BP4Serializer.tcc | ||
index 86b688e0b..3eb210508 100644 | ||
--- a/source/adios2/toolkit/format/bp4/BP4Serializer.tcc | ||
+++ b/source/adios2/toolkit/format/bp4/BP4Serializer.tcc | ||
@@ -903,7 +903,7 @@ void BP4Serializer::PutPayloadInBuffer( | ||
if (!blockInfo.MemoryStart.empty()) | ||
{ | ||
// TODO make it a BP4Serializer function | ||
- helper::CopyMemory( | ||
+ helper::CopyMemoryBlock( | ||
reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position), | ||
blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data, | ||
blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters