Argon
0.1.0
Loading...
Searching...
No Matches
bool.hpp
1
#pragma once
2
#include "
argon/features.h
"
3
#include "arm_simd/helpers/make_unsigned.hpp"
4
5
#ifdef __ARM_FEATURE_MVE
6
#define simd mve
7
#else
8
#define simd neon
9
#endif
10
11
namespace
argon {
12
// clang-format off
13
16
template
<
typename
T>
struct
Bool
{
17
using
type =
typename
simd::make_unsigned<T>::type;
18
};
19
21
#if ARGON_HAS_SINGLE_FLOAT
22
template
<>
struct
Bool
<float32x4_t> {
using
type
= uint32x4_t; };
23
24
#ifndef ARGON_PLATFORM_MVE
25
template
<>
struct
Bool<float32x2_t> {
using
type = uint32x2_t; };
26
#endif
27
#endif
28
29
#if ARGON_HAS_DOUBLE_FLOAT
30
template
<>
struct
Bool
<float64x2_t> {
using
type = uint64x2_t; };
31
32
#ifndef ARGON_PLATFORM_MVE
33
template
<>
struct
Bool
<float64x1_t> {
using
type = uint64x1_t; };
34
#endif
35
#endif
36
37
#if ARGON_HAS_HALF_FLOAT
38
template
<>
struct
Bool
<float16x8_t> {
using
type = uint16x8_t; };
39
40
#ifndef ARGON_PLATFORM_MVE
41
template
<>
struct
Bool
<float16x4_t> {
using
type = uint16x4_t; };
42
#endif
43
#endif
45
48
template
<
typename
T>
49
using
Bool_t = Bool<T>::type;
50
// clang-format on
51
}
// namespace argon
52
#undef simd
features.h
Header file for SIMD features and platform detection.
argon::Bool
Helper template to determine the boolean type of a SIMD operation.
Definition
bool.hpp:16
include
argon
helpers
bool.hpp
Generated by
1.14.0