Repository navigation
Named u8↔i8 bit reinterpret; Codec9 runtime scale and batch encode - #397
Merged
Merged
Conversation
…batch encode Operator ruling 2026-10-30. The u8/i8 crossing is allowed only through an explicit intent parameter: U8x64::reinterpret_as_i8(ReinterpretBits) and I8x64::reinterpret_as_u8(ReinterpretBits), a bit reinterpret with no conversion. Codec9Runtime takes the scale as a checked value and shares one encoder and decoder with the compile-time Codec9, so equal scales give identical codewords; it adds encode_touched_batch and decode_batch over the magnitude lane plus the presence plane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
FACET STRIDE rule 3 names the one sanctioned crossing; the DR512 law doc records Codec9Runtime and when to use which scale form; synergy map R4 marks V1, V10, N4 and N14 decided and lists what stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
AdaWorldAPI
marked this pull request as ready for review
October 30, 2026 02:07
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
This PR implements two operator rulings from 2026-10-30.
1. u8→i8, only through an explicit intent parameter.
ReinterpretBitsis a zero-sized marker type.U8x64::reinterpret_as_i8(ReinterpretBits)andI8x64::reinterpret_as_u8(ReinterpretBits)live insrc/simd.rsand work on every backend.0x80becomes-128and0xFFbecomes-1, with no saturation.CLAUDE.mdnow names this as the single allowed crossing; a plainas i8stays forbidden.bits_as_i8store/load stand-in).2. Codec9 runtime scale and batch encoder, so the same codewords serve exact LUT[a,b] work and learning.
Codec9Runtime<R>takes the scale as a value, checked once (it must be positive and finite).Codec9<R, C>, so equal scales produce identical codewords.encode_touched_batchanddecode_batchread and write the magnitude lane plus the presence plane:Codec9for codeword tables.Codec9Runtimefor learned scales.Tests
hpc::codec9, 12 in that module in total. One pairsCodec9RuntimeagainstCodec9over a 6,000-value sweep and all 512 codewords.simd::reinterpret_bits_parity, one of which feeds0x80intodot4_u8_i8_addand expects −512 per lane.config-v3).wasm-parity.shandneon-parity.shpass.-D warningsand fmt are clean, and the facet-stride guard reports nothing on the diff.Generated by Claude Code