binius_field/arch/strategies.rs
1// Copyright 2024-2025 Irreducible Inc.
2
3/// Packed strategy for arithmetic operations.
4/// (Uses arithmetic operations with underlier and subfield to simultaneously calculate the result
5/// for all packed values)
6pub struct PackedStrategy;
7/// Pairwise recursive strategy. Calculates the result by applying recursive algorithm for each
8/// packed value independently.
9pub struct PairwiseRecursiveStrategy;
10/// Pairwise strategy. Apply the result of the operation to each packed element independently.
11pub struct PairwiseStrategy;
12/// Get result of operation from the table for each sub-element
13pub struct PairwiseTableStrategy;
14/// Applicable only for multiply by alpha and square operations.
15/// Reuse multiplication operation for that.
16pub struct ReuseMultiplyStrategy;
17
18/// Use operations with GFNI instructions
19pub struct GfniStrategy;
20/// Specialized versions of the above to resolve conflicting implementations
21pub struct GfniSpecializedStrategy256b;
22pub struct GfniSpecializedStrategy512b;