MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / is_one

Function is_one

src/core/utils/helpers/float_ops.h:100–103  ·  view source on GitHub ↗

Checks if the input floating point number is 1.0f checking if the difference is within a range defined with epsilon * * @param[in] a Input floating point number * @param[in] epsilon (Optional) Epsilon used to define the error bounds * * @return True if number is close to 1.0f */

Source from the content-addressed store, hash-verified

98 * @return True if number is close to 1.0f
99 */
100inline bool is_one(float a, float epsilon = 0.00001f)
101{
102 return std::abs(1.0f - a) <= epsilon;
103}
104
105/** Checks if the input floating point number is 0.0f checking if the difference is within a range defined with epsilon
106 *

Callers 8

configureMethod · 0.85
configureMethod · 0.85
configureMethod · 0.85
configureMethod · 0.85

Calls 1

absFunction · 0.85

Tested by

no test coverage detected