MCPcopy Create free account
hub / github.com/Samsung/ONE / valid

Function valid

compiler/loco/src/IR/Verifier.cpp:100–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98{
99
100bool valid(Graph *g, std::unique_ptr<ErrorListener> &&l)
101{
102 class ErrorCounter final : public ErrorListener
103 {
104 public:
105 uint32_t count(void) const { return _count; }
106
107 public:
108 void notify(const ErrorDetail<ErrorCategory::MissingArgument> &) { _count += 1; }
109
110 private:
111 uint32_t _count = 0;
112 };
113
114 ErrorCounter counter;
115 graph_verifier(g).enroll(&counter).enroll(std::move(l)).run();
116 return counter.count() == 0;
117}
118
119} // namespace loco

Callers 5

TESTFunction · 0.70
TESTFunction · 0.50
validate_shapeFunction · 0.50
validateFunction · 0.50
importModuleMethod · 0.50

Calls 4

graph_verifierFunction · 0.85
runMethod · 0.45
enrollMethod · 0.45
countMethod · 0.45

Tested by 2

TESTFunction · 0.56
TESTFunction · 0.40