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

Function ggml_hash_set_new

subprojects/llama.cpp/ggml/src/ggml.c:6106–6113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6104////////////////////////////////////////////////////////////////////////////////
6105
6106struct ggml_hash_set ggml_hash_set_new(size_t size) {
6107 size = ggml_hash_size(size);
6108 struct ggml_hash_set result;
6109 result.size = size;
6110 result.keys = GGML_MALLOC(sizeof(struct ggml_tensor *) * size);
6111 result.used = GGML_CALLOC(ggml_bitset_size(size), sizeof(ggml_bitset_t));
6112 return result;
6113}
6114
6115void ggml_hash_set_reset(struct ggml_hash_set * hash_set) {
6116 memset(hash_set->used, 0, sizeof(ggml_bitset_t) * ggml_bitset_size(hash_set->size));

Callers 4

ggml_new_hash_mapFunction · 0.85
ggml_backend_sched_newFunction · 0.85
ggml_backend_graph_copyFunction · 0.85

Calls 2

ggml_hash_sizeFunction · 0.85
ggml_bitset_sizeFunction · 0.85

Tested by

no test coverage detected