mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* Give Konstantinos a copyright line
* Fix compilation of Inverse.h with vectorisation * Introduce EIGEN_GNUC_AT_LEAST(x,y) macro doing future-proof (e.g. gcc v5.0) check * Only use ProductWIP if vectorisation is enabled * rename EIGEN_ALWAYS_INLINE -> EIGEN_INLINE with fall-back to inline keyword * some cleanup/indentation
This commit is contained in:
@@ -184,7 +184,6 @@ struct ei_assignment_impl<Derived, OtherDerived, true, false>
|
||||
static void execute(Derived & dst, const OtherDerived & src)
|
||||
{
|
||||
const bool unroll = Derived::SizeAtCompileTime * OtherDerived::CoeffReadCost <= EIGEN_UNROLLING_LIMIT;
|
||||
ei_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
|
||||
if(unroll)
|
||||
{
|
||||
// std::cout << "vectorized unrolled\n";
|
||||
|
||||
@@ -45,8 +45,8 @@ inline int ei_exp(int) { ei_assert(false); return 0; }
|
||||
inline int ei_log(int) { ei_assert(false); return 0; }
|
||||
inline int ei_sin(int) { ei_assert(false); return 0; }
|
||||
inline int ei_cos(int) { ei_assert(false); return 0; }
|
||||
// FIXME naive GCC version test, e.g. 5.0 would not pass
|
||||
#if (defined __ICC) || (defined __GNUC__ && (__GNUC__<4 || __GNUC_MINOR__<3))
|
||||
|
||||
#if EIGEN_GNUC_AT_LEAST(4,3)
|
||||
inline int ei_pow(int x, int y) { return int(std::pow(double(x), y)); }
|
||||
#else
|
||||
inline int ei_pow(int x, int y) { return std::pow(x, y); }
|
||||
|
||||
@@ -409,7 +409,7 @@ template<typename Derived> class MatrixBase
|
||||
template<typename NewType>
|
||||
const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived> cast() const;
|
||||
|
||||
const typename ei_eval<Derived>::type eval() const EIGEN_ALWAYS_INLINE
|
||||
EIGEN_INLINE const typename ei_eval<Derived>::type eval() const
|
||||
{
|
||||
return typename ei_eval<Derived>::type(derived());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// This file is part of Eigen, a lightweight C++ template library
|
||||
// for linear algebra. Eigen itself is part of the KDE project.
|
||||
//
|
||||
// Copyright (C) 2008 Konstantinos Margaritis <markos@codex.gr>
|
||||
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
||||
//
|
||||
// Eigen is free software; you can redistribute it and/or
|
||||
@@ -29,10 +30,7 @@
|
||||
#error include PacketMath_Altivec without EIGEN_VECTORIZE_ALTIVEC
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
|
||||
#undef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
|
||||
#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 4
|
||||
#endif
|
||||
|
||||
static const vector int v0i = vec_splat_u32(0);
|
||||
static const vector int v16i_ = vec_splat_u32(-16);
|
||||
|
||||
@@ -85,10 +85,10 @@ using Eigen::MatrixBase;
|
||||
// gcc 3.4.x reports the following compilation error:
|
||||
// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
|
||||
// : function body not available
|
||||
#if (defined __GNUC__) && (__GNUC__!=3)
|
||||
#define EIGEN_ALWAYS_INLINE __attribute__((always_inline))
|
||||
#if EIGEN_GNUC_AT_LEAST(4,0)
|
||||
#define EIGEN_INLINE __attribute__((always_inline))
|
||||
#else
|
||||
#define EIGEN_ALWAYS_INLINE
|
||||
#define EIGEN_INLINE inline
|
||||
#endif
|
||||
|
||||
#if (defined __GNUC__)
|
||||
|
||||
Reference in New Issue
Block a user