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

Method Insert

tensorflow/core/lib/gtl/flatmap.h:366–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364
365 template <typename K, typename V>
366 std::pair<iterator, bool> Insert(K&& k, V&& v) {
367 rep_.MaybeResize();
368 auto r = rep_.FindOrInsert(std::forward<K>(k));
369 const bool inserted = !r.found;
370 if (inserted) {
371 r.b->InitVal(r.index, std::forward<V>(v));
372 }
373 return {iterator(r.b, rep_.limit(), r.index), inserted};
374 }
375
376 template <typename K>
377 Val& IndexOp(K&& k) {

Callers

nothing calls this directly

Calls 5

MaybeResizeMethod · 0.80
FindOrInsertMethod · 0.80
InitValMethod · 0.80
iteratorClass · 0.70
limitMethod · 0.45

Tested by

no test coverage detected