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:
parent
875f09fec1
commit
0d8a5a8131
97 changed files with 9212 additions and 1159 deletions
|
|
@ -1,3 +1,8 @@
|
|||
/// @file dpf/uint256_t.hpp
|
||||
/// @brief Leaf arithmetic for `uint256_t` and the 128-bit SIMD lanes.
|
||||
/// @copyright Copyright (c) 2019-2026 Ryan Henry and [others](@ref authors)
|
||||
/// @license Released under a GNU General Public v2.0 (GPLv2) license.
|
||||
|
||||
#ifndef LIBDPF_INCLUDE_DPF_UINT256_T_HPP__
|
||||
#define LIBDPF_INCLUDE_DPF_UINT256_T_HPP__
|
||||
|
||||
|
|
@ -205,6 +210,7 @@ struct msb_of<uint256_t>
|
|||
template <>
|
||||
struct mod_pow_2<uint128_t>
|
||||
{
|
||||
HEDLEY_NO_THROW
|
||||
std::size_t operator()(uint128_t val, std::size_t n) const noexcept
|
||||
{
|
||||
return mod_pow_2<uint64_t>{}(static_cast<uint64_t>(val.lower()), n);
|
||||
|
|
@ -214,6 +220,7 @@ struct mod_pow_2<uint128_t>
|
|||
template <>
|
||||
struct mod_pow_2<uint256_t>
|
||||
{
|
||||
HEDLEY_NO_THROW
|
||||
std::size_t operator()(uint256_t val, std::size_t n) const noexcept
|
||||
{
|
||||
return mod_pow_2<uint128_t>{}(val.lower(), n);
|
||||
|
|
@ -227,6 +234,7 @@ struct to_integral_type<uint128_t>
|
|||
using parent = to_integral_type_base<uint128_t>;
|
||||
using typename parent::integral_type;
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
constexpr integral_type operator()(uint128_t val) const noexcept
|
||||
{
|
||||
return (simde_uint128(val.upper()) << 64) | simde_uint128(val.lower());
|
||||
|
|
@ -240,6 +248,7 @@ struct to_integral_type<uint256_t>
|
|||
using parent = to_integral_type_base<uint256_t>;
|
||||
using typename parent::integral_type;
|
||||
|
||||
HEDLEY_NO_THROW
|
||||
constexpr integral_type operator()(uint256_t val) const noexcept
|
||||
{
|
||||
return val;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue