Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
evaluation_domain.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Nishat], commit: 94f596f8b3bbbc216f9ad7dc33253256141156b2 }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
10#include <vector>
11
12namespace bb {
13
14template <typename FF> class EvaluationDomain {
15 public:
17 : size(0)
18 , num_threads(0)
19 , thread_size(0)
20 , log2_size(0)
24 , root(FF::zero())
25 , root_inverse(FF::zero())
26 , domain(FF::zero())
27 , domain_inverse(FF::zero())
28 , generator(FF::zero())
29 , generator_inverse(FF::zero())
30 , roots(nullptr) {};
31
32 EvaluationDomain(const size_t domain_size, const size_t target_generator_size = 0);
35
38
40
42
43 const std::vector<FF*>& get_round_roots() const { return round_roots; };
45
46 size_t size; // n, always a power of 2
47 size_t num_threads; // num_threads * thread_size = size
49 size_t log2_size;
53
54 FF root; // omega; the nth root of unity
55 FF root_inverse; // omega^{-1}
56 FF domain; // n; same as size
57 FF domain_inverse; // n^{-1}
60
61 private:
62 std::vector<FF*> round_roots; // An entry for each of the log(n) rounds: each entry is a pointer to
63 // the subset of the roots of unity required for that fft round.
64 // E.g. round_roots[0] = [1, ω^(n/2 - 1)],
65 // round_roots[1] = [1, ω^(n/4 - 1), ω^(n/2 - 1), ω^(3n/4 - 1)]
66 // ...
68
70};
71
72// add alias for compatibility
74} // namespace bb
const std::vector< FF * > & get_round_roots() const
std::vector< FF * > inverse_round_roots
const std::vector< FF * > & get_inverse_round_roots() const
std::vector< FF * > round_roots
EvaluationDomain & operator=(const EvaluationDomain &)=delete
std::shared_ptr< FF[]> roots
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13