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

Method LookupMany

tensorflow/core/framework/resource_mgr.h:596–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594
595template <typename T, bool use_dynamic_cast>
596Status ResourceMgr::LookupMany(
597 absl::Span<std::pair<const string*, const string*> const>
598 containers_and_names,
599 std::vector<std::unique_ptr<T, core::RefCountDeleter>>* resources) const {
600 CheckDeriveFromResourceBase<T>();
601 tf_shared_lock l(mu_);
602 resources->resize(containers_and_names.size());
603 for (size_t i = 0; i < containers_and_names.size(); ++i) {
604 T* resource;
605 Status s = LookupInternal<T, use_dynamic_cast>(
606 *containers_and_names[i].first, *containers_and_names[i].second,
607 &resource);
608 if (s.ok()) {
609 (*resources)[i].reset(resource);
610 }
611 }
612 return Status::OK();
613}
614
615// Simple wrapper to allow conditional dynamic / static casts.
616template <typename T, bool use_dynamic_cast>

Callers 1

LookupResourcesFunction · 0.80

Calls 4

resizeMethod · 0.45
sizeMethod · 0.45
okMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected