Home / Class/ max_impl Class — pytorch Architecture

max_impl Class — pytorch Architecture

Architecture documentation for the max_impl class in zmath.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/cpu/zmath.h lines 218–227

template <typename TYPE, std::enable_if_t<c10::is_complex<TYPE>::value, int> = 0>
inline TYPE max_impl (TYPE a, TYPE b) {
  if (_isnan<TYPE>(a)) {
    return a;
  } else if (_isnan<TYPE>(b)) {
    return b;
  } else {
    return std::abs(a) > std::abs(b) ? a : b;
  }
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free