calc_i1e Class — pytorch Architecture
Architecture documentation for the calc_i1e class in Math.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/Math.h lines 1530–1544
template <typename T>
inline typename std::enable_if_t<std::is_floating_point_v<T>, T>
calc_i1e(T _x) {
T x = std::abs(_x);
if (x <= T{8.0}) {
auto [A, len] = chebyshev_coefficients_i1e_A<T>();
T y = (x / T{2.0}) - T{2.0};
const T out = chbevl(y, A, len) * x;
return (_x < T{0.0}) ? -out : out;
}
auto [B, len] = chebyshev_coefficients_i1e_B<T>();
const auto out = chbevl(T{32.0} / x - T{2.0}, B, len) / std::sqrt(x);
return (_x < T{0.0}) ? -out : out;
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free