diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2023-04-16 12:13:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-16 10:13:00 +0000 |
commit | 489537e6cf6c93b74a029a11533dbcaa89791dcc (patch) | |
tree | 853bff10807ff23051ef5e42dc99e37105291423 | |
parent | 2d3481c72125cd388258864c7ad8d7d36777bad7 (diff) |
examples: add missing <ctime> include for time() (#1011)
-rw-r--r-- | examples/embedding/embedding.cpp | 2 | ||||
-rw-r--r-- | examples/main/main.cpp | 1 | ||||
-rw-r--r-- | examples/perplexity/perplexity.cpp | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/examples/embedding/embedding.cpp b/examples/embedding/embedding.cpp index 2eda3ac..e10de61 100644 --- a/examples/embedding/embedding.cpp +++ b/examples/embedding/embedding.cpp @@ -1,6 +1,8 @@ #include "common.h" #include "llama.h" +#include <ctime> + int main(int argc, char ** argv) { gpt_params params; params.model = "models/llama-7B/ggml-model.bin"; diff --git a/examples/main/main.cpp b/examples/main/main.cpp index ba153cb..3e4b003 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -11,6 +11,7 @@ #include <cmath> #include <cstdio> #include <cstring> +#include <ctime> #include <fstream> #include <iostream> #include <string> diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp index 38e3643..19449e1 100644 --- a/examples/perplexity/perplexity.cpp +++ b/examples/perplexity/perplexity.cpp @@ -2,6 +2,7 @@ #include "llama.h" #include <cmath> +#include <ctime> std::vector<float> softmax(const std::vector<float>& logits) { std::vector<float> probs(logits.size()); |