mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-25 21:28:13 +00:00
Add @(fast_math={...}) + intrinsics.Fast_Math_Flags
This commit is contained in:
@@ -805,6 +805,34 @@ gb_global Type *t_atomic_memory_order = nullptr;
|
||||
|
||||
|
||||
|
||||
enum OdinFastMathFlag : u8 {
|
||||
OdinFastMath_Allow_Reassoc = 0,
|
||||
OdinFastMath_No_NaNs = 1,
|
||||
OdinFastMath_No_Infs = 2,
|
||||
OdinFastMath_No_Signed_Zeros = 3,
|
||||
OdinFastMath_Allow_Reciprocal = 4,
|
||||
OdinFastMath_Allow_Contract = 5,
|
||||
OdinFastMath_Approx_Func = 6,
|
||||
|
||||
OdinFastMath_COUNT,
|
||||
};
|
||||
|
||||
char const *OdinFastMathFlag_strings[OdinFastMath_COUNT] = {
|
||||
"Allow_Reassoc",
|
||||
"No_NaNs",
|
||||
"No_Infs",
|
||||
"No_Signed_Zeros",
|
||||
"Allow_Reciprocal",
|
||||
"Allow_Contract",
|
||||
"Approx_Func",
|
||||
};
|
||||
|
||||
gb_global Type *t_fast_math_flag = nullptr; // named enum
|
||||
gb_global Type *t_fast_math_flags = nullptr; // named bit_set
|
||||
|
||||
|
||||
|
||||
|
||||
gb_global RecursiveMutex g_type_mutex;
|
||||
|
||||
struct TypePath;
|
||||
|
||||
Reference in New Issue
Block a user