ntt

command
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 11 Imported by: 0

README

ICICLE example: Number Theoretic Transform (NTT) in Golang

Key-Takeaway

ICICLE provides Golang bindings to CUDA-accelerated C++ implementation of Number Theoretic Transform.

Usage

err := Ntt(
  /* input slice */ scalars,
  /* NTT Direction */ core.KForward,
  /* NTT Configuration */ &cfg,
  /* output slice */ result)

In this example we use the BN254 and BLS12377 fields.

What's in this example

  1. Define the size of NTT.
  2. Generate random inputs
  3. Set up the domain.
  4. Configure NTT
  5. Execute NTT on-device
  6. Move the result on host

Running the example:

go run main.go

[!NOTE] The default size is 2^20. You can change this by passing the -s <size> option. To change the size to 2^23, run the example like this:

go run main.go -s=23

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL