Skip to content

Commit

Permalink
Fixes #1235 (master broken with Endian_Reverse)
Browse files Browse the repository at this point in the history
CopyPayloadStride was using ADIOS2_FOREACH_PRIMITIVE_TYPE_1ARG, which
includes non-stdint types like char, for which GetType<> isn't
specialized anymore.

Fixing that to use ADIOS2_FOREACH_PRIMITIVE_STDTYPE then kinda exposes
another bug, ie., some functions in adiosMemory.inl aren't actually
declared inline and relied on being instantiated through their use
in CopyPayloadStride. I added an explicit instantiation for
CopyEndianReverse which makes everything work for me, but that's not
really a clean fix.
  • Loading branch information
germasch committed Mar 4, 2019
1 parent 9930706 commit 0a1787d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/adios2/helper/adiosMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void CopyPayloadStride(const char *src, const size_t payloadStride, char *dest,
CopyEndianReverse<T>(src, payloadStride, reinterpret_cast<T *>(dest)); \
}

ADIOS2_FOREACH_PRIMITIVE_TYPE_1ARG(declare_type)
ADIOS2_FOREACH_PRIMITIVE_STDTYPE_1ARG(declare_type)
#undef declare_type
}
else
Expand Down Expand Up @@ -286,5 +286,8 @@ void CopyPayload(char *dest, const Dims &destStart, const Dims &destCount,
}
}

template
void CopyEndianReverse(const char *src, const size_t payloadStride, char *dest);

} // end namespace helper
} // end namespace adios2

0 comments on commit 0a1787d

Please sign in to comment.