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

Function EdgeIndex

tensorflow/compiler/jit/graphcycles/graphcycles_test.cc:189–196  ·  view source on GitHub ↗

Returns the index of edge (from, to) in *edges or -1 if it is not in *edges.

Source from the content-addressed store, hash-verified

187
188// Returns the index of edge (from, to) in *edges or -1 if it is not in *edges.
189static int EdgeIndex(Edges *edges, int from, int to) {
190 int i = 0;
191 while (i != edges->size() &&
192 ((*edges)[i].from != from || (*edges)[i].to != to)) {
193 i++;
194 }
195 return i == edges->size() ? -1 : i;
196}
197
198TEST(GraphCycles, RandomizedTest) {
199 Nodes nodes;

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected