native
0.0.1
Vectors, masks and wide register packs for C++26
Main Page
Related Pages
Topics
Modules
Namespaces
Concepts
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
exp_policies.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 <native/targets.h>
5
#include "native/kernel_policies.h"
6
7
// Clang attributes require literal target strings.
8
#define NATIVE_TARGET_exp_base NATIVE_KERNEL_TARGET_2
9
#define NATIVE_TARGET_exp_bw NATIVE_KERNEL_TARGET_3
10
#define NATIVE_TARGET_exp_vl NATIVE_KERNEL_TARGET_4
11
12
namespace
native::detail {
13
// Every callee in the binary32 graph uses this same five-way split.
14
template
<isa<x86> A>
inline
constexpr
auto
exp_target=
15
target<A,avx512,kernel_bw,kernel_vl,kernel_base,avx2>
;
16
}
17
18
// Ordinal and literal Clang target for each body.
19
#define NATIVE_EXP_TARGETS(X) \
20
X(0,avx512) \
21
X(1,exp_bw) \
22
X(2,exp_vl) \
23
X(3,exp_base) \
24
X(4,avx2)
25
26
#define CHECK_EXP_TARGET(i,name) \
27
static_assert(::native::detail::exp_target<::native::target_features<::native::x86>(NATIVE_TARGET_STRING(name))> == i);
28
NATIVE_EXP_TARGETS(CHECK_EXP_TARGET)
29
#undef CHECK_EXP_TARGET
native::target
constexpr int target
First matching requirement, with every later choice checked for shadowing.
Definition
isa.h:396
src
native
exp_policies.h
Generated by
1.18.0