Change inline hint for general_matrix_vector_product<>::run() to gain performance

libeigen/eigen!2092
This commit is contained in:
Yu You
2026-01-09 11:46:37 -08:00
committed by Antonio Sánchez
parent 7aea350ba1
commit 0315fb319a

View File

@@ -97,14 +97,13 @@ struct general_matrix_vector_product<Index, LhsScalar, LhsMapper, ColMajor, Conj
typedef typename QuarterTraits::RhsPacket RhsPacketQuarter; typedef typename QuarterTraits::RhsPacket RhsPacketQuarter;
typedef typename QuarterTraits::ResPacket ResPacketQuarter; typedef typename QuarterTraits::ResPacket ResPacketQuarter;
EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE static void run(Index rows, Index cols, const LhsMapper& lhs, EIGEN_DEVICE_FUNC inline static void run(Index rows, Index cols, const LhsMapper& lhs, const RhsMapper& rhs,
const RhsMapper& rhs, ResScalar* res, Index resIncr, ResScalar* res, Index resIncr, RhsScalar alpha);
RhsScalar alpha);
}; };
template <typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar, template <typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar,
typename RhsMapper, bool ConjugateRhs, int Version> typename RhsMapper, bool ConjugateRhs, int Version>
EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void EIGEN_DEVICE_FUNC inline void
general_matrix_vector_product<Index, LhsScalar, LhsMapper, ColMajor, ConjugateLhs, RhsScalar, RhsMapper, ConjugateRhs, general_matrix_vector_product<Index, LhsScalar, LhsMapper, ColMajor, ConjugateLhs, RhsScalar, RhsMapper, ConjugateRhs,
Version>::run(Index rows, Index cols, const LhsMapper& alhs, const RhsMapper& rhs, Version>::run(Index rows, Index cols, const LhsMapper& alhs, const RhsMapper& rhs,
ResScalar* res, Index resIncr, RhsScalar alpha) { ResScalar* res, Index resIncr, RhsScalar alpha) {
@@ -290,14 +289,13 @@ struct general_matrix_vector_product<Index, LhsScalar, LhsMapper, RowMajor, Conj
typedef typename QuarterTraits::RhsPacket RhsPacketQuarter; typedef typename QuarterTraits::RhsPacket RhsPacketQuarter;
typedef typename QuarterTraits::ResPacket ResPacketQuarter; typedef typename QuarterTraits::ResPacket ResPacketQuarter;
EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE static void run(Index rows, Index cols, const LhsMapper& lhs, EIGEN_DEVICE_FUNC static inline void run(Index rows, Index cols, const LhsMapper& lhs, const RhsMapper& rhs,
const RhsMapper& rhs, ResScalar* res, Index resIncr, ResScalar* res, Index resIncr, ResScalar alpha);
ResScalar alpha);
}; };
template <typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar, template <typename Index, typename LhsScalar, typename LhsMapper, bool ConjugateLhs, typename RhsScalar,
typename RhsMapper, bool ConjugateRhs, int Version> typename RhsMapper, bool ConjugateRhs, int Version>
EIGEN_DEVICE_FUNC EIGEN_DONT_INLINE void EIGEN_DEVICE_FUNC inline void
general_matrix_vector_product<Index, LhsScalar, LhsMapper, RowMajor, ConjugateLhs, RhsScalar, RhsMapper, ConjugateRhs, general_matrix_vector_product<Index, LhsScalar, LhsMapper, RowMajor, ConjugateLhs, RhsScalar, RhsMapper, ConjugateRhs,
Version>::run(Index rows, Index cols, const LhsMapper& alhs, const RhsMapper& rhs, Version>::run(Index rows, Index cols, const LhsMapper& alhs, const RhsMapper& rhs,
ResScalar* res, Index resIncr, ResScalar alpha) { ResScalar* res, Index resIncr, ResScalar alpha) {