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

Method eval

src/instruction.cpp:369–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369argument instruction::eval(bool check_eval) const
370{
371 if(op.name() == "@literal")
372 {
373 return this->get_literal().get_argument();
374 }
375 if(is_context_free(op))
376 {
377 if(check_eval and not this->can_eval())
378 return {};
379 std::vector<argument> args;
380 std::transform(this->inputs().begin(),
381 this->inputs().end(),
382 std::back_inserter(args),
383 [](auto arg) { return arg->eval(false); });
384 return normalized_operator().compute(result, args);
385 }
386 return {};
387}
388
389void instruction::finalize(context& ctx)
390{

Callers

nothing calls this directly

Calls 9

can_evalMethod · 0.95
get_argumentMethod · 0.80
is_context_freeFunction · 0.50
transformFunction · 0.50
nameMethod · 0.45
beginMethod · 0.45
inputsMethod · 0.45
endMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected