FastLED 3.10.6
Loading...
Searching...
No Matches
AutoResearchMathExp.h File Reference

Detailed Description

On-device accuracy and speed of fl::exp against the toolchain libm (#4288).

fl::exp is a range-reduced polynomial with no libm dependency. This bench answers two questions on the real core: how far it is from the toolchain's expf/exp in ulp, and how many nanoseconds a call costs next to libm's. Host x86 numbers are not representative (glibc's expf uses FMA and tables); RISC-V and Cortex-M are what this is for.

libm is used only as the reference, from AutoResearchMathExp.cpp, so this header pulls in no math library.

Definition in file AutoResearchMathExp.h.

#include "fl/math/math.h"
#include "fl/stl/int.h"
#include "fl/system/sketch_macros.h"
+ Include dependency graph for AutoResearchMathExp.h:

Go to the source code of this file.

Classes

struct  autoresearch::math_exp::Result
 

Namespaces

namespace  autoresearch
 
namespace  autoresearch::math_exp
 

Functions

Result autoresearch::math_exp::run (fl::u32 iterations)
 Runs the accuracy sweep and the timed loops. iterations = calls per loop.
 

Class Documentation

◆ autoresearch::math_exp::Result

struct autoresearch::math_exp::Result
Class Members
u32 accuracy_points
u32 fl_exp_us
u32 fl_expf_us
u32 iterations
int large_memory
u32 libm_exp_us
u32 libm_expf_us
float sink
bool success
double worst_ulp_double
float worst_ulp_float
double worst_x_double
float worst_x_float