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

Method ChildSnapshot

tensorflow/core/framework/hash_table/hash_table.cc:604–618  ·  view source on GitHub ↗

TODO(chihan.hs): extract all children in one traverse

Source from the content-addressed store, hash-verified

602
603// TODO(chihan.hs): extract all children in one traverse
604Status CoalescedHashTable::ChildSnapshot(
605 const string& name, std::vector<std::pair<int64, int64>>* output) {
606 mutex_lock lock(update_mu_);
607 int64 size = size_;
608 string child_name = ChildName(name);
609 int64 index = index_map_[child_name];
610 for (int64 i = 0; i < num_tables_; ++i) {
611 for (auto iter = tables_[i].begin(); iter != tables_[i].end(); ++iter) {
612 if (iter->second < size && Match(iter->first, index)) {
613 output->emplace_back(Decode(iter->first), iter->second);
614 }
615 }
616 }
617 return Status::OK();
618}
619
620std::function<void(int64*,size_t)> CoalescedHashTable::MakeReviserFn(
621 const string& name) {

Callers 1

SaveHashTableFunction · 0.80

Calls 5

MatchFunction · 0.70
DecodeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected