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

Function llama_batch_get_one

llama.cpp:10619–10636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10617}
10618
10619struct llama_batch llama_batch_get_one(
10620 llama_token * tokens,
10621 int32_t n_tokens,
10622 llama_pos pos_0,
10623 llama_seq_id seq_id) {
10624 return {
10625 /*n_tokens =*/ n_tokens,
10626 /*tokens =*/ tokens,
10627 /*embd =*/ nullptr,
10628 /*pos =*/ nullptr,
10629 /*n_seq_id =*/ nullptr,
10630 /*seq_id =*/ nullptr,
10631 /*logits =*/ nullptr,
10632 /*all_pos_0 =*/ pos_0,
10633 /*all_pos_1 =*/ 1,
10634 /*all_seq_id =*/ seq_id,
10635 };
10636}
10637
10638struct llama_batch llama_batch_init(int32_t n_tokens, int32_t embd, int32_t n_seq_max) {
10639 llama_batch batch = { 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, 0, 0, };

Callers 15

loopMethod · 0.70
llama_evalFunction · 0.70
mainFunction · 0.50
eval_tokensFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
test_promptFunction · 0.50
test_genFunction · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by 3

mainFunction · 0.40
test_promptFunction · 0.40
test_genFunction · 0.40