Home / Class/ cast Class — pytorch Architecture

cast Class — pytorch Architecture

Architecture documentation for the cast class in jit_type.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/core/jit_type.h lines 2375–2382

template<>
inline detail::CastReturnType<NamedType>::type Type::cast<NamedType>() {
  if (kind() == TypeKind::TupleType || kind() == TypeKind::FunctionType ||
      kind() == TypeKind::ClassType || kind() == TypeKind::InterfaceType) {
    return std::static_pointer_cast<NamedType>(static_cast<NamedType *>(this)->shared_from_this());
  }
  return nullptr;
}

Analyze Your Own Codebase

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

Try Supermodel Free