liblloyal 1.0.0
Composable primitives for llama.cpp inference
Loading...
Searching...
No Matches
lloyal::detail::BatchGuard Struct Reference

RAII guard for automatic batch cleanup Ensures llama_batch_free is called even if exceptions occur. More...

#include <decoder.hpp>

Public Member Functions

 BatchGuard (llama_batch &b)
 
 ~BatchGuard ()
 

Public Attributes

llama_batch & batch
 

Detailed Description

RAII guard for automatic batch cleanup Ensures llama_batch_free is called even if exceptions occur.

Definition at line 50 of file decoder.hpp.

Constructor & Destructor Documentation

◆ BatchGuard()

lloyal::detail::BatchGuard::BatchGuard ( llama_batch &  b)
inlineexplicit

Definition at line 52 of file decoder.hpp.

◆ ~BatchGuard()

lloyal::detail::BatchGuard::~BatchGuard ( )
inline

Definition at line 53 of file decoder.hpp.

Member Data Documentation

◆ batch

llama_batch& lloyal::detail::BatchGuard::batch

Definition at line 51 of file decoder.hpp.


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