MCPcopy Create free account
hub / github.com/davisking/dlib / insert

Method insert

dlib/cuda/cudnn_dlibapi.cpp:821–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819 }
820
821 void insert(const key_type& key, const value_type& value)
822 {
823 const auto i = index.find(key);
824 if (i != index.end())
825 {
826 i->second->second = value;
827 entries.splice(entries.begin(), entries, i->second);
828 return;
829 }
830 entries.emplace_front(key, value);
831 index[key] = entries.begin();
832 if (entries.size() > max_size)
833 {
834 index.erase(entries.back().first);
835 entries.pop_back();
836 }
837 }
838
839 private:
840 using entry_list = std::list<std::pair<key_type, value_type>>;

Callers 15

print_all_labelsFunction · 0.45
print_all_label_statsFunction · 0.45
mainFunction · 0.45
format_commentFunction · 0.45
mainFunction · 0.45
deserializeFunction · 0.45
sinkFunction · 0.45
xsputnMethod · 0.45
permutationsFunction · 0.45
xsputnMethod · 0.45
threadMethod · 0.45

Calls 7

eraseMethod · 0.80
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by 2

permutationsFunction · 0.36