ref: 5b96946277d10807ff262b8734e470b55f41636a
parent: a9564f37d42f44f592e5881a20d73cfbad203083
author: xnorpx <xnorpx@outlook.com>
date: Mon May 22 14:49:14 EDT 2023
Use pragma message instead of warning on MSVC Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
--- a/dnn/nnet.c
+++ b/dnn/nnet.c
@@ -42,7 +42,11 @@
#include "plc_data.h"
#ifdef NO_OPTIMIZATIONS
+#if defined(_MSC_VER)
+#pragma message ("Compiling without any vectorization. This code will be very slow")
+#else
#warning Compiling without any vectorization. This code will be very slow
+#endif
#endif
--- a/dnn/vec_avx.h
+++ b/dnn/vec_avx.h
@@ -41,7 +41,11 @@
#else
+#if defined(_MSC_VER)
+#pragma message ("Only SSE and SSE2 are available. On newer machines, enable SSSE3/AVX/AVX2 to get better performance")
+#else
#warning "Only SSE and SSE2 are available. On newer machines, enable SSSE3/AVX/AVX2 using -march= to get better performance"
+#endif
#endif
--
⑨