|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Classes | |
| class | CMathNode |
| class | CMathNodeSerializer |
| class | CMathNodeDispatcher |
Enumerations | |
| enum class | CMathFunction { sin , cos , tan , asin , acos , atan , atan2 , sinh , cosh , tanh , asinh , acosh , atanh , exp , exp2 , exp10 , expm1 , log , log10 , log2 , log1p , pow , sqrt , cbrt , hypot , erf , erfc , tgamma , lgamma , fabs , ceil , floor , trunc , round , lround , llround , roundeven , nearbyint , rint , lrint , llrint , fmod , remainder , frexp , ldexp , modf , scalbn , scalbln , ilogb , logb , nextafter , nexttoward , copysign , fmax , fmin , fdim , fma } |
| Enumeration of C math library functions. More... | |
Functions | |
| data_flow::LibraryNodeCode | LibraryNodeType_CMath ("CMath") |
| data_flow::LibraryNodeCode | LibraryNodeType_CMath_Deprecated ("Intrinsic") |
| constexpr size_t | cmath_function_to_arity (CMathFunction func) |
| Get arity of CMathFunction enum. | |
| constexpr uint64_t | cmath_function_to_flop (CMathFunction func) |
| Approximate flop-equivalent cost of a libm call. | |
| constexpr const char * | cmath_function_to_stem (CMathFunction func) |
| Convert CMathFunction enum to function name stem (without type suffix). | |
| CMathFunction | string_to_cmath_function (const std::string &name) |
| std::string | get_cmath_intrinsic_name (CMathFunction func, types::PrimitiveType prim_type) |
| Get the correct C math intrinsic name for a given function and primitive type. | |
| std::string | get_cmath_approximate_intrinsic_name (CMathFunction func, types::PrimitiveType prim_type) |
| Fast, approximate CUDA/HIP device intrinsic for a function, if one exists. | |
|
strong |
Enumeration of C math library functions.
|
constexpr |
Get arity of CMathFunction enum.
| func | The CMathFunction enum value |
|
constexpr |
Approximate flop-equivalent cost of a libm call.
Elementwise math lowers to a single library call whose polynomial implementation retires several floating-point instructions; FLOPAnalysis weights the node with this instead of counting it as one flop. Values are coarse tiers, not exact per-libm counts. The switch is exhaustive (no default), so adding a CMathFunction without a cost here fails to compile.
|
constexpr |
Convert CMathFunction enum to function name stem (without type suffix).
| func | The CMathFunction enum value |
|
inline |
Fast, approximate CUDA/HIP device intrinsic for a function, if one exists.
|
inline |
Get the correct C math intrinsic name for a given function and primitive type.
Returns the appropriate intrinsic function name based on the primitive type:
| func | The CMathFunction enum value |
| prim_type | The primitive type to generate the intrinsic for |
|
inline |
|
inline |
| CMathFunction sdfg::math::cmath::string_to_cmath_function | ( | const std::string & | name | ) |