Argon 0.1.0
Loading...
Searching...
No Matches
lane_scalar.hpp
Go to the documentation of this file.
1#pragma once
2#include <concepts>
3#include <type_traits>
4#include "argon/features.h"
5
6#if ARGON_HAS_HALF_FLOAT
7#ifdef __ARM_FEATURE_MVE
8#include <arm_mve.h>
9#else
10#include <arm_neon.h>
11#endif
12#endif
13
16
17namespace argon {
18
21template <typename T>
22constexpr bool is_half_float_v =
23#if ARGON_HAS_HALF_FLOAT
24 std::is_same_v<std::remove_cv_t<T>, float16_t>;
25#else
26 false;
27#endif
28
30template <typename T>
31concept lane_scalar = std::is_arithmetic_v<T> || is_half_float_v<T>;
32
34template <typename T>
35concept lane_floating_point = std::floating_point<T> || is_half_float_v<T>;
36
37} // namespace argon
A floating-point lane type: float, double, or float16_t where half-float vectors exist.
Definition lane_scalar.hpp:35
A scalar type a vector lane can hold: an arithmetic type, or float16_t where half-float vectors exist...
Definition lane_scalar.hpp:31
Header file for SIMD features and platform detection.
A 128-bit SIMD vector wrapping a scalar type, providing arithmetic, logical, and data-movement operat...
Definition argon.hpp:30
constexpr bool is_half_float_v
Whether T is the half-precision lane type, float16_t (__fp16), on a platform with half-float vectors.
Definition lane_scalar.hpp:22