Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 23:18:10 -06:00
parent 0d8a5a8131
commit 0dff6df8ed
250 changed files with 12199 additions and 1981 deletions

View file

@ -4,6 +4,7 @@
/// packs one lane every two bits, low lane in the low bits of the
/// first byte, matching `dpf::bit`. Leaf addition is not XOR: a
/// carry stays inside the 2-bit lane. See `packed_lane_arithmetic.hpp`.
/// @see packed_lane_arithmetic.hpp
#ifndef LIBDPF_INCLUDE_DPF_TWOBIT_HPP__
#define LIBDPF_INCLUDE_DPF_TWOBIT_HPP__
@ -50,7 +51,10 @@ static constexpr dpf::twobit to_twobit(unsigned long long value) noexcept
}
/// @brief parse one character as a 2-bit digit
/// @tparam CharT character type
/// @param zero character for 0 (default `'0'`)
/// @param value the value to convert or store
/// @return the returned `dpf::twobit`
/// @throws std::domain_error if `value` is not one of the four digits
template <typename CharT>
HEDLEY_ALWAYS_INLINE
@ -92,6 +96,9 @@ operator>>(std::basic_istream<CharT, Traits> & is, dpf::twobit & value)
}
/// @brief addition in Z/4Z
/// @param lhs the left-hand operand
/// @param rhs the right-hand operand
/// @return addition in Z/4Z
HEDLEY_CONST
HEDLEY_NO_THROW
HEDLEY_ALWAYS_INLINE
@ -102,6 +109,9 @@ constexpr dpf::twobit operator+(dpf::twobit lhs, dpf::twobit rhs) noexcept
}
/// @brief subtraction in Z/4Z
/// @param lhs the left-hand operand
/// @param rhs the right-hand operand
/// @return subtraction in Z/4Z
HEDLEY_CONST
HEDLEY_NO_THROW
HEDLEY_ALWAYS_INLINE
@ -112,6 +122,8 @@ constexpr dpf::twobit operator-(dpf::twobit lhs, dpf::twobit rhs) noexcept
}
/// @brief additive inverse in Z/4Z
/// @param value the value to convert or store
/// @return additive inverse in Z/4Z
HEDLEY_CONST
HEDLEY_NO_THROW
HEDLEY_ALWAYS_INLINE
@ -121,6 +133,9 @@ constexpr dpf::twobit operator-(dpf::twobit value) noexcept
}
/// @brief multiplication in Z/4Z
/// @param lhs the left-hand operand
/// @param rhs the right-hand operand
/// @return multiplication in Z/4Z
HEDLEY_CONST
HEDLEY_NO_THROW
HEDLEY_ALWAYS_INLINE