Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod msac: Document range of values used and returned and mask return values #1233

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

kkysen
Copy link
Collaborator

@kkysen kkysen commented Jun 20, 2024

This adds docs to the mod msac fns on the range of their args and return values, and for return values, it ensures this by masking them. This eliminates a bunch of bounds checks in callers, like fn decode_coefs.

I also included a couple of other small commits in here; didn't really want to put them all in their own PRs.

@kkysen kkysen requested review from rinon and randomPoison June 20, 2024 03:14
@kkysen kkysen force-pushed the kkysen/mod-recon-u8s branch 2 times, most recently from 61d6354 to 37cd90c Compare June 20, 2024 05:40
@kkysen kkysen force-pushed the kkysen/struct-SegmentId branch from 527d779 to c4cb161 Compare June 20, 2024 05:40
@kkysen kkysen force-pushed the kkysen/struct-SegmentId branch from c4cb161 to e2542e2 Compare June 21, 2024 21:13
@kkysen kkysen force-pushed the kkysen/mod-recon-u8s branch from 37cd90c to 4fbda0f Compare June 21, 2024 21:13
kkysen added 4 commits June 23, 2024 16:57
These are checked with `debug_assert!`s and forced in-bounds with `&`.
This tells the compiler the bounds of the return values,
so it can better optimize (e.x. elide bounds checks).
@kkysen kkysen force-pushed the kkysen/struct-SegmentId branch from e2542e2 to 969a859 Compare June 23, 2024 23:58
@kkysen kkysen force-pushed the kkysen/mod-recon-u8s branch from 4fbda0f to 37a2947 Compare June 23, 2024 23:58
Base automatically changed from kkysen/struct-SegmentId to main June 24, 2024 00:04
@kkysen kkysen merged commit 84708b0 into main Jun 24, 2024
26 checks passed
@kkysen kkysen deleted the kkysen/mod-recon-u8s branch June 24, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants