bits-extra-0.0.2.3: Useful bitwise operations
Copyright(c) John Ky 2018-2019
LicenseBSD-3-Clause
Maintainernewhoggy@gmail.com
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Bits.Pext

Description

 
Synopsis

Documentation

class Pext a where Source #

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

Methods

pext Source #

Arguments

:: 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

Instances

Instances details
Pext Word Source # 
Instance details

Defined in Data.Bits.Pext

Methods

pext :: Word -> Word -> Word Source #

Pext Word8 Source # 
Instance details

Defined in Data.Bits.Pext

Methods

pext :: Word8 -> Word8 -> Word8 Source #

Pext Word16 Source # 
Instance details

Defined in Data.Bits.Pext

Methods

pext :: Word16 -> Word16 -> Word16 Source #

Pext Word32 Source # 
Instance details

Defined in Data.Bits.Pext

Methods

pext :: Word32 -> Word32 -> Word32 Source #

Pext Word64 Source # 
Instance details

Defined in Data.Bits.Pext

Methods

pext :: Word64 -> Word64 -> Word64 Source #

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.