fhelium.engine.ntt.plans.power_of_two_radix
Fixed power-of-two-radix NTT plan construction.
CompactPowerOfTwoRadixNttPlan
class View source
python
CompactPowerOfTwoRadixNttPlan(ckks_config: CkksConfig, policy: CompactFixedRadixPolicy, *, device: str | int | torch.device | None=None)1
Radix-specific outer twists and fixed cyclic-root powers.
A radix-R digit evaluates one twisted cyclic R-point NTT. Radix-4, radix-8, and radix-16 use dedicated butterflies. Every digit has the exact policy radix, and incompatible ring dimensions are rejected. This does not alias grouped radix-2 execution.
Outer tables have integral shape [prime, N - 1] and root-power tables have shape [prime, radix] on device in standard representation. Prime rows follow ckks_config.moduli exactly; the four tables are separately allocated and do not alias.