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

Hash functor for ModelKey. More...

#include <model_registry.hpp>

Public Member Functions

size_t operator() (const ModelKey &k) const
 Compute hash for ModelKey.
 

Detailed Description

Hash functor for ModelKey.

Computes combined hash of path, GPU layers, and mmap flag for use in std::unordered_map. Uses XOR with golden ratio constant for good distribution.

Definition at line 52 of file model_registry.hpp.

Member Function Documentation

◆ operator()()

size_t lloyal::ModelKeyHash::operator() ( const ModelKey k) const
inline

Compute hash for ModelKey.

Combines path hash with GPU/mmap configuration using XOR and golden ratio.

Parameters
kKey to hash
Returns
Combined hash value

Definition at line 61 of file model_registry.hpp.


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