MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / get_ne

Method get_ne

subprojects/llama.cpp/ggml/src/gguf.cpp:168–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 size_t get_ne() const {
169 if (type == GGUF_TYPE_STRING) {
170 const size_t ne = data_string.size();
171 GGML_ASSERT(is_array || ne == 1);
172 return ne;
173 }
174 const size_t type_size = gguf_type_size(type);
175 GGML_ASSERT(data.size() % type_size == 0);
176 const size_t ne = data.size() / type_size;
177 GGML_ASSERT(is_array || ne == 1);
178 return ne;
179 }
180
181 template <typename T>
182 const T & get_val(const size_t i = 0) const {

Callers 15

gguf_get_val_u8Function · 0.80
gguf_get_val_i8Function · 0.80
gguf_get_val_u16Function · 0.80
gguf_get_val_i16Function · 0.80
gguf_get_val_u32Function · 0.80
gguf_get_val_i32Function · 0.80
gguf_get_val_f32Function · 0.80
gguf_get_val_u64Function · 0.80
gguf_get_val_i64Function · 0.80
gguf_get_val_f64Function · 0.80
gguf_get_val_boolFunction · 0.80
gguf_get_val_strFunction · 0.80

Calls 2

gguf_type_sizeFunction · 0.85
sizeMethod · 0.65

Tested by

no test coverage detected