9#ifdef __ARM_FEATURE_MVE
15#ifdef ARGON_PLATFORM_SIMDE
16#define nce [[gnu::always_inline]] inline
18#define nce [[gnu::always_inline]] constexpr
20#define nce [[gnu::always_inline]] inline
24#ifndef ARGON_PLATFORM_MVE
27template <
typename VectorType,
int Lane>
28nce VectorType duplicate_half_lane(Vec64_t<Scalar_t<VectorType>> vec) {
29 if constexpr (is_quadword_v<VectorType>) {
30 return simd::duplicate_lane_quad<Lane>(vec);
31 }
else if constexpr (
sizeof(VectorType) ==
sizeof(Scalar_t<VectorType>)) {
34 return simd::duplicate_lane<Lane>(vec);
42template <
typename VectorType>
43nce VectorType duplicate_lane(Vec64_t<Scalar_t<VectorType>> vec,
const int i) {
44 constexpr int half_lanes =
sizeof(Vec64_t<Scalar_t<VectorType>>) /
sizeof(Scalar_t<VectorType>);
45 if constexpr (half_lanes == 1) {
46 return detail::duplicate_half_lane<VectorType, 0>(vec);
47 }
else if constexpr (half_lanes == 2) {
50 return detail::duplicate_half_lane<VectorType, 0>(vec);
52 return detail::duplicate_half_lane<VectorType, 1>(vec);
56 }
else if constexpr (half_lanes == 4) {
59 return detail::duplicate_half_lane<VectorType, 0>(vec);
61 return detail::duplicate_half_lane<VectorType, 1>(vec);
63 return detail::duplicate_half_lane<VectorType, 2>(vec);
65 return detail::duplicate_half_lane<VectorType, 3>(vec);
70 static_assert(half_lanes == 8);
73 return detail::duplicate_half_lane<VectorType, 0>(vec);
75 return detail::duplicate_half_lane<VectorType, 1>(vec);
77 return detail::duplicate_half_lane<VectorType, 2>(vec);
79 return detail::duplicate_half_lane<VectorType, 3>(vec);
81 return detail::duplicate_half_lane<VectorType, 4>(vec);
83 return detail::duplicate_half_lane<VectorType, 5>(vec);
85 return detail::duplicate_half_lane<VectorType, 6>(vec);
87 return detail::duplicate_half_lane<VectorType, 7>(vec);
Header file for SIMD features and platform detection.