Commit d2aadabc authored by Vitaly Tuzov's avatar Vitaly Tuzov Committed by Alexander Alekhin

Merge pull request #14743 from terfendail:wui512_fixvswarn

Fix for MSVS2019 build warnings (#14743)

* AVX512 arch support for MSVS

* Fix for MSVS2019 build warnings: updated integral() AVX512 implementation

* Fix for MSVS2019 build warnings: reworked v_rotate_right AVX512 implementation

* fix indentation
parent b3e6c97d
...@@ -294,6 +294,7 @@ if(X86 OR X86_64) ...@@ -294,6 +294,7 @@ if(X86 OR X86_64)
else() else()
ocv_update(CPU_SSE_SUPPORTED ON) ocv_update(CPU_SSE_SUPPORTED ON)
ocv_update(CPU_SSE2_SUPPORTED ON) ocv_update(CPU_SSE2_SUPPORTED ON)
ocv_update(CPU_AVX_512F_FLAGS_ON "/arch:AVX512")
endif() endif()
# Other instruction sets are supported by default since MSVC 2008 at least # Other instruction sets are supported by default since MSVC 2008 at least
else() else()
......
...@@ -79,9 +79,9 @@ public: ...@@ -79,9 +79,9 @@ public:
{ {
// Note the negative index is because the sums/sqsums pointers point to the first real pixel // Note the negative index is because the sums/sqsums pointers point to the first real pixel
// after the border pixel so we have to look backwards // after the border pixel so we have to look backwards
_mm512_mask_storeu_epi64(&sums[-num_channels], (1<<num_channels)-1, _mm512_setzero_si512()); _mm512_mask_storeu_epi64(&sums[-(ptrdiff_t)num_channels], (1<<num_channels)-1, _mm512_setzero_si512());
if (sqsums) if (sqsums)
_mm512_mask_storeu_epi64(&sqsums[-num_channels], (1<<num_channels)-1, _mm512_setzero_si512()); _mm512_mask_storeu_epi64(&sqsums[-(ptrdiff_t)num_channels], (1<<num_channels)-1, _mm512_setzero_si512());
} }
...@@ -180,11 +180,11 @@ public: ...@@ -180,11 +180,11 @@ public:
// //
_mm512_mask_storeu_pd( _mm512_mask_storeu_pd(
results_ptr, // Store the result here results_ptr, // Store the result here
data_mask, // Using the data mask to avoid overrunning the line (__mmask8)data_mask, // Using the data mask to avoid overrunning the line
calculate_integral( // Writing the value of the integral derived from: calculate_integral( // Writing the value of the integral derived from:
src_longs, // input data src_longs, // input data
_mm512_maskz_loadu_pd(data_mask, above_values_ptr), // and the results from line above _mm512_maskz_loadu_pd((__mmask8)data_mask, above_values_ptr), // and the results from line above
accumulator // keeping track of the accumulator accumulator // keeping track of the accumulator
) )
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment