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

Function ggml_new_hash_map

ggml.c:15237–15243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15235};
15236
15237static struct hash_map * ggml_new_hash_map(size_t size) {
15238 struct hash_map * result = malloc(sizeof(struct hash_map));
15239 result->set = ggml_hash_set_new(size);
15240 result->vals = malloc(sizeof(struct ggml_tensor *) * result->set.size);
15241 memset(result->vals, 0, sizeof(struct ggml_tensor *) * result->set.size);
15242 return result;
15243}
15244
15245static void ggml_hash_map_free(struct hash_map * map) {
15246 ggml_hash_set_free(map->set);

Calls 1

ggml_hash_set_newFunction · 0.70

Tested by

no test coverage detected