Skip to content

Commit bc191d6

Browse files
Marcus GroeberMarcus Groeber
authored andcommitted
Add include files for std::min/max and std::toupper/tolower
1 parent 70680c4 commit bc191d6

File tree

14 files changed

+14
-0
lines changed

14 files changed

+14
-0
lines changed

common/ngram-cache.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <cstdio>
88
#include <fstream>
99
#include <thread>
10+
#include <algorithm>
1011

1112
void common_ngram_cache_update(common_ngram_cache & ngram_cache, int ngram_min, int ngram_max,
1213
std::vector<llama_token> & inp, int nnew, bool print_progress) {

common/sampling.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <cmath>
66
#include <unordered_map>
7+
#include <algorithm>
78

89
// the ring buffer works similarly to std::deque, but with a fixed capacity
910
// TODO: deduplicate with llama-impl.h

common/speculative.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "sampling.h"
66

77
#include <cstring>
8+
#include <algorithm>
89

910
#define SPEC_VOCAB_MAX_SIZE_DIFFERENCE 128
1011
#define SPEC_VOCAB_CHECK_START_TOKEN_ID 5

examples/embedding/embedding.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "llama.h"
55

66
#include <ctime>
7+
#include <algorithm>
78

89
#if defined(_MSC_VER)
910
#pragma warning(disable: 4244 4267) // possible loss of data

examples/lookahead/lookahead.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <cstdio>
88
#include <string>
99
#include <vector>
10+
#include <algorithm>
1011

1112
struct ngram_data {
1213
bool active = false;

examples/parallel/parallel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <string>
1313
#include <vector>
1414
#include <ctime>
15+
#include <algorithm>
1516

1617
// trim whitespace from the beginning and end of a string
1718
static std::string trim(const std::string & str) {

examples/passkey/passkey.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <cstdio>
88
#include <string>
99
#include <vector>
10+
#include <algorithm>
1011

1112
static void print_usage(int, char ** argv) {
1213
LOG("\nexample usage:\n");

examples/quantize/quantize.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <unordered_map>
99
#include <fstream>
1010
#include <cmath>
11+
#include <cctype>
1112

1213
struct quant_option {
1314
std::string name;

ggml/src/ggml-backend-reg.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <string>
1111
#include <type_traits>
1212
#include <vector>
13+
#include <cctype>
1314

1415
#ifdef _WIN32
1516
# define WIN32_LEAN_AND_MEAN

ggml/src/ggml-backend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <string.h>
2222
#include <string>
2323
#include <vector>
24+
#include <algorithm>
2425

2526
#ifdef __APPLE__
2627
#include <sys/types.h>

0 commit comments

Comments
 (0)