|
8 | 8 | #include "llama-kv-cache.h"
|
9 | 9 | #include "llama-model-loader.h"
|
10 | 10 | #include "llama-model.h"
|
11 |
| -#include "llama-quant.h" |
12 | 11 |
|
13 | 12 | #include "ggml.h"
|
14 | 13 | #include "ggml-alloc.h"
|
|
18 | 17 | #include <algorithm>
|
19 | 18 | #include <array>
|
20 | 19 | #include <cassert>
|
21 |
| -#include <cctype> |
22 | 20 | #include <cfloat>
|
23 |
| -#include <cinttypes> |
24 |
| -#include <climits> |
25 | 21 | #include <cmath>
|
26 |
| -#include <cstdarg> |
27 | 22 | #include <cstddef>
|
28 | 23 | #include <cstdint>
|
29 | 24 | #include <cstdio>
|
30 | 25 | #include <cstring>
|
31 | 26 | #include <ctime>
|
32 | 27 | #include <functional>
|
33 | 28 | #include <initializer_list>
|
34 |
| -#include <locale> |
35 | 29 | #include <map>
|
36 |
| -#include <numeric> |
37 |
| -#include <type_traits> |
38 | 30 |
|
39 | 31 | #if defined(_MSC_VER)
|
40 | 32 | #pragma warning(disable: 4244 4267) // possible loss of data
|
@@ -12434,16 +12426,16 @@ int llama_split_path(char * split_path, size_t maxlen, const char * path_prefix,
|
12434 | 12426 | return 0;
|
12435 | 12427 | }
|
12436 | 12428 |
|
12437 |
| -int llama_split_prefix(char * dest, size_t maxlen, const char * split_path, int split_no, int split_count) { |
| 12429 | +int llama_split_prefix(char * split_prefix, size_t maxlen, const char * split_path, int split_no, int split_count) { |
12438 | 12430 | std::string str_split_path(split_path);
|
12439 | 12431 | char postfix[32];
|
12440 | 12432 | snprintf(postfix, 32, "-%05d-of-%05d.gguf", split_no + 1, split_count);
|
12441 | 12433 | std::string str_postfix(postfix);
|
12442 | 12434 |
|
12443 |
| - // check if dest ends with postfix |
| 12435 | + // check if split_prefix ends with postfix |
12444 | 12436 | int size_prefix = str_split_path.size() - str_postfix.size();
|
12445 | 12437 | if (size_prefix > 0 && str_split_path.find(str_postfix, size_prefix) != std::string::npos) {
|
12446 |
| - snprintf(dest, std::min((size_t) size_prefix + 1, maxlen), "%s", split_path); |
| 12438 | + snprintf(split_prefix, std::min((size_t) size_prefix + 1, maxlen), "%s", split_path); |
12447 | 12439 | return size_prefix;
|
12448 | 12440 | }
|
12449 | 12441 |
|
|
0 commit comments