fhelium.backend.ckks.rotation._aggregate
Streaming rotation sums with one extended-basis quotient.
RotationSumAccumulator
class View source
python
RotationSumAccumulator(tables: RotationSumTables, *, input_domain: str='ntt')1
Accumulate rotations under one destination relation before division.
Each nonzero-step key product contributes in NTT/Montgomery QP. The ordinary components contribute P times their Q residues and zero P residues. The final coefficient quotient is floor((sum_g z_g + h) / D), D=P or P*M, h=0 or (D-1)/2. Inputs, keys and tables are unchanged; this object owns its accumulators.
add
method
python
def add(source: torch.Tensor, key: torch.Tensor | None, step: int, *, indices: torch.Tensor | None=None) -> None: ...1
Consume CT2 with the common Q layout, scale and polynomial domain.
finish
method
python
def finish() -> torch.Tensor: ...1
Return surviving Q coefficient/standard residues after one quotient.