Checkpoint the party/runtime stack before share-program and malicious-mode work.
Ship the TLS mesh, composer, Beaver/Yao/leaf MPC, prep/online paths, apps, and docs so the tree is pushable before elevating share_expr, security_mode, and prep resume. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
695f8e84f7
commit
0d22946a0e
1835 changed files with 170291 additions and 2849 deletions
|
|
@ -40,6 +40,10 @@ struct offset_iterable
|
|||
using reference = std::add_const_t<typename std::iterator_traits<wrapped_iterator>::reference>;
|
||||
using const_reference = std::add_const_t<typename std::iterator_traits<wrapped_iterator>::reference>;
|
||||
using pointer = typename std::iterator_traits<wrapped_iterator>::pointer;
|
||||
/// \complexity `upper_bound` on the sorted range (`Θ(log N)`), then stores the rotation. Extra space is the iterators, `Θ(1)`.
|
||||
/// @param begin start of a sorted range
|
||||
/// @param end end of that range
|
||||
/// @param offset public rotation; the view starts at the first entry strictly greater than `offset`
|
||||
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
constexpr offset_iterable(wrapped_iterator begin, wrapped_iterator end,
|
||||
|
|
@ -239,6 +243,13 @@ struct offset_const_iterator : public offset_iterator_base<WrappedIterator>
|
|||
}
|
||||
};
|
||||
|
||||
/// @brief View `container` rotated so the first entry strictly greater than `offset` comes first.
|
||||
/// @tparam ContainerT sorted random-access container
|
||||
/// @param container sorted range
|
||||
/// @param offset public rotation point
|
||||
/// @return an `offset_iterable` over `container`
|
||||
/// @see grotto::for_each_offset
|
||||
/// \complexity One `upper_bound` (`Θ(log N)`, `N = container.size()`). Extra space is the iterators, `Θ(1)`.
|
||||
template <typename ContainerT>
|
||||
auto offset_by(const ContainerT & container, typename ContainerT::size_type offset)
|
||||
{
|
||||
|
|
@ -246,6 +257,8 @@ auto offset_by(const ContainerT & container, typename ContainerT::size_type offs
|
|||
}
|
||||
|
||||
// assumes the range is sorted
|
||||
/// \complexity One `upper_bound` to find the rotation, then one call of `f` per element. `Θ(N)` after the search. Extra space `Θ(1)`.
|
||||
/// @see grotto::prefix_parities
|
||||
template <typename IteratorT,
|
||||
typename InputT,
|
||||
typename Function,
|
||||
|
|
@ -257,7 +270,7 @@ constexpr auto for_each_offset(IteratorT begin, IteratorT end, InputT offset, Fu
|
|||
InputT val = -offset;
|
||||
dpf::utils::flip_msb_if_signed_integral(val);
|
||||
|
||||
auto size = std::distance(begin, end);
|
||||
const auto size = static_cast<std::size_t>(std::distance(begin, end));
|
||||
// find the new "start" of the sorted sequence after offsetting by offset
|
||||
std::size_t new_first = std::distance(begin,
|
||||
std::upper_bound(begin, end, val, std::less_equal<void>{}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue