Home / Class/ VsxShiftLeftArith Class — pytorch Architecture

VsxShiftLeftArith Class — pytorch Architecture

Architecture documentation for the VsxShiftLeftArith class in vsx_helpers.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/cpu/vec/vec256/vsx/vsx_helpers.h lines 550–560

template <typename T>
Vectorized<T> VsxShiftLeftArith(
    const Vectorized<T>& a,
    const Vectorized<T>& b) {
  const Vectorized<T> max_shift(sizeof(T) * CHAR_BIT);
  const auto mask = (b < Vectorized<T>(0)) | (b >= max_shift);
  Vectorized<T> ret(
      vec_sl(a.vec0(), make_vuint(b.vec0())),
      vec_sl(a.vec1(), make_vuint(b.vec1())));
  return Vectorized<T>::blendv(ret, Vectorized<T>(0), mask);
}

Analyze Your Own Codebase

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

Try Supermodel Free