diff --git a/bitutil.h b/bitutil.h index 5f6b2e1..bd4635e 100644 --- a/bitutil.h +++ b/bitutil.h @@ -137,7 +137,11 @@ static ALWAYS_INLINE __m128i mm_xore_epi16( __m128i v, __m128i sv) { return _mm_ static ALWAYS_INLINE __m128i mm_delta_epi32(__m128i v, __m128i sv) { return _mm_sub_epi32(v, _mm_or_si128(_mm_srli_si128(sv, 12), _mm_slli_si128(v, 4))); } static ALWAYS_INLINE __m128i mm_xore_epi32( __m128i v, __m128i sv) { return _mm_xor_si128(v, _mm_or_si128(_mm_srli_si128(sv, 12), _mm_slli_si128(v, 4))); } #endif - + +#if !defined(_M_X64) && !defined(__x86_64__) && defined(__AVX__) +#define _mm256_extract_epi64(v, index) ((__int64)((uint64_t)(uint32_t)_mm256_extract_epi32((v), (index) * 2) | (((uint64_t)(uint32_t)_mm256_extract_epi32((v), (index) * 2 + 1)) << 32))) +#endif + //------------------ Horizontal OR ----------------------------------------------- #ifdef __AVX2__ static ALWAYS_INLINE unsigned mm256_hor_epi32(__m256i v) { diff --git a/vs/vs2017/TurboPFor.vcxproj b/vs/vs2017/TurboPFor.vcxproj index 11307a3..24ee3d6 100644 --- a/vs/vs2017/TurboPFor.vcxproj +++ b/vs/vs2017/TurboPFor.vcxproj @@ -87,19 +87,15 @@ - MaxSpeed + Disabled true - __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) true AdvancedVectorExtensions2 MultiThreadedDebug true /w24003 /w24005 /w24028 /w24047 /w24090 /w24133 /w24146 /w24333 /w24789 %(AdditionalOptions) ..\.. - Speed - false - Fast - Default Console @@ -110,7 +106,7 @@ Disabled true - __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) true AdvancedVectorExtensions2 MultiThreadedDebug @@ -129,7 +125,7 @@ true true true - __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions) true AdvancedVectorExtensions2 Speed @@ -151,7 +147,7 @@ true true true - __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + __SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;USE_SSE;USE_AVX2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions) true AdvancedVectorExtensions2 Speed diff --git a/vs/vs2017/icapp.vcxproj b/vs/vs2017/icapp.vcxproj index d73628f..cc9d577 100644 --- a/vs/vs2017/icapp.vcxproj +++ b/vs/vs2017/icapp.vcxproj @@ -19,9 +19,7 @@ - - _CRT_SECURE_NO_WARNINGS;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) - + @@ -99,13 +97,12 @@ Disabled true - _CRT_SECURE_NO_WARNINGS;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) + CODEC2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) true /w24146 /w24133 /w24996 MultiThreadedDebug AdvancedVectorExtensions2 ..\..\ext - false Console @@ -116,7 +113,7 @@ Disabled true - CODEC2;_CRT_SECURE_NO_WARNINGS;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) + CODEC2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions) true /w24146 /w24133 /w24996 MultiThreadedDebug @@ -134,7 +131,7 @@ true true true - _CRT_SECURE_NO_WARNINGS;_CONSOLE;NDEBUG;%(PreprocessorDefinitions) + CODEC2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions) true /w24146 /w24133 /w24996 MultiThreaded @@ -154,7 +151,7 @@ true true true - CODEC2;_CRT_SECURE_NO_WARNINGS;_CONSOLE;NDEBUG;%(PreprocessorDefinitions) + CODEC2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions) true /w24146 /w24133 /w24996 MultiThreaded