native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
mask_traits.h
1// SPDX-FileCopyrightText: 2026 Edward Kmett <ekmett@gmail.com>
2// SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0
3#pragma once
4#include <array>
5#include <cstddef>
6#include <type_traits>
7
8namespace native {
12 template<class T> struct mask_traits {};
13
16 template<class T> requires std::is_arithmetic_v<T>
17 struct mask_traits<T> { using type = bool; };
18
21 template<class T>
23
27 template<class T, std::size_t N> requires requires { typename mask<T>; }
28 struct mask_traits<std::array<T, N>> { using type = std::array<mask<T>, N>; };
29}
std::string_view const type
typename mask_traits< std::remove_cvref_t< T > >::type mask
Definition mask_traits.h:22
Architecture-tagged vectors, register packs and supporting value types. Native arithmetic follows its...
Standard-library adaptations documented here for SIMD value types.