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

Function get_key_idx

examples/llava/clip.cpp:90–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88//
89
90static int get_key_idx(const gguf_context * ctx, const char * key) {
91 int i = gguf_find_key(ctx, key);
92 if (i == -1) {
93 fprintf(stderr, "key %s not found in file\n", key);
94 throw std::runtime_error(format("Missing required key: %s", key));
95 }
96
97 return i;
98}
99
100static uint32_t get_u32(const gguf_context * ctx, const std::string & key) {
101 const int i = get_key_idx(ctx, key.c_str());

Callers 3

get_u32Function · 0.85
get_f32Function · 0.85
clip_model_loadFunction · 0.85

Calls 3

fprintfFunction · 0.85
formatFunction · 0.70
gguf_find_keyFunction · 0.50

Tested by

no test coverage detected