-
Notifications
You must be signed in to change notification settings - Fork 22
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
decode_coefs
experiment
#1325
Open
lqd
wants to merge
11
commits into
memorysafety:main
Choose a base branch
from
lqd:const-decode-coefs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
decode_coefs
experiment
#1325
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1977ffd
add const generic fns to get `TxfmSize`s and `TxfmInfo`s
lqd 63c3147
example of `decode_coefs` with const generic tdims
lqd d33c83e
fully inline two functions that are only partially inlined
lqd 462ecb2
remove coalesced bounds check
lqd 6a761f5
fully inline `decode_coefs_class`
lqd f6ab903
run rustfmt
lqd 7e89b23
fix const generic naming
lqd 6cd908c
remove duplication in `dav1d_txfm_dimensions` table
lqd a5731dd
use const assignment instead of macro
lqd 29d4351
wrap constant calls in const blocks
lqd 749e7f0
panic on invalid TxfmSize constant discriminant
lqd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a static? Can it be const so we don't have to duplicate it in the const switch above? I don't see anywhere that really relies on being able to take the address of these elements (i.e. they don't seem to be used from ASM?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't seen a need for it to remain a static, but preferred to leave this out of the experiment to have your opinion about the const generics first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also use
enum_map!
to use the abovefn
to generate this table (and make the key typed).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try
enum_map!
but then my measurements seemed slightly worse. It also required implementDefaultValue
forTxfmInfo
that I'm not sure can be correct, but then again it won't be used by the enum map so it may be fine?Since the measurements seemed slightly worsened (and I haven't had the time t check the assembly), but still within noise most of the time, I didn't add this change to this PR. I can definitely push it to another branch if you'd like to test it yourself.
I also tried completely removing the
static
and using the (modified)const fn
for the runtime values outside ofdecode_coefs
, but that also seemed to yield worse numbers, so I've left it out of this PR. I did push a commit removing the duplication by using the new function though.