Home / Class/ moveToIntrusivePtr Class — pytorch Architecture

moveToIntrusivePtr Class — pytorch Architecture

Architecture documentation for the moveToIntrusivePtr class in ivalue_inl.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/core/ivalue_inl.h lines 63–71

template <class T, class NullType>
c10::intrusive_ptr<T, NullType> IValue::moveToIntrusivePtr() {
  auto t = c10::intrusive_ptr<T, NullType>::reclaim(
      payload.u.as_intrusive_ptr == c10::UndefinedTensorImpl::singleton()
      ? NullType::singleton()
      : static_cast<T*>(payload.u.as_intrusive_ptr));
  clearToNone();
  return t;
}

Analyze Your Own Codebase

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

Try Supermodel Free