diff --git a/Eigen/src/Array/Functors.h b/Eigen/src/Array/Functors.h index 3452ddc94..6a0a25a3a 100644 --- a/Eigen/src/Array/Functors.h +++ b/Eigen/src/Array/Functors.h @@ -38,7 +38,7 @@ template struct ei_scalar_sqrt_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * @@ -53,7 +53,7 @@ template struct ei_scalar_exp_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * @@ -68,7 +68,7 @@ template struct ei_scalar_log_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * @@ -83,7 +83,7 @@ template struct ei_scalar_cos_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * @@ -98,7 +98,7 @@ template struct ei_scalar_sin_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * @@ -116,7 +116,7 @@ struct ei_scalar_pow_op { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * @@ -132,107 +132,107 @@ struct ei_scalar_inverse_op { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::MulCost, PacketAccess = false }; }; // default ei_functor_traits for STL functors: template struct ei_functor_traits > -{ enum { Cost = NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::MulCost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::MulCost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::AddCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::AddCost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::AddCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::AddCost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::AddCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::AddCost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = false }; }; +{ enum { Cost = 1, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = ei_functor_traits::Cost, IsVectorizable = false }; }; +{ enum { Cost = ei_functor_traits::Cost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = ei_functor_traits::Cost, IsVectorizable = false }; }; +{ enum { Cost = ei_functor_traits::Cost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1 + ei_functor_traits::Cost, IsVectorizable = false }; }; +{ enum { Cost = 1 + ei_functor_traits::Cost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 1 + ei_functor_traits::Cost, IsVectorizable = false }; }; +{ enum { Cost = 1 + ei_functor_traits::Cost, PacketAccess = false }; }; #ifdef EIGEN_STDEXT_SUPPORT template struct ei_functor_traits > -{ enum { Cost = 0, IsVectorizable = false }; }; +{ enum { Cost = 0, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = 0, IsVectorizable = false }; }; +{ enum { Cost = 0, PacketAccess = false }; }; template struct ei_functor_traits > > -{ enum { Cost = 0, IsVectorizable = false }; }; +{ enum { Cost = 0, PacketAccess = false }; }; template struct ei_functor_traits > > -{ enum { Cost = 0, IsVectorizable = false }; }; +{ enum { Cost = 0, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = ei_functor_traits::Cost + ei_functor_traits::Cost, IsVectorizable = false }; }; +{ enum { Cost = ei_functor_traits::Cost + ei_functor_traits::Cost, PacketAccess = false }; }; template struct ei_functor_traits > -{ enum { Cost = ei_functor_traits::Cost + ei_functor_traits::Cost + ei_functor_traits::Cost, IsVectorizable = false }; }; +{ enum { Cost = ei_functor_traits::Cost + ei_functor_traits::Cost + ei_functor_traits::Cost, PacketAccess = false }; }; #endif // EIGEN_STDEXT_SUPPORT diff --git a/Eigen/src/Array/Random.h b/Eigen/src/Array/Random.h index 5a0f0814b..e4b61af33 100644 --- a/Eigen/src/Array/Random.h +++ b/Eigen/src/Array/Random.h @@ -31,7 +31,7 @@ template struct ei_scalar_random_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 5 * NumTraits::MulCost, IsVectorizable = false, IsRepeatable = false }; }; +{ enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false, IsRepeatable = false }; }; /** \array_module * diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index 79993494e..681b3d4ef 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -34,8 +34,8 @@ enum { NoVectorization, InnerVectorization, - Like1DVectorization, - SlicedVectorization + LinearVectorization, + SliceVectorization }; enum { @@ -56,18 +56,18 @@ private: }; enum { - MightVectorize = (int(Derived::Flags) & int(OtherDerived::Flags) & VectorizableBit) + MightVectorize = (int(Derived::Flags) & int(OtherDerived::Flags) & PacketAccessBit) && ((int(Derived::Flags)&RowMajorBit)==(int(OtherDerived::Flags)&RowMajorBit)), MayInnerVectorize = MightVectorize && InnerSize!=Dynamic && int(InnerSize)%int(PacketSize)==0, - MayLike1DVectorize = MightVectorize && (int(Derived::Flags) & int(OtherDerived::Flags) & Like1DArrayBit), - MaySlicedVectorize = MightVectorize && InnerSize==Dynamic + MayLinearVectorize = MightVectorize && (int(Derived::Flags) & int(OtherDerived::Flags) & LinearAccessBit), + MaySliceVectorize = MightVectorize && InnerSize==Dynamic }; public: enum { Vectorization = MayInnerVectorize ? InnerVectorization - : MayLike1DVectorize ? Like1DVectorization - : MaySlicedVectorize ? SlicedVectorization + : MayLinearVectorize ? LinearVectorization + : MaySliceVectorize ? SliceVectorization : NoVectorization }; @@ -86,7 +86,7 @@ public: : MayUnrollInner ? InnerUnrolling : NoUnrolling ) - : int(Vectorization) == int(Like1DVectorization) + : int(Vectorization) == int(LinearVectorization) ? ( MayUnrollCompletely ? CompleteUnrolling : NoUnrolling ) : NoUnrolling }; @@ -162,7 +162,7 @@ struct ei_assign_innervec_CompleteUnrolling inline static void run(Derived1 &dst, const Derived2 &src) { - dst.template writePacketCoeff(row, col, src.template packetCoeff(row, col)); + dst.template writePacket(row, col, src.template packet(row, col)); ei_assign_innervec_CompleteUnrolling::size, Stop>::run(dst, src); } @@ -181,7 +181,7 @@ struct ei_assign_innervec_InnerUnrolling { const int row = int(Derived1::Flags)&RowMajorBit ? row_or_col : Index; const int col = int(Derived1::Flags)&RowMajorBit ? Index : row_or_col; - dst.template writePacketCoeff(row, col, src.template packetCoeff(row, col)); + dst.template writePacket(row, col, src.template packet(row, col)); ei_assign_innervec_InnerUnrolling::size, Stop>::run(dst, src, row_or_col); } @@ -267,7 +267,7 @@ struct ei_assign_impl { const int row = rowMajor ? j : i; const int col = rowMajor ? i : j; - dst.template writePacketCoeff(row, col, src.template packetCoeff(row, col)); + dst.template writePacket(row, col, src.template packet(row, col)); } } } @@ -298,11 +298,11 @@ struct ei_assign_impl }; /*************************** -*** Like1D vectorization *** +*** Linear vectorization *** ***************************/ template -struct ei_assign_impl +struct ei_assign_impl { static void run(Derived1 &dst, const Derived2 &src) { @@ -320,7 +320,7 @@ struct ei_assign_impl // FIXME the following is not really efficient const int row = rowMajor ? index/innerSize : index%innerSize; const int col = rowMajor ? index%innerSize : index/innerSize; - dst.template writePacketCoeff(row, col, src.template packetCoeff(row, col)); + dst.template writePacket(row, col, src.template packet(row, col)); } // now we must do the rest without vectorization. @@ -347,7 +347,7 @@ struct ei_assign_impl }; template -struct ei_assign_impl +struct ei_assign_impl { inline static void run(Derived1 &dst, const Derived2 &src) { @@ -375,16 +375,16 @@ struct ei_assign_impl -struct ei_assign_impl +struct ei_assign_impl { static void run(Derived1 &dst, const Derived2 &src) { - //FIXME unimplemented + //FIXME unimplemented, so for now we fall back to non-vectorized path ei_assign_impl::run(dst, src); } }; diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 07241629c..c76fb4903 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -71,7 +71,11 @@ struct ei_traits > || (ColsAtCompileTime != Dynamic && MatrixType::ColsAtCompileTime == Dynamic)) ? ~LargeBit : ~(unsigned int)0, - Flags = MatrixType::Flags & (HereditaryBits | VectorizableBit | DirectAccessBit) & FlagsMaskLargeBit, + FlagsLinearAccessBit = MatrixType::Flags & RowMajorBit + ? (RowsAtCompileTime == 1 ? LinearAccessBit : 0) + : (ColsAtCompileTime == 1 ? LinearAccessBit : 0), + Flags = (MatrixType::Flags & (HereditaryBits | PacketAccessBit | DirectAccessBit) & FlagsMaskLargeBit) + | FlagsLinearAccessBit, CoeffReadCost = MatrixType::CoeffReadCost }; }; @@ -146,15 +150,15 @@ template class Block } template - inline PacketScalar _packetCoeff(int row, int col) const + inline PacketScalar _packet(int row, int col) const { - return m_matrix.template packetCoeff(row + m_startRow.value(), col + m_startCol.value()); + return m_matrix.template packet(row + m_startRow.value(), col + m_startCol.value()); } template - inline void _writePacketCoeff(int row, int col, const PacketScalar& x) + inline void _writePacket(int row, int col, const PacketScalar& x) { - m_matrix.const_cast_derived().template writePacketCoeff(row + m_startRow.value(), col + m_startCol.value(), x); + m_matrix.const_cast_derived().template writePacket(row + m_startRow.value(), col + m_startCol.value(), x); } protected: diff --git a/Eigen/src/Core/Coeffs.h b/Eigen/src/Core/Coeffs.h index 3f00a25ae..deb015136 100644 --- a/Eigen/src/Core/Coeffs.h +++ b/Eigen/src/Core/Coeffs.h @@ -249,14 +249,14 @@ inline typename ei_traits::Scalar& MatrixBase template template inline typename ei_packet_traits::Scalar>::type -MatrixBase::packetCoeff(int row, int col) const -{ return derived().template _packetCoeff(row,col); } +MatrixBase::packet(int row, int col) const +{ return derived().template _packet(row,col); } template template -inline void MatrixBase::writePacketCoeff +inline void MatrixBase::writePacket (int row, int col, const typename ei_packet_traits::Scalar>::type& x) -{ derived().template _writePacketCoeff(row,col,x); } +{ derived().template _writePacket(row,col,x); } #endif // EIGEN_COEFFS_H diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index 6b532dbd7..b12aa65bd 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -67,9 +67,9 @@ struct ei_traits > MaxColsAtCompileTime = Lhs::MaxColsAtCompileTime, Flags = (int(LhsFlags) | int(RhsFlags)) & ( HereditaryBits - | (int(LhsFlags) & int(RhsFlags) & Like1DArrayBit) - | (ei_functor_traits::IsVectorizable && ((int(LhsFlags) & RowMajorBit)==(int(RhsFlags) & RowMajorBit)) - ? int(LhsFlags) & int(RhsFlags) & VectorizableBit : 0)), + | (int(LhsFlags) & int(RhsFlags) & LinearAccessBit) + | (ei_functor_traits::PacketAccess && ((int(LhsFlags) & RowMajorBit)==(int(RhsFlags) & RowMajorBit)) + ? int(LhsFlags) & int(RhsFlags) & PacketAccessBit : 0)), CoeffReadCost = LhsCoeffReadCost + RhsCoeffReadCost + ei_functor_traits::Cost }; }; @@ -101,9 +101,9 @@ class CwiseBinaryOp : ei_no_assignment_operator, } template - inline PacketScalar _packetCoeff(int row, int col) const + inline PacketScalar _packet(int row, int col) const { - return m_functor.packetOp(m_lhs.template packetCoeff(row, col), m_rhs.template packetCoeff(row, col)); + return m_functor.packetOp(m_lhs.template packet(row, col), m_rhs.template packet(row, col)); } protected: diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index 1e1ed78a5..069fad8a2 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -50,7 +50,7 @@ struct ei_traits > MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, Flags = (MatrixType::Flags - & (HereditaryBits | Like1DArrayBit | (ei_functor_traits::IsVectorizable ? VectorizableBit : 0))) + & (HereditaryBits | LinearAccessBit | (ei_functor_traits::PacketAccess ? PacketAccessBit : 0))) | (ei_functor_traits::IsRepeatable ? 0 : EvalBeforeNestingBit), CoeffReadCost = ei_functor_traits::Cost }; @@ -84,7 +84,7 @@ class CwiseNullaryOp : ei_no_assignment_operator, } template - PacketScalar _packetCoeff(int, int) const + PacketScalar _packet(int, int) const { return m_functor.packetOp(); } diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 8715f931e..10228e3ec 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -55,8 +55,8 @@ struct ei_traits > MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, Flags = (MatrixTypeFlags & ( - HereditaryBits | Like1DArrayBit - | (ei_functor_traits::IsVectorizable ? VectorizableBit : 0))), + HereditaryBits | LinearAccessBit + | (ei_functor_traits::PacketAccess ? PacketAccessBit : 0))), CoeffReadCost = MatrixTypeCoeffReadCost + ei_functor_traits::Cost }; }; @@ -83,9 +83,9 @@ class CwiseUnaryOp : ei_no_assignment_operator, } template - inline PacketScalar _packetCoeff(int row, int col) const + inline PacketScalar _packet(int row, int col) const { - return m_functor.packetOp(m_matrix.template packetCoeff(row, col)); + return m_functor.packetOp(m_matrix.template packet(row, col)); } protected: diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h index 5663942ff..11bc36e16 100644 --- a/Eigen/src/Core/DiagonalProduct.h +++ b/Eigen/src/Core/DiagonalProduct.h @@ -41,14 +41,14 @@ struct ei_traits > ColsAtCompileTime = Rhs::ColsAtCompileTime, MaxRowsAtCompileTime = Lhs::MaxRowsAtCompileTime, MaxColsAtCompileTime = Rhs::MaxColsAtCompileTime, - _RhsVectorizable = (RhsFlags & RowMajorBit) && (RhsFlags & VectorizableBit) + _RhsPacketAccess = (RhsFlags & RowMajorBit) && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime % ei_packet_traits::size == 0), - _LhsVectorizable = (!(LhsFlags & RowMajorBit)) && (LhsFlags & VectorizableBit) + _LhsPacketAccess = (!(LhsFlags & RowMajorBit)) && (LhsFlags & PacketAccessBit) && (RowsAtCompileTime % ei_packet_traits::size == 0), - _LostBits = ~(((RhsFlags & RowMajorBit) && (!_LhsVectorizable) ? 0 : RowMajorBit) + _LostBits = ~(((RhsFlags & RowMajorBit) && (!_LhsPacketAccess) ? 0 : RowMajorBit) | ((RowsAtCompileTime == Dynamic || ColsAtCompileTime == Dynamic) ? 0 : LargeBit)), Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & _LostBits) - | (_LhsVectorizable || _RhsVectorizable ? VectorizableBit : 0), + | (_LhsPacketAccess || _RhsPacketAccess ? PacketAccessBit : 0), CoeffReadCost = NumTraits::MulCost + _LhsNested::CoeffReadCost + _RhsNested::CoeffReadCost }; }; @@ -86,17 +86,17 @@ template class Product : } template - const PacketScalar _packetCoeff(int row, int col) const + const PacketScalar _packet(int row, int col) const { if ((Rhs::Flags&Diagonal)==Diagonal) { ei_assert((_LhsNested::Flags&RowMajorBit)==0); - return ei_pmul(m_lhs.template packetCoeff(row, col), ei_pset1(m_rhs.coeff(col, col))); + return ei_pmul(m_lhs.template packet(row, col), ei_pset1(m_rhs.coeff(col, col))); } else { ei_assert(_RhsNested::Flags&RowMajorBit); - return ei_pmul(ei_pset1(m_lhs.coeff(row, row)), m_rhs.template packetCoeff(row, col)); + return ei_pmul(ei_pset1(m_lhs.coeff(row, row)), m_rhs.template packet(row, col)); } } diff --git a/Eigen/src/Core/Extract.h b/Eigen/src/Core/Extract.h index 6671e45b2..473ff7d6b 100755 --- a/Eigen/src/Core/Extract.h +++ b/Eigen/src/Core/Extract.h @@ -53,7 +53,7 @@ struct ei_traits > ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - Flags = (_MatrixTypeNested::Flags & ~(VectorizableBit | Like1DArrayBit | DirectAccessBit)) | Mode, + Flags = (_MatrixTypeNested::Flags & ~(PacketAccessBit | LinearAccessBit | DirectAccessBit)) | Mode, CoeffReadCost = _MatrixTypeNested::CoeffReadCost }; }; diff --git a/Eigen/src/Core/Flagged.h b/Eigen/src/Core/Flagged.h index 54a081f1e..edf1b3fd1 100644 --- a/Eigen/src/Core/Flagged.h +++ b/Eigen/src/Core/Flagged.h @@ -85,15 +85,15 @@ template clas } template - inline const PacketScalar _packetCoeff(int row, int col) const + inline const PacketScalar _packet(int row, int col) const { - return m_matrix.template packetCoeff(row, col); + return m_matrix.template packet(row, col); } template - inline void _writePacketCoeff(int row, int col, const PacketScalar& x) + inline void _writePacket(int row, int col, const PacketScalar& x) { - m_matrix.const_cast_derived().template writePacketCoeff(row, col, x); + m_matrix.const_cast_derived().template writePacket(row, col, x); } protected: diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h index f3ffe10aa..80b0e4ac7 100644 --- a/Eigen/src/Core/Functors.h +++ b/Eigen/src/Core/Functors.h @@ -42,7 +42,7 @@ template struct ei_functor_traits > { enum { Cost = NumTraits::AddCost, - IsVectorizable = ei_packet_traits::size>1 + PacketAccess = ei_packet_traits::size>1 }; }; @@ -61,7 +61,7 @@ template struct ei_functor_traits > { enum { Cost = NumTraits::MulCost, - IsVectorizable = ei_packet_traits::size>1 + PacketAccess = ei_packet_traits::size>1 }; }; @@ -80,7 +80,7 @@ template struct ei_functor_traits > { enum { Cost = NumTraits::AddCost, - IsVectorizable = ei_packet_traits::size>1 + PacketAccess = ei_packet_traits::size>1 }; }; @@ -99,7 +99,7 @@ template struct ei_functor_traits > { enum { Cost = NumTraits::AddCost, - IsVectorizable = ei_packet_traits::size>1 + PacketAccess = ei_packet_traits::size>1 }; }; @@ -121,7 +121,7 @@ template struct ei_functor_traits > { enum { Cost = NumTraits::AddCost, - IsVectorizable = ei_packet_traits::size>1 + PacketAccess = ei_packet_traits::size>1 }; }; @@ -135,7 +135,7 @@ template struct ei_scalar_quotient_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 2 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 2 * NumTraits::MulCost, PacketAccess = false }; }; // unary functors: @@ -150,7 +150,7 @@ template struct ei_scalar_opposite_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::AddCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::AddCost, PacketAccess = false }; }; /** \internal * \brief Template functor to compute the absolute value of a scalar @@ -163,7 +163,7 @@ template struct ei_scalar_abs_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::AddCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::AddCost, PacketAccess = false }; }; /** \internal * \brief Template functor to compute the squared absolute value of a scalar @@ -176,7 +176,7 @@ template struct ei_scalar_abs2_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::MulCost, PacketAccess = false }; }; /** \internal * \brief Template functor to compute the conjugate of a complex value @@ -188,7 +188,7 @@ template struct ei_scalar_conjugate_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::IsComplex ? NumTraits::AddCost : 0, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::IsComplex ? NumTraits::AddCost : 0, PacketAccess = false }; }; /** \internal * \brief Template functor to cast a scalar to another type @@ -202,7 +202,7 @@ struct ei_scalar_cast_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = ei_is_same_type::ret ? 0 : NumTraits::AddCost, IsVectorizable = false }; }; +{ enum { Cost = ei_is_same_type::ret ? 0 : NumTraits::AddCost, PacketAccess = false }; }; /** \internal * \brief Template functor to extract the real part of a complex @@ -216,14 +216,14 @@ struct ei_scalar_real_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = 0, IsVectorizable = false }; }; +{ enum { Cost = 0, PacketAccess = false }; }; /** \internal * \brief Template functor to multiply a scalar by a fixed other one * * \sa class CwiseUnaryOp, MatrixBase::operator*, MatrixBase::operator/ */ -template::size)>1?true:false) > struct ei_scalar_multiple_op; +template::size)>1?true:false) > struct ei_scalar_multiple_op; template struct ei_scalar_multiple_op { @@ -242,7 +242,7 @@ struct ei_scalar_multiple_op { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::MulCost, IsVectorizable = ei_packet_traits::size>1 }; }; +{ enum { Cost = NumTraits::MulCost, PacketAccess = ei_packet_traits::size>1 }; }; template struct ei_scalar_quotient1_impl { @@ -252,7 +252,7 @@ struct ei_scalar_quotient1_impl { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = NumTraits::MulCost, PacketAccess = false }; }; template struct ei_scalar_quotient1_impl { @@ -263,7 +263,7 @@ struct ei_scalar_quotient1_impl { }; template struct ei_functor_traits > -{ enum { Cost = 2 * NumTraits::MulCost, IsVectorizable = false }; }; +{ enum { Cost = 2 * NumTraits::MulCost, PacketAccess = false }; }; /** \internal * \brief Template functor to divide a scalar by a fixed other one @@ -281,7 +281,7 @@ struct ei_scalar_quotient1_op : ei_scalar_quotient1_impl::size)>1?true:false) > struct ei_scalar_constant_op; +template::size)>1?true:false) > struct ei_scalar_constant_op; template struct ei_scalar_constant_op { @@ -300,7 +300,7 @@ struct ei_scalar_constant_op { }; template struct ei_functor_traits > -{ enum { Cost = 1, IsVectorizable = ei_packet_traits::size>1, IsRepeatable = true }; }; +{ enum { Cost = 1, PacketAccess = ei_packet_traits::size>1, IsRepeatable = true }; }; template struct ei_scalar_identity_op EIGEN_EMPTY_STRUCT { inline ei_scalar_identity_op(void) {} @@ -308,6 +308,6 @@ template struct ei_scalar_identity_op EIGEN_EMPTY_STRUCT { }; template struct ei_functor_traits > -{ enum { Cost = NumTraits::AddCost, IsVectorizable = false, IsRepeatable = true }; }; +{ enum { Cost = NumTraits::AddCost, PacketAccess = false, IsRepeatable = true }; }; #endif // EIGEN_FUNCTORS_H diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 6fcc76719..e14999445 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -137,9 +137,9 @@ class Matrix : public MatrixBase - inline PacketScalar _packetCoeff(int row, int col) const + inline PacketScalar _packet(int row, int col) const { - ei_internal_assert(Flags & VectorizableBit); + ei_internal_assert(Flags & PacketAccessBit); if(Flags & RowMajorBit) if (LoadMode==Aligned) return ei_pload(&m_storage.data()[col + row * m_storage.cols()]); @@ -153,9 +153,9 @@ class Matrix : public MatrixBase - inline void _writePacketCoeff(int row, int col, const PacketScalar& x) + inline void _writePacket(int row, int col, const PacketScalar& x) { - ei_internal_assert(Flags & VectorizableBit); + ei_internal_assert(Flags & PacketAccessBit); if(Flags & RowMajorBit) if (StoreMode==Aligned) ei_pstore(&m_storage.data()[col + row * m_storage.cols()], x); diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 5bcd6991d..754a1ec98 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -229,9 +229,9 @@ template class MatrixBase : public ArrayBase Scalar& operator[](int index); template - PacketScalar packetCoeff(int row, int col) const; + PacketScalar packet(int row, int col) const; template - void writePacketCoeff(int row, int col, const PacketScalar& x); + void writePacket(int row, int col, const PacketScalar& x); const Scalar x() const; const Scalar y() const; diff --git a/Eigen/src/Core/NestByValue.h b/Eigen/src/Core/NestByValue.h index 51f38e8d8..0c6cdb114 100644 --- a/Eigen/src/Core/NestByValue.h +++ b/Eigen/src/Core/NestByValue.h @@ -77,15 +77,15 @@ template class NestByValue } template - inline const PacketScalar _packetCoeff(int row, int col) const + inline const PacketScalar _packet(int row, int col) const { - return m_expression.template packetCoeff(row, col); + return m_expression.template packet(row, col); } template - inline void _writePacketCoeff(int row, int col, const PacketScalar& x) + inline void _writePacket(int row, int col, const PacketScalar& x) { - m_expression.const_cast_derived().template writePacketCoeff(row, col, x); + m_expression.const_cast_derived().template writePacket(row, col, x); } protected: diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 857a389d6..8d4ed8779 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -76,7 +76,7 @@ struct ei_packet_product_impl inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { ei_packet_product_impl::run(row, col, lhs, rhs, res); - res = ei_pmadd(ei_pset1(lhs.coeff(row, Index)), rhs.template packetCoeff(Index, col), res); + res = ei_pmadd(ei_pset1(lhs.coeff(row, Index)), rhs.template packet(Index, col), res); } }; @@ -86,7 +86,7 @@ struct ei_packet_product_impl inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { ei_packet_product_impl::run(row, col, lhs, rhs, res); - res = ei_pmadd(lhs.template packetCoeff(row, Index), ei_pset1(rhs.coeff(Index, col)), res); + res = ei_pmadd(lhs.template packet(row, Index), ei_pset1(rhs.coeff(Index, col)), res); } }; @@ -95,7 +95,7 @@ struct ei_packet_product_impl { inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { - res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packetCoeff(0, col)); + res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packet(0, col)); } }; @@ -104,7 +104,7 @@ struct ei_packet_product_impl { inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { - res = ei_pmul(lhs.template packetCoeff(row, 0), ei_pset1(rhs.coeff(0, col))); + res = ei_pmul(lhs.template packet(row, 0), ei_pset1(rhs.coeff(0, col))); } }; @@ -113,9 +113,9 @@ struct ei_packet_product_impl { inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar& res) { - res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packetCoeff(0, col)); + res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packet(0, col)); for(int i = 1; i < lhs.cols(); i++) - res = ei_pmadd(ei_pset1(lhs.coeff(row, i)), rhs.template packetCoeff(i, col), res); + res = ei_pmadd(ei_pset1(lhs.coeff(row, i)), rhs.template packet(i, col), res); } }; @@ -124,9 +124,9 @@ struct ei_packet_product_impl { inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar& res) { - res = ei_pmul(lhs.template packetCoeff(row, 0), ei_pset1(rhs.coeff(0, col))); + res = ei_pmul(lhs.template packet(row, 0), ei_pset1(rhs.coeff(0, col))); for(int i = 1; i < lhs.cols(); i++) - res = ei_pmadd(lhs.template packetCoeff(row, i), ei_pset1(rhs.coeff(i, col)), res); + res = ei_pmadd(lhs.template packet(row, i), ei_pset1(rhs.coeff(i, col)), res); } }; @@ -210,17 +210,17 @@ struct ei_traits > MaxColsAtCompileTime = Rhs::MaxColsAtCompileTime, // the vectorization flags are only used by the normal product, // the other one is always vectorized ! - _RhsVectorizable = (RhsFlags & RowMajorBit) && (RhsFlags & VectorizableBit) && (ColsAtCompileTime % ei_packet_traits::size == 0), - _LhsVectorizable = (!(LhsFlags & RowMajorBit)) && (LhsFlags & VectorizableBit) && (RowsAtCompileTime % ei_packet_traits::size == 0), - _Vectorizable = (_LhsVectorizable || _RhsVectorizable) ? 1 : 0, + _RhsPacketAccess = (RhsFlags & RowMajorBit) && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime % ei_packet_traits::size == 0), + _LhsPacketAccess = (!(LhsFlags & RowMajorBit)) && (LhsFlags & PacketAccessBit) && (RowsAtCompileTime % ei_packet_traits::size == 0), + _PacketAccess = (_LhsPacketAccess || _RhsPacketAccess) ? 1 : 0, _RowMajor = (RhsFlags & RowMajorBit) - && (EvalMode==(int)CacheFriendlyProduct ? (int)LhsFlags & RowMajorBit : (!_LhsVectorizable)), + && (EvalMode==(int)CacheFriendlyProduct ? (int)LhsFlags & RowMajorBit : (!_LhsPacketAccess)), _LostBits = ~((_RowMajor ? 0 : RowMajorBit) | ((RowsAtCompileTime == Dynamic || ColsAtCompileTime == Dynamic) ? 0 : LargeBit)), Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & _LostBits) | EvalBeforeAssigningBit | EvalBeforeNestingBit - | (_Vectorizable ? VectorizableBit : 0), + | (_PacketAccess ? PacketAccessBit : 0), CoeffReadCost = Lhs::ColsAtCompileTime == Dynamic ? Dynamic @@ -276,7 +276,7 @@ template class Product : ei_no_assignm } template - const PacketScalar _packetCoeff(int row, int col) const + const PacketScalar _packet(int row, int col) const { const bool unroll = CoeffReadCost <= EIGEN_UNROLLING_LIMIT; PacketScalar res; diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index 86eecadd5..ddac5fa63 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -49,7 +49,7 @@ struct ei_traits > MaxRowsAtCompileTime = MatrixType::MaxColsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxRowsAtCompileTime, Flags = ((int(_MatrixTypeNested::Flags) ^ RowMajorBit) - & ~( Like1DArrayBit | LowerTriangularBit | UpperTriangularBit)) + & ~( LinearAccessBit | LowerTriangularBit | UpperTriangularBit)) | (int(_MatrixTypeNested::Flags)&UpperTriangularBit ? LowerTriangularBit : 0) | (int(_MatrixTypeNested::Flags)&LowerTriangularBit ? UpperTriangularBit : 0), CoeffReadCost = _MatrixTypeNested::CoeffReadCost @@ -85,15 +85,15 @@ template class Transpose } template - inline const PacketScalar _packetCoeff(int row, int col) const + inline const PacketScalar _packet(int row, int col) const { - return m_matrix.template packetCoeff(col, row); + return m_matrix.template packet(col, row); } template - inline void _writePacketCoeff(int row, int col, const PacketScalar& x) + inline void _writePacket(int row, int col, const PacketScalar& x) { - m_matrix.const_cast_derived().template writePacketCoeff(col, row, x); + m_matrix.const_cast_derived().template writePacket(col, row, x); } protected: diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index fab5b1321..9cac3e984 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -67,15 +67,15 @@ const unsigned int LargeBit = 0x8; /** \ingroup flags * * means the expression might be vectorized */ -const unsigned int VectorizableBit = 0x10; +const unsigned int PacketAccessBit = 0x10; #else -const unsigned int VectorizableBit = 0x0; +const unsigned int PacketAccessBit = 0x0; #endif /** \ingroup flags * * means the expression can be seen as 1D vector (used for explicit vectorization) */ -const unsigned int Like1DArrayBit = 0x20; +const unsigned int LinearAccessBit = 0x20; /** \ingroup flags * diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index f586b15d9..6a3810df6 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -81,7 +81,7 @@ template struct ei_scalar_sin_op; template struct ei_scalar_pow_op; template struct ei_scalar_inverse_op; template struct ei_scalar_cast_op; -template struct ei_scalar_multiple_op; +template struct ei_scalar_multiple_op; template struct ei_scalar_quotient1_op; template struct ei_scalar_min_op; template struct ei_scalar_max_op; diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index e50b3bb81..de732f373 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -137,7 +137,7 @@ template struct ei_functor_traits enum { Cost = 10, - IsVectorizable = false + PacketAccess = false }; }; @@ -157,18 +157,18 @@ class ei_corrected_matrix_flags : Cols > 1 ? RowMajorBit : 0, is_big = MaxRows == Dynamic || MaxCols == Dynamic, inner_size = row_major_bit ? Cols : Rows, - vectorizable_bit + packet_access_bit = ei_packet_traits::size > 1 && (is_big || inner_size%ei_packet_traits::size==0) - ? VectorizableBit : 0, + ? PacketAccessBit : 0, - _flags1 = (SuggestedFlags & ~(EvalBeforeNestingBit | EvalBeforeAssigningBit | VectorizableBit | RowMajorBit)) - | Like1DArrayBit | DirectAccessBit + _flags1 = (SuggestedFlags & ~(EvalBeforeNestingBit | EvalBeforeAssigningBit | PacketAccessBit | RowMajorBit)) + | LinearAccessBit | DirectAccessBit }; public: - enum { ret = (SuggestedFlags & ~(EvalBeforeNestingBit | EvalBeforeAssigningBit | VectorizableBit | RowMajorBit)) - | Like1DArrayBit | DirectAccessBit | vectorizable_bit | row_major_bit + enum { ret = (SuggestedFlags & ~(EvalBeforeNestingBit | EvalBeforeAssigningBit | PacketAccessBit | RowMajorBit)) + | LinearAccessBit | DirectAccessBit | packet_access_bit | row_major_bit }; }; diff --git a/Eigen/src/LU/Inverse.h b/Eigen/src/LU/Inverse.h index e9830cbe1..e8d81a991 100644 --- a/Eigen/src/LU/Inverse.h +++ b/Eigen/src/LU/Inverse.h @@ -87,9 +87,9 @@ template class Inverse : ei_no_assignm } template - PacketScalar _packetCoeff(int row, int col) const + PacketScalar _packet(int row, int col) const { - return m_inverse.template packetCoeff(row, col); + return m_inverse.template packet(row, col); } enum { _Size = MatrixType::RowsAtCompileTime }; diff --git a/disabled/Product.h b/disabled/Product.h index 5d3e99281..d67916da5 100644 --- a/disabled/Product.h +++ b/disabled/Product.h @@ -75,7 +75,7 @@ struct ei_packet_product_unroller inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { ei_packet_product_unroller::run(row, col, lhs, rhs, res); - res = ei_pmadd(ei_pset1(lhs.coeff(row, Index)), rhs.template packetCoeff(Index, col), res); + res = ei_pmadd(ei_pset1(lhs.coeff(row, Index)), rhs.template packet(Index, col), res); } }; @@ -85,7 +85,7 @@ struct ei_packet_product_unroller inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { ei_packet_product_unroller::run(row, col, lhs, rhs, res); - res = ei_pmadd(lhs.template packetCoeff(row, Index), ei_pset1(rhs.coeff(Index, col)), res); + res = ei_pmadd(lhs.template packet(row, Index), ei_pset1(rhs.coeff(Index, col)), res); } }; @@ -94,7 +94,7 @@ struct ei_packet_product_unroller { inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { - res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packetCoeff(0, col)); + res = ei_pmul(ei_pset1(lhs.coeff(row, 0)),rhs.template packet(0, col)); } }; @@ -103,7 +103,7 @@ struct ei_packet_product_unroller { inline static void run(int row, int col, const Lhs& lhs, const Rhs& rhs, PacketScalar &res) { - res = ei_pmul(lhs.template packetCoeff(row, 0), ei_pset1(rhs.coeff(0, col))); + res = ei_pmul(lhs.template packet(row, 0), ei_pset1(rhs.coeff(0, col))); } }; @@ -125,14 +125,14 @@ struct ei_packet_product_unroller static void run(int, int, const Lhs&, const Rhs&, PacketScalar&) {} }; -template struct ProductPacketCoeffImpl { +template struct ProductPacketImpl { inline static typename Product::PacketScalar execute(const Product& product, int row, int col) - { return product._packetCoeffRowMajor(row,col); } + { return product._packetRowMajor(row,col); } }; -template struct ProductPacketCoeffImpl { +template struct ProductPacketImpl { inline static typename Product::PacketScalar execute(const Product& product, int row, int col) - { return product._packetCoeffColumnMajor(row,col); } + { return product._packetColumnMajor(row,col); } }; /** \class Product @@ -174,18 +174,18 @@ struct ei_traits > ColsAtCompileTime = Rhs::ColsAtCompileTime, MaxRowsAtCompileTime = Lhs::MaxRowsAtCompileTime, MaxColsAtCompileTime = Rhs::MaxColsAtCompileTime, - _RhsVectorizable = (RhsFlags & RowMajorBit) && (RhsFlags & VectorizableBit) && (ColsAtCompileTime % ei_packet_traits::size == 0), - _LhsVectorizable = (!(LhsFlags & RowMajorBit)) && (LhsFlags & VectorizableBit) && (RowsAtCompileTime % ei_packet_traits::size == 0), - _Vectorizable = (_LhsVectorizable || _RhsVectorizable) ? 1 : 0, + _RhsPacketAccess = (RhsFlags & RowMajorBit) && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime % ei_packet_traits::size == 0), + _LhsPacketAccess = (!(LhsFlags & RowMajorBit)) && (LhsFlags & PacketAccessBit) && (RowsAtCompileTime % ei_packet_traits::size == 0), + _PacketAccess = (_LhsPacketAccess || _RhsPacketAccess) ? 1 : 0, _RowMajor = (RhsFlags & RowMajorBit) - && (EvalMode==(int)CacheFriendlyProduct ? (int)LhsFlags & RowMajorBit : (!_LhsVectorizable)), + && (EvalMode==(int)CacheFriendlyProduct ? (int)LhsFlags & RowMajorBit : (!_LhsPacketAccess)), _LostBits = HereditaryBits & ~( (_RowMajor ? 0 : RowMajorBit) | ((RowsAtCompileTime == Dynamic || ColsAtCompileTime == Dynamic) ? 0 : LargeBit)), Flags = ((unsigned int)(LhsFlags | RhsFlags) & _LostBits) | EvalBeforeAssigningBit | EvalBeforeNestingBit - | (_Vectorizable ? VectorizableBit : 0), + | (_PacketAccess ? PacketAccessBit : 0), CoeffReadCost = Lhs::ColsAtCompileTime == Dynamic ? Dynamic @@ -201,7 +201,7 @@ template class Product : ei_no_assignm public: EIGEN_GENERIC_PUBLIC_INTERFACE(Product) - friend class ProductPacketCoeffImpl; + friend class ProductPacketImpl; typedef typename ei_traits::LhsNested LhsNested; typedef typename ei_traits::RhsNested RhsNested; typedef typename ei_traits::_LhsNested _LhsNested; @@ -247,7 +247,7 @@ template class Product : ei_no_assignm } template - const PacketScalar _packetCoeff(int row, int col) const + const PacketScalar _packet(int row, int col) const { if(Lhs::ColsAtCompileTime <= EIGEN_UNROLLING_LIMIT) { @@ -260,33 +260,33 @@ template class Product : ei_no_assignm return res; } else - return ProductPacketCoeffImpl::execute(*this, row, col); + return ProductPacketImpl::execute(*this, row, col); } - const PacketScalar _packetCoeffRowMajor(int row, int col) const + const PacketScalar _packetRowMajor(int row, int col) const { PacketScalar res; - res = ei_pmul(ei_pset1(m_lhs.coeff(row, 0)),m_rhs.template packetCoeff(0, col)); + res = ei_pmul(ei_pset1(m_lhs.coeff(row, 0)),m_rhs.template packet(0, col)); for(int i = 1; i < m_lhs.cols(); i++) - res = ei_pmadd(ei_pset1(m_lhs.coeff(row, i)), m_rhs.template packetCoeff(i, col), res); + res = ei_pmadd(ei_pset1(m_lhs.coeff(row, i)), m_rhs.template packet(i, col), res); return res; } - const PacketScalar _packetCoeffColumnMajor(int row, int col) const + const PacketScalar _packetColumnMajor(int row, int col) const { PacketScalar res; - res = ei_pmul(m_lhs.template packetCoeff(row, 0), ei_pset1(m_rhs.coeff(0, col))); + res = ei_pmul(m_lhs.template packet(row, 0), ei_pset1(m_rhs.coeff(0, col))); for(int i = 1; i < m_lhs.cols(); i++) - res = ei_pmadd(m_lhs.template packetCoeff(row, i), ei_pset1(m_rhs.coeff(i, col)), res); + res = ei_pmadd(m_lhs.template packet(row, i), ei_pset1(m_rhs.coeff(i, col)), res); return res; // const PacketScalar tmp[4]; -// ei_punpack(m_rhs.packetCoeff(0,col), tmp); +// ei_punpack(m_rhs.packet(0,col), tmp); // // return -// ei_pmadd(m_lhs.packetCoeff(row, 0), tmp[0], -// ei_pmadd(m_lhs.packetCoeff(row, 1), tmp[1], -// ei_pmadd(m_lhs.packetCoeff(row, 2), tmp[2] -// ei_pmul(m_lhs.packetCoeff(row, 3), tmp[3])))); +// ei_pmadd(m_lhs.packet(row, 0), tmp[0], +// ei_pmadd(m_lhs.packet(row, 1), tmp[1], +// ei_pmadd(m_lhs.packet(row, 2), tmp[2] +// ei_pmul(m_lhs.packet(row, 3), tmp[3])))); } @@ -328,7 +328,7 @@ inline Derived& MatrixBase::lazyAssign(const Product(derived(), #ifdef EIGEN_VECTORIZE - typename ei_meta_if::ret() + typename ei_meta_if::ret() #else ei_meta_false() #endif @@ -426,12 +426,12 @@ void Product::_cacheOptimalEval(DestDerived& res, ei_meta_true const typename ei_packet_traits::type tmp3 = ei_pset1(m_lhs.coeff(k,j+3)); for (int i=0; icols(); i+=ei_packet_traits::size) { - res.template writePacketCoeff(k,i, - ei_pmadd(tmp0, m_rhs.template packetCoeff(j+0,i), - ei_pmadd(tmp1, m_rhs.template packetCoeff(j+1,i), - ei_pmadd(tmp2, m_rhs.template packetCoeff(j+2,i), - ei_pmadd(tmp3, m_rhs.template packetCoeff(j+3,i), - res.template packetCoeff(k,i))))) + res.template writePacket(k,i, + ei_pmadd(tmp0, m_rhs.template packet(j+0,i), + ei_pmadd(tmp1, m_rhs.template packet(j+1,i), + ei_pmadd(tmp2, m_rhs.template packet(j+2,i), + ei_pmadd(tmp3, m_rhs.template packet(j+3,i), + res.template packet(k,i))))) ); } } @@ -442,8 +442,8 @@ void Product::_cacheOptimalEval(DestDerived& res, ei_meta_true { const typename ei_packet_traits::type tmp = ei_pset1(m_lhs.coeff(k,j)); for (int i=0; icols(); i+=ei_packet_traits::size) - res.template writePacketCoeff(k,i, - ei_pmadd(tmp, m_rhs.template packetCoeff(j,i), res.template packetCoeff(k,i))); + res.template writePacket(k,i, + ei_pmadd(tmp, m_rhs.template packet(j,i), res.template packet(k,i))); } } } @@ -462,12 +462,12 @@ void Product::_cacheOptimalEval(DestDerived& res, ei_meta_true for (int i=0; irows(); i+=ei_packet_traits::size) { - res.template writePacketCoeff(i,j, - ei_pmadd(tmp0, m_lhs.template packetCoeff(i,k), - ei_pmadd(tmp1, m_lhs.template packetCoeff(i,k+1), - ei_pmadd(tmp2, m_lhs.template packetCoeff(i,k+2), - ei_pmadd(tmp3, m_lhs.template packetCoeff(i,k+3), - res.template packetCoeff(i,j))))) + res.template writePacket(i,j, + ei_pmadd(tmp0, m_lhs.template packet(i,k), + ei_pmadd(tmp1, m_lhs.template packet(i,k+1), + ei_pmadd(tmp2, m_lhs.template packet(i,k+2), + ei_pmadd(tmp3, m_lhs.template packet(i,k+3), + res.template packet(i,j))))) ); } } @@ -478,8 +478,8 @@ void Product::_cacheOptimalEval(DestDerived& res, ei_meta_true { const typename ei_packet_traits::type tmp = ei_pset1(m_rhs.coeff(k,j)); for (int i=0; irows(); i+=ei_packet_traits::size) - res.template writePacketCoeff(k,j, - ei_pmadd(tmp, m_lhs.template packetCoeff(i,k), res.template packetCoeff(i,j))); + res.template writePacket(k,j, + ei_pmadd(tmp, m_lhs.template packet(i,k), res.template packet(i,j))); } } }