insert Class — pytorch Architecture
Architecture documentation for the insert class in Dict_inl.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/Dict_inl.h lines 117–126
template<class Key, class Value>
template<class Key_, class Value_>
std::pair<typename Dict<Key, Value>::iterator, bool> Dict<Key, Value>::insert(Key_&& key, Value_&& value) const {
static_assert(std::is_constructible_v<Key, Key_>, "Wrong type for the key argument of Dict::insert");
static_assert(std::is_constructible_v<Value, Value_>, "Wrong type for the value argument of Dict::insert");
auto inserted = impl_->dict.emplace(
Key(std::forward<Key_>(key)),
Value(std::forward<Value_>(value)));
return {iterator{inserted.first}, inserted.second};
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free