|
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(GGML_USE_SYCL) |
40 | 32 | # include "ggml-sycl.h" |
@@ -12443,16 +12435,16 @@ int llama_split_path(char * split_path, size_t maxlen, const char * path_prefix, |
12443 | 12435 | return 0; |
12444 | 12436 | } |
12445 | 12437 |
|
12446 | | -int llama_split_prefix(char * dest, size_t maxlen, const char * split_path, int split_no, int split_count) { |
| 12438 | +int llama_split_prefix(char * split_prefix, size_t maxlen, const char * split_path, int split_no, int split_count) { |
12447 | 12439 | std::string str_split_path(split_path); |
12448 | 12440 | char postfix[32]; |
12449 | 12441 | snprintf(postfix, 32, "-%05d-of-%05d.gguf", split_no + 1, split_count); |
12450 | 12442 | std::string str_postfix(postfix); |
12451 | 12443 |
|
12452 | | - // check if dest ends with postfix |
| 12444 | + // check if split_prefix ends with postfix |
12453 | 12445 | int size_prefix = str_split_path.size() - str_postfix.size(); |
12454 | 12446 | if (size_prefix > 0 && str_split_path.find(str_postfix, size_prefix) != std::string::npos) { |
12455 | | - snprintf(dest, std::min((size_t) size_prefix + 1, maxlen), "%s", split_path); |
| 12447 | + snprintf(split_prefix, std::min((size_t) size_prefix + 1, maxlen), "%s", split_path); |
12456 | 12448 | return size_prefix; |
12457 | 12449 | } |
12458 | 12450 |
|
|
0 commit comments