Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
process_buckets.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
9#include <cstddef>
10#include <cstdint>
11
13
14// Number of bits processed per radix sort pass
15constexpr uint32_t RADIX_BITS = 8;
16
17// Mask for extracting bucket index from point schedule entry (lower 32 bits)
18constexpr uint64_t BUCKET_INDEX_MASK = 0xffffffff;
19
33void radix_sort_count_zero_entries(uint64_t* keys,
34 size_t num_entries,
35 uint32_t shift,
36 size_t& num_zero_entries,
37 uint32_t bucket_index_bits,
38 const uint64_t* top_level_keys) noexcept;
39
52size_t sort_point_schedule_and_count_zero_buckets(uint64_t* point_schedule,
53 size_t num_entries,
54 uint32_t bucket_index_bits) noexcept;
55
56} // namespace bb::scalar_multiplication
constexpr uint32_t RADIX_BITS
size_t sort_point_schedule_and_count_zero_buckets(uint64_t *point_schedule, const size_t num_entries, const uint32_t bucket_index_bits) noexcept
Sort point schedule by bucket index and count zero-bucket entries.
void radix_sort_count_zero_entries(uint64_t *keys, const size_t num_entries, const uint32_t shift, size_t &num_zero_entries, const uint32_t bucket_index_bits, const uint64_t *top_level_keys) noexcept
Recursive MSD radix sort that also counts entries with zero bucket index.
constexpr uint64_t BUCKET_INDEX_MASK