native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
integer.h
1#pragma once
2#include "native/simd.h"
3
4namespace native::detail {
5 // A complete instruction register may provide only storage and transfers.
6 // Integer algorithms need the arithmetic operations of a kernel shape.
7 template<class T, std::size_t N, isa<> Arch>
8 concept integer_arithmetic = simd_integer_element<T> && requires(simd<T,N,Arch> value) {
9 typename simd<T,N,Arch>::native_type;
10 { value + value } -> std::same_as<simd<T,N,Arch>>;
11 { value - value } -> std::same_as<simd<T,N,Arch>>;
12 { value & value } -> std::same_as<simd<T,N,Arch>>;
13 { value.template right<1>() } -> std::same_as<simd<T,N,Arch>>;
14 };
15}
16
17#define NATIVE_BACKEND_BODY "native/integer_body.h"
18#include "native/simd/for_each_backend.h"
19#undef NATIVE_BACKEND_BODY