MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / evaluate_polynomial

Function evaluate_polynomial

dnn/src/common/elemwise/erfinv.h:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54template <class T_, class U>
55inline U evaluate_polynomial(const T_* poly, U const& z, std::size_t count) {
56 megdnn_assert(count > 0);
57 U sum = static_cast<U>(poly[count - 1]);
58 for (int i = static_cast<int>(count) - 2; i >= 0; --i) {
59 sum *= z;
60 sum += static_cast<U>(poly[i]);
61 }
62 return sum;
63}
64
65template <std::size_t N, class T, class V>
66inline V evaluate_polynomial(const T (&a)[N], const V& val) {

Callers 1

erfinv_impFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected