Copyright | (c) John Ky 2018-2019 |
---|---|
License | BSD-3-Clause |
Maintainer | newhoggy@gmail.com |
Stability | stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- class Pext a where
- pext :: a -> a -> a
- fastPextEnabled :: Bool
Documentation
Parallel extract bits for Word64
Copies selected bits from src
to contiguous low-order bits of the return value;
higher-order return value bits are cleared.
>>>
pext 1 1 :: Word64
1
:: a | the bitmap from which bits will be extracted |
-> a | the bitmap selecting the bits that are to be extracted |
-> a | the bitmap containing the extract bits with higher-order bits cleared |
fastPextEnabled :: Bool Source #
Runtime flag indicating whether the pext
function is using the high-performance.
BMI2 instruction set. A value of False
indicates that pext
is emulated.
Actual performance when using the BMI2 instruction set will vary according to CPU model. For example Intel CPUs currently outperform AMD CPUs in this area.