native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
Function Multi-Versioning

attributes for function multiversioning More...

Collaboration diagram for Function Multi-Versioning:

Macros

#define native_target(x)
 this indicates a required feature set for the current multiversioned function.
#define native_target_clones(...)
 this indicates a required feature set for the current multiversioned function.

Detailed Description

attributes for function multiversioning

Multi-versioned functions have their symbols resolved at linkage time by a function that can look at the CPU and make linking decisions. These are theoretically great!

Warning

Unfortunately, they don't support [[flatten]] and they don't support function templates as implemented at this time. When they do they'll become a powerful tool.

Macro Definition Documentation

◆ native_target

#define native_target ( x)
Value:
__attribute__((target(x)))

this indicates a required feature set for the current multiversioned function.

Overloads will be resolved at load time by the linker based on detected cpu capabilities. Unfortunately this cannot be applied to templated functions (or ones that take auto)

Definition at line 476 of file attributes.h.

◆ native_target_clones

#define native_target_clones ( ...)
Value:
__attribute__((target_clones(_VA_ARGS_)))

this indicates a required feature set for the current multiversioned function.

Overloads will be resolved at load time.

Definition at line 486 of file attributes.h.