Annotate noexcept and constexpr with HEDLEY, and add interval containment, ChaCha, and the dyadic range tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 20:44:07 -06:00
parent 875f09fec1
commit 0d8a5a8131
97 changed files with 9212 additions and 1159 deletions

View file

@ -9,6 +9,8 @@
#ifndef LIBDPF_INCLUDE_GROTTO_EASY_LUT_HPP__
#define LIBDPF_INCLUDE_GROTTO_EASY_LUT_HPP__
#include "hedley/hedley.h"
#include <algorithm>
#include <cstdint>
#include <limits>
@ -35,6 +37,7 @@ struct easy_lut
std::vector<std::int64_t> c2;
std::vector<std::int64_t> den;
HEDLEY_NO_THROW
std::size_t parts() const noexcept { return c0.size(); }
std::int64_t operator()(Raw x) const
@ -82,6 +85,7 @@ struct easy_poly
std::int64_t den = 1;
};
HEDLEY_NO_THROW
inline bool operator==(easy_poly a, easy_poly b) noexcept
{
return a.c0 == b.c0 && a.c1 == b.c1 && a.c2 == b.c2 && a.den == b.den;