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);