MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LookupInternal

Method LookupInternal

tensorflow/core/framework/resource_mgr.h:627–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

625
626template <typename T, bool use_dynamic_cast>
627Status ResourceMgr::LookupInternal(const string& container, const string& name,
628 T** resource) const {
629 ResourceBase* found = nullptr;
630 Status s = DoLookup(container, MakeTypeIndex<T>(), name, &found);
631 if (s.ok()) {
632 // It's safe to down cast 'found' to T* since
633 // typeid(T).hash_code() is part of the map key.
634 *resource = TypeCastFunctor<T, use_dynamic_cast>::Cast(found);
635 }
636 return s;
637}
638
639template <typename T, bool use_dynamic_cast>
640Status ResourceMgr::LookupOrCreate(const string& container, const string& name,

Callers

nothing calls this directly

Calls 2

CastFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected