| 6104 | //////////////////////////////////////////////////////////////////////////////// |
| 6105 | |
| 6106 | struct 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 | |
| 6115 | void 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)); |
no test coverage detected