mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix numerous shadow-warnings for GCC<=4.8
This commit is contained in:
parent
ef4d79fed8
commit
73ca600bca
@ -23,6 +23,8 @@
|
||||
// Ordering interface
|
||||
#include "OrderingMethods"
|
||||
|
||||
#include "src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#include "src/SparseLU/SparseLU_gemm_kernel.h"
|
||||
|
||||
#include "src/SparseLU/SparseLU_Structs.h"
|
||||
@ -43,4 +45,6 @@
|
||||
#include "src/SparseLU/SparseLU_Utils.h"
|
||||
#include "src/SparseLU/SparseLU.h"
|
||||
|
||||
#include "src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_SPARSELU_MODULE_H
|
||||
|
@ -36,7 +36,7 @@ namespace std \
|
||||
deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : deque_base(first, last, a) {} \
|
||||
deque(const deque& c) : deque_base(c) {} \
|
||||
explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \
|
||||
deque(iterator start, iterator end) : deque_base(start, end) {} \
|
||||
deque(iterator start_, iterator end_) : deque_base(start_, end_) {} \
|
||||
deque& operator=(const deque& x) { \
|
||||
deque_base::operator=(x); \
|
||||
return *this; \
|
||||
|
@ -35,7 +35,7 @@ namespace std \
|
||||
list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : list_base(first, last, a) {} \
|
||||
list(const list& c) : list_base(c) {} \
|
||||
explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \
|
||||
list(iterator start, iterator end) : list_base(start, end) {} \
|
||||
list(iterator start_, iterator end_) : list_base(start_, end_) {} \
|
||||
list& operator=(const list& x) { \
|
||||
list_base::operator=(x); \
|
||||
return *this; \
|
||||
|
@ -36,7 +36,7 @@ namespace std \
|
||||
vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : vector_base(first, last, a) {} \
|
||||
vector(const vector& c) : vector_base(c) {} \
|
||||
explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \
|
||||
vector(iterator start, iterator end) : vector_base(start, end) {} \
|
||||
vector(iterator start_, iterator end_) : vector_base(start_, end_) {} \
|
||||
vector& operator=(const vector& x) { \
|
||||
vector_base::operator=(x); \
|
||||
return *this; \
|
||||
|
@ -10,6 +10,14 @@
|
||||
#ifndef EIGEN_BLAS_COMMON_H
|
||||
#define EIGEN_BLAS_COMMON_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
# if __GNUC__<5
|
||||
// GCC < 5.0 does not like the global Scalar typedef
|
||||
// we just keep shadow-warnings disabled permanently
|
||||
# define EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "../Eigen/Core"
|
||||
#include "../Eigen/Jacobi"
|
||||
|
||||
|
@ -9,8 +9,12 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
// GCC<=4.8 has spurious shadow warnings, because `ptr` re-appears inside template instantiations
|
||||
// workaround: put these in an anonymous namespace
|
||||
namespace {
|
||||
float *ptr;
|
||||
const float *const_ptr;
|
||||
}
|
||||
|
||||
template<typename PlainObjectType,
|
||||
bool IsDynamicSize = PlainObjectType::SizeAtCompileTime == Dynamic,
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include <Eigen/Geometry>
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
/**
|
||||
@ -221,4 +223,6 @@ struct evaluator<AlignedVector3<Scalar> >
|
||||
|
||||
}
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_ALIGNED_VECTOR3
|
||||
|
@ -28,11 +28,17 @@ namespace Eigen {
|
||||
//@{
|
||||
|
||||
}
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
|
||||
#include "src/AutoDiff/AutoDiffScalar.h"
|
||||
// #include "src/AutoDiff/AutoDiffVector.h"
|
||||
#include "src/AutoDiff/AutoDiffJacobian.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
|
||||
|
||||
namespace Eigen {
|
||||
//@}
|
||||
}
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
|
||||
#include "../SpecialFunctions"
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
#include "src/util/CXX11Meta.h"
|
||||
#include "src/util/MaxSizeVector.h"
|
||||
|
||||
|
@ -68,6 +68,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#ifdef EIGEN_FFTW_DEFAULT
|
||||
// FFTW: faster, GPL -- incompatible with Eigen in LGPL form, bigger code size
|
||||
# include <fftw3.h>
|
||||
@ -415,5 +417,8 @@ void fft_inv_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif
|
||||
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
|
||||
|
@ -11,6 +11,8 @@
|
||||
#define EIGEN_ITERATIVE_SOLVERS_MODULE_H
|
||||
|
||||
#include <Eigen/Sparse>
|
||||
#include "../../Eigen/Jacobi"
|
||||
#include "../../Eigen/Householder"
|
||||
|
||||
/**
|
||||
* \defgroup IterativeSolvers_Module Iterative solvers module
|
||||
@ -24,19 +26,21 @@
|
||||
*/
|
||||
//@{
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#ifndef EIGEN_MPL2_ONLY
|
||||
#include "src/IterativeSolvers/IterationController.h"
|
||||
#include "src/IterativeSolvers/ConstrainedConjGrad.h"
|
||||
#endif
|
||||
|
||||
#include "src/IterativeSolvers/IncompleteLU.h"
|
||||
#include "../../Eigen/Jacobi"
|
||||
#include "../../Eigen/Householder"
|
||||
#include "src/IterativeSolvers/GMRES.h"
|
||||
#include "src/IterativeSolvers/DGMRES.h"
|
||||
//#include "src/IterativeSolvers/SSORPreconditioner.h"
|
||||
#include "src/IterativeSolvers/MINRES.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
//@}
|
||||
|
||||
#endif // EIGEN_ITERATIVE_SOLVERS_MODULE_H
|
||||
|
@ -30,6 +30,9 @@
|
||||
*/
|
||||
|
||||
#include "Eigen/SparseCore"
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
|
||||
#include "src/LevenbergMarquardt/LMqrsolv.h"
|
||||
@ -41,5 +44,6 @@
|
||||
#include "src/LevenbergMarquardt/LevenbergMarquardt.h"
|
||||
#include "src/LevenbergMarquardt/LMonestep.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_LEVENBERGMARQUARDT_MODULE
|
||||
|
@ -53,12 +53,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#include "src/MatrixFunctions/MatrixExponential.h"
|
||||
#include "src/MatrixFunctions/MatrixFunction.h"
|
||||
#include "src/MatrixFunctions/MatrixSquareRoot.h"
|
||||
#include "src/MatrixFunctions/MatrixLogarithm.h"
|
||||
#include "src/MatrixFunctions/MatrixPower.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
|
||||
/**
|
||||
\page matrixbaseextra_page
|
||||
|
@ -24,8 +24,12 @@ namespace Eigen
|
||||
*/
|
||||
}
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#include "src/Splines/SplineFwd.h"
|
||||
#include "src/Splines/Spline.h"
|
||||
#include "src/Splines/SplineFitting.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_SPLINES_MODULE_H
|
||||
|
@ -24,7 +24,7 @@ struct Functor
|
||||
int m_inputs, m_values;
|
||||
|
||||
Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
|
||||
Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {}
|
||||
Functor(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}
|
||||
|
||||
int inputs() const { return m_inputs; }
|
||||
int values() const { return m_values; }
|
||||
|
@ -44,7 +44,7 @@ struct TestFunc1
|
||||
int m_inputs, m_values;
|
||||
|
||||
TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
|
||||
TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {}
|
||||
TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}
|
||||
|
||||
int inputs() const { return m_inputs; }
|
||||
int values() const { return m_values; }
|
||||
|
@ -9,7 +9,7 @@
|
||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#include "../../test/sparse_solver.h"
|
||||
#include <Eigen/src/IterativeSolvers/DGMRES.h>
|
||||
#include <unsupported/Eigen/IterativeSolvers>
|
||||
|
||||
template<typename T> void test_dgmres_T()
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ struct TestFunc1
|
||||
int m_inputs, m_values;
|
||||
|
||||
TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
|
||||
TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {}
|
||||
TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}
|
||||
|
||||
int inputs() const { return m_inputs; }
|
||||
int values() const { return m_values; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user