MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / c_rules

Method c_rules

smallthinker/src/llama-grammar.cpp:588–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588llama_grammar_stack llama_grammar_parser::c_rules() const {
589 llama_grammar_stack ret;
590 ret.reserve(rules.size());
591 for (const auto & rule : rules) {
592 ret.push_back(rule.data());
593 }
594 return ret;
595}
596
597// returns true iff pos points to the end of one of the definitions of a rule
598static bool llama_grammar_is_end_of_sequence(const llama_grammar_element * pos) {

Callers 2

llama_grammar_init_implFunction · 0.45
mainFunction · 0.45

Calls 4

reserveMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45
dataMethod · 0.45

Tested by 1

mainFunction · 0.36