Unverified Commit a1b2666a authored by pnorbert's avatar pnorbert Committed by GitHub
Browse files

Merge pull request #1582 from pnorbert/germasch-msvc-fixes

fix MSVC/conda build (resubmit #1575)
parents 425033da d0c3be17
...@@ -111,14 +111,14 @@ T ReadValue(const std::vector<char> &buffer, size_t &position, ...@@ -111,14 +111,14 @@ T ReadValue(const std::vector<char> &buffer, size_t &position,
* @param srcMemCount * @param srcMemCount
*/ */
template <class T, class U> template <class T, class U>
void CopyMemory(T *dest, const Dims &destStart, const Dims &destCount, void CopyMemoryBlock(T *dest, const Dims &destStart, const Dims &destCount,
const bool destRowMajor, const U *src, const Dims &srcStart, const bool destRowMajor, const U *src,
const Dims &srcCount, const bool srcRowMajor, const Dims &srcStart, const Dims &srcCount,
const bool endianReverse = false, const bool srcRowMajor, const bool endianReverse = false,
const Dims &destMemStart = Dims(), const Dims &destMemStart = Dims(),
const Dims &destMemCount = Dims(), const Dims &destMemCount = Dims(),
const Dims &srcMemStart = Dims(), const Dims &srcMemStart = Dims(),
const Dims &srcMemCount = Dims()) noexcept; const Dims &srcMemCount = Dims()) noexcept;
void CopyPayload(char *dest, const Dims &destStart, const Dims &destCount, void CopyPayload(char *dest, const Dims &destStart, const Dims &destCount,
const bool destRowMajor, const char *src, const Dims &srcStart, const bool destRowMajor, const char *src, const Dims &srcStart,
......
...@@ -252,12 +252,12 @@ void ClipVector(std::vector<T> &vec, const size_t start, ...@@ -252,12 +252,12 @@ void ClipVector(std::vector<T> &vec, const size_t start,
} }
template <class T, class U> template <class T, class U>
void CopyMemory(T *dest, const Dims &destStart, const Dims &destCount, void CopyMemoryBlock(T *dest, const Dims &destStart, const Dims &destCount,
const bool destRowMajor, const U *src, const Dims &srcStart, const bool destRowMajor, const U *src,
const Dims &srcCount, const bool srcRowMajor, const Dims &srcStart, const Dims &srcCount,
const bool endianReverse, const Dims &destMemStart, const bool srcRowMajor, const bool endianReverse,
const Dims &destMemCount, const Dims &srcMemStart, const Dims &destMemStart, const Dims &destMemCount,
const Dims &srcMemCount) noexcept const Dims &srcMemStart, const Dims &srcMemCount) noexcept
{ {
// transform everything to payload dims // transform everything to payload dims
const Dims destStartPayload = PayloadDims<T>(destStart, destRowMajor); const Dims destStartPayload = PayloadDims<T>(destStart, destRowMajor);
......
...@@ -862,7 +862,7 @@ void BP3Serializer::PutPayloadInBuffer( ...@@ -862,7 +862,7 @@ void BP3Serializer::PutPayloadInBuffer(
ProfilerStart("memcpy"); ProfilerStart("memcpy");
if (!blockInfo.MemoryStart.empty()) if (!blockInfo.MemoryStart.empty())
{ {
helper::CopyMemory( helper::CopyMemoryBlock(
reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position), reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position),
blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data, blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data,
blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(), blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(),
......
...@@ -883,7 +883,7 @@ void BP4Serializer::PutPayloadInBuffer( ...@@ -883,7 +883,7 @@ void BP4Serializer::PutPayloadInBuffer(
if (!blockInfo.MemoryStart.empty()) if (!blockInfo.MemoryStart.empty())
{ {
// TODO make it a BP4Serializer function // TODO make it a BP4Serializer function
helper::CopyMemory( helper::CopyMemoryBlock(
reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position), reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position),
blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data, blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data,
blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(), blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment