4#include "native/config.h"
12#if NATIVE_HOST_NEON || defined(NATIVE_DOXYGEN)
13namespace native::detail::arm_pmull {
15 template<isa<arm> Arch>
requires(Arch.has(arm_feature::pmull))
16 [[nodiscard]] hint_inline hint_const hint_target(
"aes")
17 poly128_t pmull(poly64_t a, poly64_t b) noexcept {
18 return vmull_p64(a, b);
21 template<isa<arm> Arch>
requires(Arch.has(arm_feature::pmull))
22 [[nodiscard]] hint_inline hint_const hint_target(
"aes")
23 poly128_t pmull2(poly64x2_t a, poly64x2_t b) noexcept {
24 return vmull_high_p64(a, b);
27 template<isa<arm> Arch>
requires(Arch.has(arm_feature::neon))
28 [[nodiscard]] hint_inline hint_const
29 poly16x8_t
pmull(poly8x8_t a, poly8x8_t b)
noexcept {
30 return vmull_p8(a, b);
33 template<isa<arm> Arch>
requires(Arch.has(arm_feature::neon))
34 [[nodiscard]] hint_inline hint_const
35 poly16x8_t
pmull2(poly8x16_t a, poly8x16_t b)
noexcept {
36 return vmull_high_p8(a, b);
40 template<isa<arm> Arch,
class... T>
void pmull(T...) =
delete;
42 template<isa<arm> Arch,
class... T>
void pmull2(T...) =
delete;
constexpr simd< std::uint64_t, 2, Arch > pmull(std::uint64_t a, std::uint64_t b) noexcept
constexpr simd< std::uint64_t, 2, Arch > pmull2(simd< std::uint64_t, 2, Arch > a, simd< std::uint64_t, 2, Arch > b) noexcept
Multiply the high 64-bit polynomial lane of each operand; lower lanes are ignored.