mirror of
https://github.com/pseXperiments/icicle.git
synced 2026-01-09 15:37:58 -05:00
822 B
822 B
#Icicle example : Montgomery vector operations(mul, add, sub) for allpossible options: is_a_on_device is_b_on_device is_result_on_device is_in_montgomery_form (is_async isn't checked)
Key-Takeaway
Icicle accelerates multiplication operation * using Karatsuba algorithm
Concise Usage Explanation
Define field to be used, e. g.:
#include "api/bn254.h"
using namespace bn254;
typedef scalar_t T;
Running the example
cdto your example directory- compile with
./compile.sh - run with
./run.sh
What's in the example
- Define the parameters for the example such as vector size
- Generate random vectors on-host
- Copy them on-device
- Execute element-wise vector multiplication on-device
- Copy results on-host