mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-21 00:59:36 +08:00
bug #1676: workaround GCC's bug in c++17 mode.
(grafted from b3c4344a6852e55c849976dd46ec4e861399bf16 )
This commit is contained in:
parent
f1c12d8ff0
commit
2aa9eb3ce8
@ -40,7 +40,7 @@ static inline void check_DenseIndex_is_signed() {
|
||||
*/
|
||||
template<typename Derived> class DenseBase
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
: public DenseCoeffsBase<Derived>
|
||||
: public DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value>
|
||||
#else
|
||||
: public DenseCoeffsBase<Derived,DirectWriteAccessors>
|
||||
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
||||
@ -71,7 +71,7 @@ template<typename Derived> class DenseBase
|
||||
typedef Scalar value_type;
|
||||
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef DenseCoeffsBase<Derived> Base;
|
||||
typedef DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value> Base;
|
||||
|
||||
using Base::derived;
|
||||
using Base::const_cast_derived;
|
||||
|
@ -47,11 +47,7 @@ template<typename T> struct NumTraits;
|
||||
template<typename Derived> struct EigenBase;
|
||||
template<typename Derived> class DenseBase;
|
||||
template<typename Derived> class PlainObjectBase;
|
||||
|
||||
|
||||
template<typename Derived,
|
||||
int Level = internal::accessors_level<Derived>::value >
|
||||
class DenseCoeffsBase;
|
||||
template<typename Derived, int Level> class DenseCoeffsBase;
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols,
|
||||
int _Options = AutoAlign |
|
||||
|
@ -112,6 +112,7 @@ void matlab_cplx_cplx(const M& ar, const M& ai, const M& br, const M& bi, M& cr,
|
||||
cr.noalias() -= ai * bi;
|
||||
ci.noalias() += ar * bi;
|
||||
ci.noalias() += ai * br;
|
||||
// [cr ci] += [ar ai] * br + [-ai ar] * bi
|
||||
}
|
||||
|
||||
void matlab_real_cplx(const M& a, const M& br, const M& bi, M& cr, M& ci)
|
||||
@ -240,7 +241,7 @@ int main(int argc, char ** argv)
|
||||
blas_gemm(a,b,r);
|
||||
c.noalias() += a * b;
|
||||
if(!r.isApprox(c)) {
|
||||
std::cout << r - c << "\n";
|
||||
std::cout << (r - c).norm() << "\n";
|
||||
std::cerr << "Warning, your product is crap!\n\n";
|
||||
}
|
||||
#else
|
||||
@ -249,7 +250,7 @@ int main(int argc, char ** argv)
|
||||
gemm(a,b,c);
|
||||
r.noalias() += a.cast<Scalar>() .lazyProduct( b.cast<Scalar>() );
|
||||
if(!r.isApprox(c)) {
|
||||
std::cout << r - c << "\n";
|
||||
std::cout << (r - c).norm() << "\n";
|
||||
std::cerr << "Warning, your product is crap!\n\n";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user