MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / valid

Method valid

src/instruction.cpp:130–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130bool instruction::valid(instruction_ref start, bool check_order) const
131{
132 return valid() and std::all_of(arguments.begin(), arguments.end(), [&](instruction_ref i) {
133 auto self = std::find(i->outputs().begin(), i->outputs().end(), *this);
134 bool ret = self != i->outputs().end();
135 if(check_order)
136 {
137 // check arguments for this instruction before this instruction
138 ret = ret and (std::distance(start, i) < std::distance(start, *self));
139 }
140 return ret;
141 });
142}
143
144bool instruction::valid() const
145{

Callers 7

TEST_CASEFunction · 0.45
verifyMethod · 0.45
insert_instructionMethod · 0.45
replace_instructionMethod · 0.45
add_returnMethod · 0.45
replace_returnMethod · 0.45
validateMethod · 0.45

Calls 10

findFunction · 0.85
distanceFunction · 0.85
outputsMethod · 0.80
compute_shapeFunction · 0.70
all_ofFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45
get_shapeMethod · 0.45
inputsMethod · 0.45

Tested by

no test coverage detected