From 73d13ad19a8c9c4da4f405088a85169b1a171e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Pawe=C5=82czyk?= Date: Wed, 8 May 2024 17:33:43 +0200 Subject: [PATCH] ggml : expose SSE3 and SSSE3 for MSVC when AVX is available (#2128) --- ggml-impl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ggml-impl.h b/ggml-impl.h index e68b7287..93a4f1a2 100644 --- a/ggml-impl.h +++ b/ggml-impl.h @@ -37,9 +37,16 @@ extern "C" { #ifndef __F16C__ #define __F16C__ #endif +#endif + +// __SSE3__ and __SSSE3__ are not defined in MSVC, but SSE3/SSSE3 are present when AVX/AVX2/AVX512 are available +#if defined(_MSC_VER) && (defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__)) #ifndef __SSE3__ #define __SSE3__ #endif +#ifndef __SSSE3__ +#define __SSSE3__ +#endif #endif // 16-bit float