liblloyal 1.0.0
Branched Inference for llama.cpp
Loading...
Searching...
No Matches
lloyal::branch::DecodeScatterItem Struct Reference

Item for decode_scatter: variable tokens per branch. More...

#include <lloyal/branch.hpp>

Public Attributes

BranchHandle handle
 
std::span< const llama_token > tokens
 

Detailed Description

Item for decode_scatter: variable tokens per branch.

Uses std::span for zero-copy non-owning view of tokens. Structural wins over parallel arrays:

  • Can't have a handle without its tokens
  • span::size() is size_t — negative counts impossible
  • tokens is a non-owning view (pointer + length). If size() > 0, data() must point to valid, dereferenceable memory.
Warning
Caller must keep the pointed-to token data alive until decode_scatter() returns. Do not pass spans of temporaries.

Definition at line 348 of file branch.hpp.

Member Data Documentation

◆ handle

BranchHandle lloyal::branch::DecodeScatterItem::handle

◆ tokens

std::span<const llama_token> lloyal::branch::DecodeScatterItem::tokens

The documentation for this struct was generated from the following file: