Affix
view release on metacpan or search on metacpan
infix/src/core/platform.c view on Meta::CPAN
}
#endif
if (!osxsave || !avx512f_hardware)
return false;
// 2. Check XCR0 for ZMM support.
// Need SSE(1) | AVX(2) | opmask(5) | ZMM_Hi256(6) | Hi16_ZMM(7)
uint64_t xcr0 = _infix_xgetbv();
uint64_t required = XCR0_SSE | XCR0_AVX | XCR0_OPMASK | XCR0_ZMM_Hi256 | XCR0_Hi16_ZMM;
return (xcr0 & required) == required;
}
#endif
#if defined(INFIX_ARCH_AARCH64)
bool infix_cpu_has_sve(void) {
#if defined(INFIX_OS_LINUX) && defined(HWCAP_SVE)
return (getauxval(AT_HWCAP) & HWCAP_SVE) != 0;
#elif defined(INFIX_OS_MACOS)
int sve_present = 0;
size_t size = sizeof(sve_present);
( run in 1.083 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )