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

Method hypot

include/half/half.hpp:1451–1459  ·  view source on GitHub ↗

Hypotenuse implementation. \param x first argument \param y second argument \return function value stored in single-preicision

Source from the content-addressed store, hash-verified

1449 /// \param y second argument
1450 /// \return function value stored in single-preicision
1451 static expr hypot(float x, float y)
1452 {
1453 #if HALF_ENABLE_CPP11_CMATH
1454 return expr(std::hypot(x, y));
1455 #else
1456 return expr((builtin_isinf(x) || builtin_isinf(y)) ? std::numeric_limits<float>::infinity() :
1457 static_cast<float>(std::sqrt(static_cast<double>(x)*x+static_cast<double>(y)*y)));
1458 #endif
1459 }
1460
1461 /// Power implementation.
1462 /// \param base value to exponentiate

Callers

nothing calls this directly

Calls 4

exprClass · 0.85
hypotFunction · 0.85
builtin_isinfFunction · 0.85
sqrtFunction · 0.85

Tested by

no test coverage detected