mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
removed EIGEN_HAS_CXX11_* and redundant EIGEN_COMP_CXXVER checks
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
9d3ffb3fbf
commit
f33a31b823
@@ -30,7 +30,6 @@
|
||||
|
||||
// The code depends on CXX11, so only include the module if the
|
||||
// compiler supports it.
|
||||
#if (EIGEN_COMP_CXXVER >= 11)
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <time.h>
|
||||
@@ -67,8 +66,6 @@
|
||||
#include "src/ThreadPool/Barrier.h"
|
||||
#include "src/ThreadPool/NonBlockingThreadPool.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "../../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_CXX11_THREADPOOL_MODULE_H
|
||||
|
||||
@@ -402,7 +402,6 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_, IndexTyp
|
||||
internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());
|
||||
}
|
||||
|
||||
#if EIGEN_HAS_RVALUE_REFERENCES
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE Tensor(Self&& other)
|
||||
: m_storage(std::move(other.m_storage))
|
||||
@@ -414,7 +413,6 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_, IndexTyp
|
||||
m_storage = std::move(other.m_storage);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE Tensor& operator=(const Tensor& other)
|
||||
|
||||
@@ -318,12 +318,10 @@ class TensorFixedSize : public TensorBase<TensorFixedSize<Scalar_, Dimensions_,
|
||||
{
|
||||
}
|
||||
|
||||
#if EIGEN_HAS_RVALUE_REFERENCES
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize(Self&& other)
|
||||
: m_storage(other.m_storage)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DEVICE_FUNC
|
||||
|
||||
@@ -110,7 +110,6 @@ class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if EIGEN_HAS_RVALUE_REFERENCES
|
||||
EIGEN_DEVICE_FUNC TensorStorage(Self&& other) : TensorStorage()
|
||||
{
|
||||
*this = std::move(other);
|
||||
@@ -122,7 +121,6 @@ class TensorStorage<T, DSizes<IndexType, NumIndices_>, Options_>
|
||||
numext::swap(m_dimensions, other.m_dimensions);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
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)
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
#else
|
||||
|
||||
#if EIGEN_MAX_CPP_VER >= 11 && \
|
||||
((EIGEN_COMP_GNUC && EIGEN_GNUC_AT_LEAST(4, 8)) || \
|
||||
#if ((EIGEN_COMP_GNUC && EIGEN_GNUC_AT_LEAST(4, 8)) || \
|
||||
__has_feature(cxx_thread_local) || \
|
||||
(EIGEN_COMP_MSVC >= 1900) )
|
||||
#define EIGEN_THREAD_LOCAL static thread_local
|
||||
|
||||
@@ -27,18 +27,6 @@
|
||||
#error GNU C++ Compiler (g++) only supports required C++ features since version 4.6.
|
||||
#endif
|
||||
|
||||
/* Check that the compiler at least claims to support C++11. It might not be sufficient
|
||||
* because the compiler may not implement it correctly, but at least we'll know.
|
||||
* On the other hand, visual studio still doesn't claim to support C++11 although it's
|
||||
* compliant enugh for our purpose.
|
||||
*/
|
||||
#if (EIGEN_COMP_CXXVER < 11)
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||
#pragma GCC diagnostic error "-Wfatal-errors"
|
||||
#endif
|
||||
#error This library needs at least a C++11 compliant compiler. If you use g++/clang, please enable the -std=c++11 compiler flag. (-std=c++0x on older versions.)
|
||||
#endif
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
Reference in New Issue
Block a user