mirror of
https://github.com/matrix-construct/construct
synced 2024-12-24 14:34:00 +01:00
ircd::fpe: Add debug log info; cold sections.
This commit is contained in:
parent
366289823e
commit
e68b93fa61
3 changed files with 60 additions and 0 deletions
|
@ -28,6 +28,8 @@ namespace ircd::fpe
|
|||
|
||||
void set_round(const std::float_round_style &style);
|
||||
std::fexcept_t set_excepts(const ushort &flag);
|
||||
|
||||
void debug_info();
|
||||
}
|
||||
|
||||
/// scope_round
|
||||
|
|
56
ircd/fpe.cc
56
ircd/fpe.cc
|
@ -12,6 +12,62 @@
|
|||
#pragma STDC FENV_ACCESS on
|
||||
#endif
|
||||
|
||||
[[gnu::cold]]
|
||||
void
|
||||
ircd::fpe::debug_info()
|
||||
{
|
||||
log::logf
|
||||
{
|
||||
log::star, log::DEBUG,
|
||||
"FLT RAD=%d DIG=%-2d MANT=%-3d EPS=%-7lf MIN=%-8lf MAX=%-7lf"
|
||||
" EXPMIN=%-7d EXPMAX=%-6d EXP10MIN=%-6d EXP10MAX=%-5d",
|
||||
FLT_RADIX,
|
||||
FLT_DIG,
|
||||
FLT_MANT_DIG,
|
||||
FLT_EPSILON,
|
||||
FLT_MIN,
|
||||
FLT_MAX,
|
||||
FLT_MIN_EXP,
|
||||
FLT_MAX_EXP,
|
||||
FLT_MIN_10_EXP,
|
||||
FLT_MAX_10_EXP,
|
||||
};
|
||||
|
||||
log::logf
|
||||
{
|
||||
log::star, log::DEBUG,
|
||||
"DBL RAD=%d DIG=%-2d MANT=%-3d EPS=%-7lf MIN=%-8lf MAX=%-7lf"
|
||||
" EXPMIN=%-7d EXPMAX=%-6d EXP10MIN=%-6d EXP10MAX=%-5d",
|
||||
FLT_RADIX,
|
||||
DBL_DIG,
|
||||
DBL_MANT_DIG,
|
||||
DBL_EPSILON,
|
||||
DBL_MIN,
|
||||
DBL_MAX,
|
||||
DBL_MIN_EXP,
|
||||
DBL_MAX_EXP,
|
||||
DBL_MIN_10_EXP,
|
||||
DBL_MAX_10_EXP,
|
||||
};
|
||||
|
||||
log::logf
|
||||
{
|
||||
log::star, log::DEBUG,
|
||||
"LDB RAD=%d DIG=%-2d MANT=%-3d EPS=%-7lf MIN=%-8lf MAX=%-7lf"
|
||||
" EXPMIN=%-7d EXPMAX=%-6d EXP10MIN=%-6d EXP10MAX=%-5d",
|
||||
FLT_RADIX,
|
||||
LDBL_DIG,
|
||||
LDBL_MANT_DIG,
|
||||
LDBL_EPSILON,
|
||||
LDBL_MIN,
|
||||
LDBL_MAX,
|
||||
LDBL_MIN_EXP,
|
||||
LDBL_MAX_EXP,
|
||||
LDBL_MIN_10_EXP,
|
||||
LDBL_MAX_10_EXP,
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
ircd::fpe::_throw_errors(const ushort &flags)
|
||||
{
|
||||
|
|
|
@ -42,6 +42,7 @@ ircd::info::credits
|
|||
nullptr
|
||||
};
|
||||
|
||||
[[gnu::cold]]
|
||||
void
|
||||
ircd::info::dump()
|
||||
{
|
||||
|
@ -49,6 +50,7 @@ ircd::info::dump()
|
|||
dump_lib_info();
|
||||
dump_sys_info();
|
||||
dump_cpu_info();
|
||||
fpe::debug_info();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue