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

Function EraseElementFromVector

tensorflow/compiler/xla/util.h:549–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547
548template <typename T>
549Status EraseElementFromVector(std::vector<T>* container, const T& value) {
550 // absl::c_find returns a const_iterator which does not seem to work on
551 // gcc 4.8.4, and this breaks the ubuntu/xla_gpu build bot.
552 auto it = std::find(container->begin(), container->end(), value);
553 TF_RET_CHECK(it != container->end());
554 container->erase(it);
555 return Status::OK();
556}
557
558// Utility function which splits a double-precision float (F64) into a pair of
559// single-precision floating point numbers. The most significant 49 bits (out of

Callers 2

DropAllControlDepsMethod · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected