Remove redundant EIGEN_STRONG_INLINE from trivial constexpr and = default functions

libeigen/eigen!2161

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-02-20 19:50:52 -08:00
parent e0a8d6c9d8
commit 270ea539fa
26 changed files with 274 additions and 333 deletions

View File

@@ -229,7 +229,7 @@ struct gemv_static_vector_if;
template <typename Scalar, int Size, int MaxSize>
struct gemv_static_vector_if<Scalar, Size, MaxSize, false> {
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr Scalar* data() {
EIGEN_DEVICE_FUNC constexpr Scalar* data() {
eigen_internal_assert(false && "should never be called");
return 0;
}
@@ -237,19 +237,19 @@ struct gemv_static_vector_if<Scalar, Size, MaxSize, false> {
template <typename Scalar, int Size>
struct gemv_static_vector_if<Scalar, Size, Dynamic, true> {
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr Scalar* data() { return 0; }
EIGEN_DEVICE_FUNC constexpr Scalar* data() { return 0; }
};
template <typename Scalar, int Size, int MaxSize>
struct gemv_static_vector_if<Scalar, Size, MaxSize, true> {
#if EIGEN_MAX_STATIC_ALIGN_BYTES != 0
internal::plain_array<Scalar, internal::min_size_prefer_fixed(Size, MaxSize), 0, AlignedMax> m_data;
EIGEN_STRONG_INLINE constexpr Scalar* data() { return m_data.array; }
constexpr Scalar* data() { return m_data.array; }
#else
// Some architectures cannot align on the stack,
// => let's manually enforce alignment by allocating more data and return the address of the first aligned element.
internal::plain_array<Scalar, internal::min_size_prefer_fixed(Size, MaxSize) + EIGEN_MAX_ALIGN_BYTES, 0> m_data;
EIGEN_STRONG_INLINE constexpr Scalar* data() {
constexpr Scalar* data() {
return reinterpret_cast<Scalar*>((std::uintptr_t(m_data.array) & ~(std::size_t(EIGEN_MAX_ALIGN_BYTES - 1))) +
EIGEN_MAX_ALIGN_BYTES);
}