jets: for new atom ops#627
Merged
Merged
Conversation
ashelkovnykov
approved these changes
Apr 11, 2024
Comment on lines
54
to
58
| static c3_w | ||
| _ch_popcount(c3_w num_w) | ||
| { | ||
| return __builtin_popcount(num_w); | ||
| return c3_pc_w(num_w); | ||
| } |
Collaborator
There was a problem hiding this comment.
Why not just remove this function entirely, if it only calls an alias to a built-in?
Collaborator
Author
There was a problem hiding this comment.
I was just minimizing the diff, but it'd be better to refactor and this is probably a fine place to do so.
| wor_w &= (1 << bit_w) - 1; | ||
|
|
||
| if ( wor_w ) { | ||
| return bit_w - (32 - c3_lz_w(wor_w)); |
Collaborator
There was a problem hiding this comment.
They come out to the same thing, but I think the relationship is a lot clearer when expressed as:
[# leading 0s] - (32 - [# bits])
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.
Adds jets for the operations in urbit/urbit#6961, to support urbit/urbit#6932.