lagoon: %int2 comparison + reduction array jets#69
Merged
Conversation
Mirror the vere change (urbit/vere): Lagoon %int2 cases for gth/gte/lth/lte, cumsum, dot, min/max, argmin/argmax -- native per-lane two's-complement, signed compares via the matching signed C type, scalar reductions boxed per +scalar-to-ray. Reuses the _la_scalar_box helper added by #68 (forward-index argmin/argmax and the rank-correct scalar shape), so int2 and i754 reductions share one boxing helper. Verified jet == %int2 Hoon on a hoon-135 fakezod. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Re-opened against
main— the original #67 was auto-closed when its stacked base branch was deleted on #66's merge.)Extends the Lagoon
%int2array jets with the comparison and reduction ops (no GEMM). Runtime counterpart: urbit/vere#1048.gth/gte/lth/lte— per-lane signed (two's-complement) compare → 1/0 ray.cumsum(wrapping sum),dot(sum of products),min/max(two's-complement order),argmin/argmax(forward ravel-index of the first extremum).Native per lane (8…128-bit, no GMP). Scalar reductions reuse the
_la_scalar_boxhelper from #68 (all-1s of input rank, per+scalar-to-ray), so%int2and%i754reductions share one boxing helper — no duplication.Verified jet ==
%int2Hoon on a hoon-135 fakezod across native widths incl. 128-bit, ties, and negatives.🤖 Generated with Claude Code