Contains helper templates and concepts for type manipulation and compile-time utilities.
More...
|
|
uint32_t | saturate_to_uint32 (float x) |
|
int32x4_t | convert_to_int32 (float32x4_t a) |
|
int32x2_t | convert_to_int32 (float32x2_t a) |
|
uint32x4_t | convert_to_uint32 (float32x4_t a) |
|
uint32x2_t | convert_to_uint32 (float32x2_t a) |
|
template<int fracbits> |
| int32x4_t | convert_n_to_int32 (float32x4_t a) |
|
template<int fracbits> |
| int32x2_t | convert_n_to_int32 (float32x2_t a) |
|
template<int fracbits> |
| uint32x4_t | convert_n_to_uint32 (float32x4_t a) |
|
template<int fracbits> |
| uint32x2_t | convert_n_to_uint32 (float32x2_t a) |
| template<typename T> |
| constexpr size_t | vectorizeable_size (size_t size) |
| | Calculates the size of a vectorized range.
|
| template<typename T> |
| constexpr size_t | vectorized_size (size_t size) |
| | Calculates the number of vectorized elements in a range.
|
Contains helper templates and concepts for type manipulation and compile-time utilities.
Workarounds that keep Argon's float operations on NEON with the NEON instructions' semantics.
- GCC on AArch32 scalarises generic vector-extension float arithmetic, comparisons and ?: to VFP unless -ffast-math is on (AArch32 NEON flushes denormals, so it is not IEEE), and its arm_neon.h implements vc{lt,gt,le,ge}{q}_f32 as such generic comparisons. Argon uses the NEON builtins behind the arithmetic intrinsics there (see ARGON_GCC_AARCH32_FLOAT), and the inline vcgt/vcge below for comparisons.
- clang on AArch32 lowers vcvt{q}_{s,u}32_f32 to IR fptosi/fptoui, which are poison for NaN and out-of-range inputs and get constant-folded to wrong values (AArch64 uses llvm.fpto{s,u}i.sat). The conversions below emit vcvt directly there, keeping its truncate/saturate/NaN→0 semantics.
- SIMDe (x86) converts float values between 2^31 and 2^32 to uint32 as 2^31; the conversions below convert per lane there.
template<typename VectorType, typename ScalarType>
Initial value:std::conditional_t<std::is_integral_v<ScalarType> && std::is_integral_v<simd::Scalar_t<VectorType>> &&
sizeof(ScalarType) == sizeof(simd::Scalar_t<VectorType>) &&
std::is_signed_v<ScalarType> == std::is_signed_v<simd::Scalar_t<VectorType>>,
simd::Scalar_t<VectorType>, ScalarType>
The lane type for a ScalarType value used alongside VectorType's lanes.
An integer of the same size and signedness as VectorType's lanes becomes that lane type, so a literal like 3 (int) pairs with int32_t lanes even where int32_t is long (arm-none-eabi), which has no Argon<int>.