Argon 0.1.0
Loading...
Searching...
No Matches
vec64.hpp
1#pragma once
2#include "argon/features.h"
3
4#ifdef __ARM_NEON
5#include <arm_neon.h>
6#define simd neon
7#elifdef __ARM_FEATURE_MVE
8#include <arm_mve.h>
9#define simd mve
10#else
12#define simd neon
13#endif
14
15namespace simd {
16// clang-format off
17#ifndef ARGON_PLATFORM_MVE
18
21template <typename T> struct Vec64;
22
24template <> struct Vec64<int8_t> { using type = int8x8_t; };
25template <> struct Vec64<uint8_t> { using type = uint8x8_t; };
26template <> struct Vec64<int16_t> { using type = int16x4_t; };
27template <> struct Vec64<uint16_t> { using type = uint16x4_t; };
28template <> struct Vec64<int32_t> { using type = int32x2_t; };
29template <> struct Vec64<uint32_t> { using type = uint32x2_t; };
30template <> struct Vec64<int64_t> { using type = int64x1_t; };
31template <> struct Vec64<uint64_t> { using type = uint64x1_t; };
32
33#if ARGON_HAS_SINGLE_FLOAT
34template <> struct Vec64<float> {using type = float32x2_t; };
35#endif
36
37#if ARGON_HAS_HALF_FLOAT
38template <> struct Vec64<float16_t> {using type = float16x4_t; };
39#endif
40
41#if ARGON_HAS_DOUBLE_FLOAT
42template <> struct Vec64<float64_t> {using type = float64x1_t; };
43#endif
45
48template <typename T>
49using Vec64_t = typename Vec64<std::remove_cv_t<T>>::type;
50
51#endif
52// clang-format on
53} // namespace simd
54#undef simd
Header file for SIMD features and platform detection.
SIMDe's NEON implementation (x86 and other non-Arm hosts) under the NEON intrinsic names.
Helper template to get the SIMD double-word vector type for a given scalar type.
Definition vec64.hpp:21