Generate Mu and FullGenPoly constants for a GF(2) Barrett reduction.

Synopsis

Declared in <llvm/Analysis/HashRecognize.h>

static
std::pair<APInt, APInt>
genBarrettConstants(PolynomialInfo const& Info);

Description

Returns a pair of Mu of bitwidth TC+1 and FullGenPoly of bitwidth BW+1. Mu is used in the first clmul operation. Mu = floor(xˆ(BW+TC) / P(x)). FullGenPoly is used in the second clmul operation, and is Info.RHS with the implied BW'th bit. Endianness is accounted for using Info.IsBigEndian.

Return Value

Pair of (Mu, FullGenPoly) Barrett reduction constants.

Parameters

Name

Description

Info

Recognized polynomial algorithm providing RHS and endianness.

Created with MrDocs