mirror of
https://github.com/pseXperiments/icicle.git
synced 2026-01-09 15:37:58 -05:00
762 B
762 B
Icicle Example: Polynomial Multiplication with NTT
Key-Takeaway
Icicle provides polynomial multiplication using the Number Theoretical Transform (NTT), including forward and inverse transforms.
Concise Usage Explanation
- Include the necessary headers.
- Initialize the NTT domain.
- Prepare and transform the polynomials from host to device memory.
- Perform pointwise multiplication.
- Apply the inverse NTT.
Running the example
# for CPU
./run.sh -d CPU
# for CUDA
./run.sh -d CUDA -b /path/to/cuda/backend/install/dir
What's in the example
- Define the size of the example.
- Initialize input polynomials.
- Perform Radix-2 or Mixed-Radix NTT.
- Perform pointwise polynomial multiplication.
- Apply the inverse NTT.