Use numext::swap instead of std::swap

This commit is contained in:
Benoit Steiner 2015-07-06 17:02:29 -07:00
parent 0485a2468d
commit 3f2101b03b
2 changed files with 2 additions and 2 deletions

View File

@ -662,7 +662,7 @@ struct TensorContractionEvaluatorBase
// If the layout is RowMajor, we need to reverse the m_dimensions
if (static_cast<int>(Layout) == static_cast<int>(RowMajor)) {
for (int i = 0, j = NumDims - 1; i < j; i++, j--) {
std::swap(m_dimensions[i], m_dimensions[j]);
numext::swap(m_dimensions[i], m_dimensions[j]);
}
}
}

View File

@ -95,7 +95,7 @@ class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>
EIGEN_DEVICE_FUNC ~TensorStorage() { internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, internal::array_prod(m_dimensions)); }
EIGEN_DEVICE_FUNC void swap(Self& other)
{ std::swap(m_data,other.m_data); std::swap(m_dimensions,other.m_dimensions); }
{ numext::swap(m_data,other.m_data); numext::swap(m_dimensions,other.m_dimensions); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const {return m_dimensions;}