maximum Class — pytorch Architecture
Architecture documentation for the maximum class in vec_base.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/cpu/vec/vec_base.h lines 871–886
template <
class T,
typename std::enable_if_t<c10::is_complex<T>::value, int> = 0>
Vectorized<T> inline maximum(const Vectorized<T>& a, const Vectorized<T>& b) {
Vectorized<T> c;
for (int i = 0; i != Vectorized<T>::size(); i++) {
c[i] = (std::abs(a[i]) > std::abs(b[i])) ? a[i] : b[i];
if (_isnan(a[i])) {
// If either input is NaN, propagate a NaN.
// NOTE: The case where b[i] was NaN is handled correctly by the naive
// ternary operator above.
c[i] = a[i];
}
}
return c;
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free