Home / Class/ clamp_max Class — pytorch Architecture

clamp_max Class — pytorch Architecture

Architecture documentation for the clamp_max class in vec256_int.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/cpu/vec/vec256/vec256_int.h lines 1403–1414

template <>
Vectorized<int64_t> inline clamp_max(
    const Vectorized<int64_t>& a,
    const Vectorized<int64_t>& max_val) {
#ifndef CPU_CAPABILITY_AVX2
  return emulate(a, max_val, [](int64_t a_point, int64_t max_point) {
    return std::min(max_point, a_point);
  });
#else
  return minimum(max_val, a);
#endif
}

Analyze Your Own Codebase

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

Try Supermodel Free