From 9cbf50c041a525d781c7764f493a5443924e4e38 Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Fri, 16 Jun 2023 21:23:53 +0300 Subject: build : fix and ignore MSVC warnings (#1889) --- examples/perplexity/perplexity.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/perplexity/perplexity.cpp') diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp index e19c6825..ae8cfe0a 100644 --- a/examples/perplexity/perplexity.cpp +++ b/examples/perplexity/perplexity.cpp @@ -5,6 +5,10 @@ #include #include +#if defined(_MSC_VER) +#pragma warning(disable: 4244 4267) // possible loss of data +#endif + std::vector softmax(const std::vector& logits) { std::vector probs(logits.size()); float max_logit = logits[0]; -- cgit v1.2.3