一呼百應, "one call, a hundred responses"
Loading...
Searching...
No Matches
Function Multi-Versioning
Collaboration diagram for Function Multi-Versioning:

Macros

#define ein_target(x)
 this indicates a required feature set for the current multiversioned function.
 
#define ein_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

◆ ein_target

#define ein_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 43 of file targets.hpp.

◆ ein_target_clones

#define ein_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 53 of file targets.hpp.