Copyright | (c) John Ky 2018-2019 |
---|---|
License | BSD-3-Clause |
Maintainer | newhoggy@gmail.com |
Stability | stable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- class Pdep a where
- pdep :: a -> a -> a
- fastPdepEnabled :: Bool
Documentation
Bitwise parallel deposit. Deposits bits from the source at the locations described by the mask.
Copies lower order bits from src
to mask
1-bit locations in the return value;
mask
0-bit locations in the return value will be cleared.
>>>
pdep 1 1 :: Word64
1
:: a | the bitmap from which bits will be extracted |
-> a | the bitmap selecting the bit locations that are to be deposited to |
-> a | the bitmap containing the deposited bits with other bits bits cleared |
fastPdepEnabled :: Bool Source #
Runtime flag indicating whether the pdep
function is using the high-performance.
BMI2 instruction set. A value of False
indicates that pdep
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.