Home / Class/ val_at Class — pytorch Architecture

val_at Class — pytorch Architecture

Architecture documentation for the val_at class in Utils.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/vulkan/api/Utils.h lines 269–277

template <typename T>
inline T val_at(const int64_t index, const std::vector<T>& sizes) {
  const int64_t ndim = static_cast<int64_t>(sizes.size());
  if (index >= 0) {
    return index >= ndim ? 1 : sizes[index];
  } else {
    return ndim + index < 0 ? 1 : sizes[ndim + index];
  }
}

Analyze Your Own Codebase

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

Try Supermodel Free