Fix lambda capture bug in Windows and initialise candidate_types struct
This commit is contained in:
parent
bdf2e741ed
commit
a0ba913613
|
|
@ -652,10 +652,10 @@ static std::unordered_map<std::string, ggml_type> target_bpw_type(
|
||||||
} signal_guard;
|
} signal_guard;
|
||||||
|
|
||||||
struct candidate_types {
|
struct candidate_types {
|
||||||
ggml_type type;
|
ggml_type type = GGML_TYPE_COUNT;
|
||||||
float bpw;
|
float bpw = 0.0f;
|
||||||
size_t bytes;
|
size_t bytes = 0;
|
||||||
double error;
|
double error = 0.0;
|
||||||
double mse = 0.0;
|
double mse = 0.0;
|
||||||
double proj = 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;
|
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;
|
uint64_t h = 5381;
|
||||||
for (size_t i = 0; i < n; ++i) {
|
for (size_t i = 0; i < n; ++i) {
|
||||||
h = (h << 5) + h + data[i];
|
h = (h << 5) + h + data[i];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue