lagoon: %int2 comparison + reduction array jets#67
Closed
sigilante wants to merge 1 commit into
Closed
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. Verified jet == %int2 Hoon on a hoon-135 fakezod. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Runtime counterpart: urbit/vere#1048 |
Collaborator
Author
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.
Stacked on #66. Extends the Lagoon
%int2array jets with the comparison and reduction ops (no GEMM). Runtime counterpart: urbit/vere (linked in a comment).Adds
%int2cases beside%i754for:gth/gte/lth/lte— per-lane signed (two's-complement) compare → 1/0 ray.cumsum(full wrapping sum),dot(sum of products, wrapping),min/max(extremum by two's-complement order),argmin/argmax(forward ravel-index of the first extremum).Native per lane (8…128-bit, no GMP). Signed compares reinterpret the lane as the matching signed C type (native signed compare is two's-complement order). Scalar reductions box via
+scalar-to-ray's shape (all-1s of the input rank); argmin/argmax return the bare index.Verified jet == numerics
%int2Hoon on a hoon-135 fakezod across native widths incl. 128-bit, ties, and negatives.🤖 Generated with Claude Code