Home / Class/ arange Class — pytorch Architecture

arange Class — pytorch Architecture

Architecture documentation for the arange class in vec_base.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/cpu/vec/vec_base.h lines 250–260

  template <typename step_t> // step sometimes requires a higher precision type
                             // (e.g., T=int, step_t=double)
  static Vectorized<T> arange(
      T base = static_cast<T>(0),
      step_t step = static_cast<step_t>(1)) {
    Vectorized vector;
    for (const auto i : c10::irange(size())) {
      vector.values[i] = base + i * step;
    }
    return vector;
  }

Analyze Your Own Codebase

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

Try Supermodel Free