mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
merge
This commit is contained in:
commit
7e2683dc39
@ -239,42 +239,42 @@ EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& DenseBase<Derived>
|
|||||||
|
|
||||||
/** equivalent to operator[](0). */
|
/** equivalent to operator[](0). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::CoeffReturnType MatrixBase<Derived>
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::CoeffReturnType DenseBase<Derived>
|
||||||
::x() const { return (*this)[0]; }
|
::x() const { return (*this)[0]; }
|
||||||
|
|
||||||
/** equivalent to operator[](1). */
|
/** equivalent to operator[](1). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::CoeffReturnType MatrixBase<Derived>
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::CoeffReturnType DenseBase<Derived>
|
||||||
::y() const { return (*this)[1]; }
|
::y() const { return (*this)[1]; }
|
||||||
|
|
||||||
/** equivalent to operator[](2). */
|
/** equivalent to operator[](2). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::CoeffReturnType MatrixBase<Derived>
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::CoeffReturnType DenseBase<Derived>
|
||||||
::z() const { return (*this)[2]; }
|
::z() const { return (*this)[2]; }
|
||||||
|
|
||||||
/** equivalent to operator[](3). */
|
/** equivalent to operator[](3). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::CoeffReturnType MatrixBase<Derived>
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::CoeffReturnType DenseBase<Derived>
|
||||||
::w() const { return (*this)[3]; }
|
::w() const { return (*this)[3]; }
|
||||||
|
|
||||||
/** equivalent to operator[](0). */
|
/** equivalent to operator[](0). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& MatrixBase<Derived>
|
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& DenseBase<Derived>
|
||||||
::x() { return (*this)[0]; }
|
::x() { return (*this)[0]; }
|
||||||
|
|
||||||
/** equivalent to operator[](1). */
|
/** equivalent to operator[](1). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& MatrixBase<Derived>
|
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& DenseBase<Derived>
|
||||||
::y() { return (*this)[1]; }
|
::y() { return (*this)[1]; }
|
||||||
|
|
||||||
/** equivalent to operator[](2). */
|
/** equivalent to operator[](2). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& MatrixBase<Derived>
|
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& DenseBase<Derived>
|
||||||
::z() { return (*this)[2]; }
|
::z() { return (*this)[2]; }
|
||||||
|
|
||||||
/** equivalent to operator[](3). */
|
/** equivalent to operator[](3). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& MatrixBase<Derived>
|
EIGEN_STRONG_INLINE typename ei_traits<Derived>::Scalar& DenseBase<Derived>
|
||||||
::w() { return (*this)[3]; }
|
::w() { return (*this)[3]; }
|
||||||
|
|
||||||
/** \returns the packet of coefficients starting at the given row and column. It is your responsibility
|
/** \returns the packet of coefficients starting at the given row and column. It is your responsibility
|
||||||
|
@ -280,6 +280,15 @@ template<typename Derived> class DenseBase
|
|||||||
typedef Block<Derived, 1, ei_traits<Derived>::ColsAtCompileTime> RowXpr;
|
typedef Block<Derived, 1, ei_traits<Derived>::ColsAtCompileTime> RowXpr;
|
||||||
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
|
||||||
|
const CoeffReturnType x() const;
|
||||||
|
const CoeffReturnType y() const;
|
||||||
|
const CoeffReturnType z() const;
|
||||||
|
const CoeffReturnType w() const;
|
||||||
|
Scalar& x();
|
||||||
|
Scalar& y();
|
||||||
|
Scalar& z();
|
||||||
|
Scalar& w();
|
||||||
|
|
||||||
/** Copies \a other into *this. \returns a reference to *this. */
|
/** Copies \a other into *this. \returns a reference to *this. */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator=(const DenseBase<OtherDerived>& other);
|
Derived& operator=(const DenseBase<OtherDerived>& other);
|
||||||
|
@ -169,15 +169,6 @@ template<typename Derived> class MatrixBase
|
|||||||
Derived& lazyAssign(const ProductBase<ProductDerived, Lhs,Rhs>& other);
|
Derived& lazyAssign(const ProductBase<ProductDerived, Lhs,Rhs>& other);
|
||||||
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
|
||||||
const CoeffReturnType x() const;
|
|
||||||
const CoeffReturnType y() const;
|
|
||||||
const CoeffReturnType z() const;
|
|
||||||
const CoeffReturnType w() const;
|
|
||||||
Scalar& x();
|
|
||||||
Scalar& y();
|
|
||||||
Scalar& z();
|
|
||||||
Scalar& w();
|
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator+=(const MatrixBase<OtherDerived>& other);
|
Derived& operator+=(const MatrixBase<OtherDerived>& other);
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
|
@ -62,4 +62,17 @@
|
|||||||
#define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8
|
#define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** Defines the default number of registers available for that architecture.
|
||||||
|
* Currently it must be 8 or 16. Other values will fail.
|
||||||
|
*/
|
||||||
|
#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
|
||||||
|
#if (defined __i386__)
|
||||||
|
#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8
|
||||||
|
#else
|
||||||
|
#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // EIGEN_DEFAULT_SETTINGS_H
|
#endif // EIGEN_DEFAULT_SETTINGS_H
|
||||||
|
@ -35,6 +35,12 @@
|
|||||||
#define EIGEN_TUNE_FOR_CPU_CACHE_SIZE 4*96*96
|
#define EIGEN_TUNE_FOR_CPU_CACHE_SIZE 4*96*96
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FIXME NEON has 16 quad registers, but since the current register allocator
|
||||||
|
// is so bad, it is much better to reduce it to 8
|
||||||
|
#ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
|
||||||
|
#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef float32x4_t Packet4f;
|
typedef float32x4_t Packet4f;
|
||||||
typedef int32x4_t Packet4i;
|
typedef int32x4_t Packet4i;
|
||||||
|
|
||||||
|
@ -130,14 +130,10 @@ struct ei_product_blocking_traits
|
|||||||
typedef typename ei_packet_traits<Scalar>::type PacketType;
|
typedef typename ei_packet_traits<Scalar>::type PacketType;
|
||||||
enum {
|
enum {
|
||||||
PacketSize = sizeof(PacketType)/sizeof(Scalar),
|
PacketSize = sizeof(PacketType)/sizeof(Scalar),
|
||||||
#if (defined __i386__)
|
NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,
|
||||||
HalfRegisterCount = 4,
|
|
||||||
#else
|
|
||||||
HalfRegisterCount = 8,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// register block size along the N direction (must be either 2 or 4)
|
// register block size along the N direction (must be either 2 or 4)
|
||||||
nr = HalfRegisterCount/2,
|
nr = NumberOfRegisters/4,
|
||||||
|
|
||||||
// register block size along the M direction (currently, this one cannot be modified)
|
// register block size along the M direction (currently, this one cannot be modified)
|
||||||
mr = 2 * PacketSize,
|
mr = 2 * PacketSize,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user