Fix lambda capture bug in Windows and initialise candidate_types struct

This commit is contained in:
Ed Addario 2025-11-19 11:19:44 +00:00
parent bdf2e741ed
commit a0ba913613
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 5 additions and 5 deletions

View File

@ -652,10 +652,10 @@ static std::unordered_map<std::string, ggml_type> target_bpw_type(
} signal_guard;
struct candidate_types {
ggml_type type;
float bpw;
size_t bytes;
double error;
ggml_type type = GGML_TYPE_COUNT;
float bpw = 0.0f;
size_t bytes = 0;
double error = 0.0;
double mse = 0.0;
double proj = 0.0;
};
@ -751,7 +751,7 @@ static std::unordered_map<std::string, ggml_type> target_bpw_type(
size_t n_elements = 0;
};
auto djb2_hash = [](const uint8_t * data, size_t n) -> uint64_t {
auto djb2_hash = [&](const uint8_t * data, const size_t n) -> uint64_t {
uint64_t h = 5381;
for (size_t i = 0; i < n; ++i) {
h = (h << 5) + h + data[i];