Skip to content

Commit 53f2149

Browse files
committed
Check optmask for avx512
1 parent dc14c6e commit 53f2149

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/xsimd/config/xsimd_cpu_features_x86.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,9 @@ namespace xsimd
594594

595595
inline bool avx512_enabled() const noexcept
596596
{
597-
// Check all SSE, AVX, and AVX512 bits even though AVX512 must imply AVX and SSE
598-
return xcr0().all_bits_set<x86_xcr0::xcr0::sse, x86_xcr0::xcr0::avx, x86_xcr0::xcr0::zmm_hi256>();
597+
// Check all SSE, AVX, optmask, and AVX512 bits even though AVX512 must
598+
// imply AVX, SSE, and masked operations.
599+
return xcr0().all_bits_set<x86_xcr0::xcr0::sse, x86_xcr0::xcr0::avx, x86_xcr0::xcr0::opmask, x86_xcr0::xcr0::zmm_hi256>();
599600
}
600601

601602
/**

0 commit comments

Comments
 (0)