mirror of
https://github.com/pseXperiments/icicle.git
synced 2026-01-09 15:37:58 -05:00
Icicle example: Number-Theoretical Transform (NTT)
Key-Takeaway
Icicle provides CUDA C++ template function NTT for Number Theoretical Transform, also known as Discrete Fourier Transform.
Concise Usage Explanation
// Select the curve
#define CURVE_ID 1
// Include NTT template
#include "appUtils/ntt/ntt.cu"
using namespace curve_config;
using namespace ntt;
// Configure NTT
NTTConfig<S> config=DefaultNTTConfig<S>();
// Call NTT
NTT<S, E>(input, ntt_size, NTTDir::kForward, config, output);
Running the example
cdto your example directory- compile with
./compile.sh - run with
./run.sh
What's in the example
- Define the size of the example
- Initialize input
- Run Radix2 NTT
- Run MixedRadix NTT
- Validate the data output