hash function for ggml_tensor
| 246 | |
| 247 | // hash function for ggml_tensor |
| 248 | static 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 | |
| 253 | static 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; |
no outgoing calls
no test coverage detected