Skip to content

Commit 489537e

Browse files
authored
examples: add missing <ctime> include for time() (#1011)
1 parent 2d3481c commit 489537e

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

examples/embedding/embedding.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "common.h"
22
#include "llama.h"
33

4+
#include <ctime>
5+
46
int main(int argc, char ** argv) {
57
gpt_params params;
68
params.model = "models/llama-7B/ggml-model.bin";

examples/main/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <cmath>
1212
#include <cstdio>
1313
#include <cstring>
14+
#include <ctime>
1415
#include <fstream>
1516
#include <iostream>
1617
#include <string>

examples/perplexity/perplexity.cpp

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

44
#include <cmath>
5+
#include <ctime>
56

67
std::vector<float> softmax(const std::vector<float>& logits) {
78
std::vector<float> probs(logits.size());

0 commit comments

Comments
 (0)