Revert PR-292. After further investigation, the memcpy->memmove change was only good for Haswell on older versions of glibc. Adding a switch for small sizes is perhaps useful for string copies, but also has an overhead for larger sizes, making it a poor trade-off for general memcpy.

This PR also removes a couple of unnecessary semi-colons in Eigen/src/Core/AssignEvaluator.h that caused compiler warning everywhere.
This commit is contained in:
Rasmus Munk Larsen
2017-01-26 12:46:06 -08:00
parent 25a1703579
commit edaa0fc5d1
5 changed files with 6 additions and 41 deletions

View File

@@ -56,7 +56,7 @@ void pack_simple(Scalar * dst, const Scalar * src, Index cols, Index rows, Index
} else {
// Naive memcpy calls
for (Index col = 0; col < cols; ++col) {
internal::fast_memcpy(dst + col*lddst, src + col*ldsrc, rows*sizeof(Scalar));
memcpy(dst + col*lddst, src + col*ldsrc, rows*sizeof(Scalar));
}
}
}

View File

@@ -22,7 +22,7 @@ struct DefaultDevice {
internal::aligned_free(buffer);
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const {
internal::fast_memcpy(dst, src, n);
::memcpy(dst, src, n);
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const {
memcpy(dst, src, n);

View File

@@ -106,7 +106,7 @@ struct ThreadPoolDevice {
}
EIGEN_STRONG_INLINE void memcpy(void* dst, const void* src, size_t n) const {
internal::fast_memcpy(dst, src, n);
::memcpy(dst, src, n);
}
EIGEN_STRONG_INLINE void memcpyHostToDevice(void* dst, const void* src, size_t n) const {
memcpy(dst, src, n);