Execute a named grammar rule explicitly by name.
521 {})
522 {
523 Datum<InputType> current = input;
524 if (
auto rule_result =
m_grammar->execute_rule(rule_name, current, context)) {
525 auto cast_result = safe_any_cast<Datum<InputType>>(*rule_result);
526 if (cast_result) {
527 current = *cast_result.value;
528 } else {
532 "Grammar rule '{}' returned incompatible type: {}",
533 rule_name,
534 cast_result.error);
535 }
536 } else {
540 "Grammar rule '{}' not found",
541 rule_name);
542 }
543 return current;
544 }
#define MF_WARN(comp, ctx,...)
std::shared_ptr< ComputationGrammar > m_grammar
Grammar instance for rule-based operation selection.
@ Runtime
General runtime operations (default fallback)
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.