Home / Class/ div_rtn Class — pytorch Architecture

div_rtn Class — pytorch Architecture

Architecture documentation for the div_rtn class in div_rtn.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/div_rtn.h lines 4–11

template <typename T>
static inline T div_rtn(T x, T y) {
  int q = x / y;
  int r = x % y;
  if ((r != 0) && ((r < 0) != (y < 0)))
    --q;
  return q;
}

Analyze Your Own Codebase

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

Try Supermodel Free