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

Function ggml_hash

subprojects/llama.cpp/ggml/src/ggml-impl.h:248–251  ·  view source on GitHub ↗

hash function for ggml_tensor

Source from the content-addressed store, hash-verified

246
247// hash function for ggml_tensor
248static inline size_t ggml_hash(const struct ggml_tensor * p) {
249 // the last 4 bits are always zero due to alignment
250 return (size_t)(uintptr_t)p >> 4;
251}
252
253static size_t ggml_hash_find(const struct ggml_hash_set * hash_set, const struct ggml_tensor * key) {
254 size_t h = ggml_hash(key) % hash_set->size;

Callers 3

ggml_hash_findFunction · 0.85
ggml_hash_insertFunction · 0.85
ggml_hash_find_or_insertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected