From b46376962cc806a2957f7988ec7fd28c8e16771d Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Tue, 6 Jul 2021 22:17:29 +0000 Subject: [PATCH] MSVC: specify Vc_VDECL explicitly on a few functions Fixes #289 --- Vc/avx/detail.h | 2 +- Vc/cpuid.h | 2 +- Vc/sse/detail.h | 2 +- Vc/support.h | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Vc/avx/detail.h b/Vc/avx/detail.h index d2c72592b..58027559a 100644 --- a/Vc/avx/detail.h +++ b/Vc/avx/detail.h @@ -937,7 +937,7 @@ Vc_INTRINSIC __m256i avx_broadcast( uchar x) { return _mm256_set1_epi8(x); } // sorted{{{1 template = AVXImpl && Impl <= AVX2Impl)>> -Vc_CONST_L AVX2::Vector sorted(AVX2::Vector x) Vc_CONST_R; +Vc_CONST_L AVX2::Vector Vc_VDECL sorted(AVX2::Vector x) Vc_CONST_R; template Vc_INTRINSIC Vc_CONST AVX2::Vector sorted(AVX2::Vector x) { return sorted(x); diff --git a/Vc/cpuid.h b/Vc/cpuid.h index 9d78acb01..3d165a630 100644 --- a/Vc/cpuid.h +++ b/Vc/cpuid.h @@ -67,7 +67,7 @@ class CpuId * Will be executed automatically before main, but not necessarily before other functions * executing before main. */ - static void init(); + static void Vc_VDECL init(); //! Return the cache line size in bits. static inline ushort cacheLineSize() { return static_cast(s_cacheLineSize) * 8u; } diff --git a/Vc/sse/detail.h b/Vc/sse/detail.h index 086a00c62..68e116937 100644 --- a/Vc/sse/detail.h +++ b/Vc/sse/detail.h @@ -772,7 +772,7 @@ Vc_INTRINSIC uchar max(__m128i a, uchar) { // sorted{{{1 template -Vc_CONST_L SSE::Vector sorted(SSE::Vector x) Vc_CONST_R; +Vc_CONST_L SSE::Vector Vc_VDECL sorted(SSE::Vector x) Vc_CONST_R; template Vc_INTRINSIC Vc_CONST SSE::Vector sorted(SSE::Vector x) { static_assert(!CurrentImplementation::is(ScalarImpl), diff --git a/Vc/support.h b/Vc/support.h index adda84fe5..472feedbf 100644 --- a/Vc/support.h +++ b/Vc/support.h @@ -72,8 +72,7 @@ unsigned int extraInstructionsSupported(); * * \param impl The SIMD target to test for. */ -Vc_TARGET_NO_SIMD -bool isImplementationSupported(Vc::Implementation impl); +Vc_TARGET_NO_SIMD bool Vc_VDECL isImplementationSupported(Vc::Implementation impl); /** * \internal