diff options
author | 2010-01-04 23:21:04 +0100 | |
---|---|---|
committer | 2010-01-04 23:21:04 +0100 | |
commit | 57275b2b8ccc5ce7be32f23517490f2d953db1a4 (patch) | |
tree | 156d6c0d2f9d29eed492dfdb38f352eb914950a4 /Eigen | |
parent | 95d9cb77f8cf1782620ea49ed8d3a43968c4faf1 (diff) |
make some changes to please clang, fix some warnings too.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Core | 4 | ||||
-rw-r--r-- | Eigen/src/Array/VectorwiseOp.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/MatrixStorage.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/TriangularMatrix.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/products/SelfadjointMatrixMatrix.h | 1 | ||||
-rw-r--r-- | Eigen/src/Core/util/Memory.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/util/XprHelper.h | 2 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/Tridiagonalization.h | 1 |
9 files changed, 15 insertions, 11 deletions
diff --git a/Eigen/Core b/Eigen/Core index 49bb4bfb0..de19ba6ec 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -55,6 +55,10 @@ #define EIGEN_DONT_VECTORIZE #endif +#ifdef __clang__ +#define EIGEN_DONT_VECTORIZE +#endif + #ifndef EIGEN_DONT_VECTORIZE #if defined (EIGEN_SSE2_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER) #define EIGEN_VECTORIZE diff --git a/Eigen/src/Array/VectorwiseOp.h b/Eigen/src/Array/VectorwiseOp.h index bb695c795..5e933f10b 100644 --- a/Eigen/src/Array/VectorwiseOp.h +++ b/Eigen/src/Array/VectorwiseOp.h @@ -381,7 +381,7 @@ template<typename ExpressionType, int Direction> class VectorwiseOp const Reverse<ExpressionType, Direction> reverse() const { return Reverse<ExpressionType, Direction>( _expression() ); } - const Replicate<ExpressionType,Direction==Vertical?Dynamic:1,Direction==Horizontal?Dynamic:1> + const Replicate<ExpressionType,(Direction==Vertical?Dynamic:1),(Direction==Horizontal?Dynamic:1)> replicate(int factor) const; /** \nonstableyet diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 7ffddcbf8..eddabf4b9 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -218,7 +218,7 @@ inline float ei_norm1(const std::complex<float> &x) { return(ei_abs(x.real()) + inline std::complex<float> ei_exp(std::complex<float> x) { return std::exp(x); } inline std::complex<float> ei_sin(std::complex<float> x) { return std::sin(x); } inline std::complex<float> ei_cos(std::complex<float> x) { return std::cos(x); } -inline std::complex<float> ei_atan2(std::complex<float>, std::complex<float> ) { ei_assert(false); return 0; } +inline std::complex<float> ei_atan2(std::complex<float>, std::complex<float> ) { ei_assert(false); return 0.f; } template<> inline std::complex<float> ei_random() { @@ -255,7 +255,7 @@ inline double ei_norm1(const std::complex<double> &x) { return(ei_abs(x.real()) inline std::complex<double> ei_exp(std::complex<double> x) { return std::exp(x); } inline std::complex<double> ei_sin(std::complex<double> x) { return std::sin(x); } inline std::complex<double> ei_cos(std::complex<double> x) { return std::cos(x); } -inline std::complex<double> ei_atan2(std::complex<double>, std::complex<double>) { ei_assert(false); return 0; } +inline std::complex<double> ei_atan2(std::complex<double>, std::complex<double>) { ei_assert(false); return 0.; } template<> inline std::complex<double> ei_random() { diff --git a/Eigen/src/Core/MatrixStorage.h b/Eigen/src/Core/MatrixStorage.h index 8bfa728b6..584ba8ca3 100644 --- a/Eigen/src/Core/MatrixStorage.h +++ b/Eigen/src/Core/MatrixStorage.h @@ -98,7 +98,7 @@ template<typename T, int _Rows, int _Cols, int _Options> class ei_matrix_storage inline explicit ei_matrix_storage() {} inline ei_matrix_storage(ei_constructor_without_unaligned_array_assert) {} inline ei_matrix_storage(int,int,int) {} - inline void swap(ei_matrix_storage& other) {} + inline void swap(ei_matrix_storage& ) {} inline static int rows(void) {return _Rows;} inline static int cols(void) {return _Cols;} inline void resize(int,int,int) {} diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index aaf781d1f..172355aa6 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -95,12 +95,14 @@ template<typename Derived> class TriangularBase : public AnyMatrixBase<Derived> || ((Mode==StrictlyLowerTriangular || Mode==UnitLowerTriangular) && col<row)); } + #ifdef EIGEN_INTERNAL_DEBUGGING void check_coordinates_internal(int row, int col) { - #ifdef EIGEN_INTERNAL_DEBUGGING check_coordinates(row, col); - #endif } + #else + void check_coordinates_internal(int , int ) {} + #endif }; diff --git a/Eigen/src/Core/products/SelfadjointMatrixMatrix.h b/Eigen/src/Core/products/SelfadjointMatrixMatrix.h index 5e025b90b..35efa752e 100644 --- a/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +++ b/Eigen/src/Core/products/SelfadjointMatrixMatrix.h @@ -313,7 +313,6 @@ struct ei_product_selfadjoint_matrix<Scalar,LhsStorageOrder,false,ConjugateLhs, int size = cols; ei_const_blas_data_mapper<Scalar, LhsStorageOrder> lhs(_lhs,lhsStride); - ei_const_blas_data_mapper<Scalar, RhsStorageOrder> rhs(_rhs,rhsStride); if (ConjugateRhs) alpha = ei_conj(alpha); diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index ecc13dab4..bfc6ff686 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -407,10 +407,10 @@ public: ei_aligned_free( p ); } - bool operator!=(const aligned_allocator<T>& other) const + bool operator!=(const aligned_allocator<T>& ) const { return false; } - bool operator==(const aligned_allocator<T>& other) const + bool operator==(const aligned_allocator<T>& ) const { return true; } }; diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 2a9feaeeb..e00ff3606 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -109,7 +109,7 @@ template<int _Rows, int _Cols> struct ei_size_at_compile_time * in order to avoid a useless copy */ -template<typename T, int Sparseness = ei_traits<T>::Flags&SparseBit> class ei_eval; +template<typename T, int Sparseness = ei_traits<T>::Flags&SparseBit> struct ei_eval; template<typename T> struct ei_eval<T,IsDense> { diff --git a/Eigen/src/Eigenvalues/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index d8dcfb047..58adb38e8 100644 --- a/Eigen/src/Eigenvalues/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -197,7 +197,6 @@ void Tridiagonalization<MatrixType>::_compute(MatrixType& matA, CoeffVectorType& { assert(matA.rows()==matA.cols()); int n = matA.rows(); - Matrix<Scalar,1,Dynamic> aux(n); for (int i = 0; i<n-1; ++i) { int remainingSize = n-i-1; |