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

Function Sort

tensorflow/compiler/jit/graphcycles/graphcycles.cc:271–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static void Sort(const Vec<Node*>& nodes, Vec<int32>* delta) {
272 struct ByRank {
273 const Vec<Node*>* nodes;
274 bool operator()(int32 a, int32 b) const {
275 return (*nodes)[a]->rank < (*nodes)[b]->rank;
276 }
277 };
278 ByRank cmp;
279 cmp.nodes = &nodes;
280 std::sort(delta->begin(), delta->end(), cmp);
281}
282
283static void MoveToList(GraphCycles::Rep* r, Vec<int32>* src, Vec<int32>* dst) {
284 for (Vec<int32>::size_type i = 0; i < src->size(); i++) {

Callers 1

ReorderFunction · 0.70

Calls 3

sortFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected