diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2024-01-23 14:12:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 14:12:57 +0200 |
commit | 89758723c75ba594e401f6513751beeba7ca1d28 (patch) | |
tree | 25555096747a2c44c5d8bdee6a67af43c8f2afb9 /examples/perplexity/perplexity.cpp | |
parent | 2bed4aa3f37cb4e39e16e9ec7b595a7738fd5faf (diff) |
minor : clean-up some warnings and style (#5094)
* minor : clean-up some warnings and style
ggml-ci
* ggml : add comment
Diffstat (limited to 'examples/perplexity/perplexity.cpp')
-rw-r--r-- | examples/perplexity/perplexity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp index 1b7f85f4..de6d3eb4 100644 --- a/examples/perplexity/perplexity.cpp +++ b/examples/perplexity/perplexity.cpp @@ -1202,11 +1202,11 @@ static void winogrande_score(llama_context * ctx, const gpt_params & params) { printf("Final Winogrande score(%d tasks): %.4lf +/- %.4lf\n", n_done, 100*p, sigma); } -static bool deserialize_string(std::istream& in, std::string& str) { +static bool deserialize_string(std::istream & in, std::string & str) { uint32_t size; if (!in.read((char *)&size, sizeof(size)).fail()) { str.resize(size); - if (!in.read((char *)str.data(), size).fail()) return true; + if (!in.read((char *)&str[0], size).fail()) return true; } return false; } |