isListOf Class — pytorch Architecture
Architecture documentation for the isListOf class in ivalue.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/ivalue.cpp lines 451–462
template <typename T>
inline bool IValue::isListOf() const {
// note: avoids calling type() to avoid extra referencing counting for the returned type.
if (!isList()) {
return false;
}
const auto& ty = static_cast<detail::ListImpl*>(payload.u.as_intrusive_ptr)->elementType;
if (ty->kind() == T::Kind) {
return true;
}
return *ty == *TypeFactory::get<T>();
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free