Safe Haskell | None |
---|---|
Language | GHC2021 |
System.CPUFeatures.X86.TypeBool
Description
This module provides the type-level interface to detect CPU features.
You can mark your function with <FEATURE NAME> ~ True =>
to indicate that
it requires a specific CPU feature.
You can detect the availability and get the constraint <FEATURE NAME> ~ True
by pattern-matching on the variable s<FEATURE NAME>
.
Example:
-- This function requires AVX2 someFunction :: AVX2 ~ True => ... case sAVX2 of STrue -> {- In this branch, AVX2 is True -} someFunction SFalse -> {- In this branch, AVX2 is False -} error "AVX2 not available"
Documentation
type family AVX512_BF16 :: Bool Source #
type family AVX512_BITALG :: Bool Source #
type family AVX512_FP16 :: Bool Source #
type family AVX512_IFMA :: Bool Source #
type family AVX512_VBMI :: Bool Source #
type family AVX512_VBMI2 :: Bool Source #
type family AVX512_VNNI :: Bool Source #
type family AVX512_VPOPCNTDQ :: Bool Source #
type family VPCLMULQDQ :: Bool Source #