calc_gcd Class — pytorch Architecture
Architecture documentation for the calc_gcd class in Math.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/Math.h lines 1245–1256
template <typename T>
inline typename std::enable_if_t<std::is_integral_v<T>, T>
calc_gcd(T a, T b) {
a = abs_impl(a);
b = abs_impl(b);
while (a != 0) {
T c = a;
a = b % a;
b = c;
}
return b;
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free