Module field

Module field 

Source
Expand description

An implementation of 4-way vectorized 32bit field arithmetic using AVX2.

The FieldElement2625x4 struct provides a vector of four field elements, implemented using AVX2 operations. Its API is designed to abstract away the platform-dependent details, so that point arithmetic can be implemented only in terms of a vector of field elements.

At this level, the API is optimized for speed and not safety. The FieldElement2625x4 does not always perform reductions. The pre- and post-conditions on the bounds of the coefficients are documented for each method, but it is the caller’s responsibility to ensure that there are no overflows.

StructsΒ§

FieldElement2625x4
A vector of four field elements.

EnumsΒ§

Lanes
The Lanes enum represents a subset of the lanes A,B,C,D of a FieldElement2625x4.
Shuffle
The Shuffle enum represents a shuffle of a FieldElement2625x4.

ConstantsΒ§

A_LANES πŸ”’
A_LANES64 πŸ”’
B_LANES πŸ”’
B_LANES64 πŸ”’
C_LANES πŸ”’
C_LANES64 πŸ”’
D_LANES πŸ”’
D_LANES64 πŸ”’

FunctionsΒ§

repack_pair πŸ”’
Repack 64-bit lanes into 32-bit lanes:
unpack_pair πŸ”’
Unpack 32-bit lanes into 64-bit lanes: