From 6bc85ba3d684b40ec861bc462e75d890d4b11abd Mon Sep 17 00:00:00 2001 From: EmilDohne <86836589+EmilDohne@users.noreply.github.com> Date: Thu, 7 Mar 2024 18:59:48 +0100 Subject: [PATCH] Move macro inside of PSAPI_NAMESPACE_BEGIN block --- .../src/Util/Endian/EndianByteSwapArr.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PhotoshopAPI/src/Util/Endian/EndianByteSwapArr.h b/PhotoshopAPI/src/Util/Endian/EndianByteSwapArr.h index d853f257..ff65c544 100644 --- a/PhotoshopAPI/src/Util/Endian/EndianByteSwapArr.h +++ b/PhotoshopAPI/src/Util/Endian/EndianByteSwapArr.h @@ -2,15 +2,6 @@ #include "Macros.h" #include "Profiling/Perf/Instrumentor.h" - -// Disable AVX2 at runtime for mac systems and replace their implementation -#ifdef __AVX2__ - #include "AVX2EndianByteSwap.h" - #define AVX2_ENABLED 1 -#else - PSAPI_LOG_WARNING("AVX2", "Detected no support for AVX2 on the system and falling back to slower non-simd implementation"); -#endif - #include "EndianByteSwap.h" #include @@ -30,6 +21,15 @@ PSAPI_NAMESPACE_BEGIN +// Disable AVX2 at runtime for mac systems and replace their implementation +#ifdef __AVX2__ + #include "AVX2EndianByteSwap.h" + #define AVX2_ENABLED 1 +#else + PSAPI_LOG_WARNING("AVX2", "Detected no support for AVX2 on the system and falling back to slower non-simd implementation"); +#endif + + constexpr bool is_little_endian = (std::endian::native == std::endian::little);