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

Rewrite of clamp() from Alex Wells generates 2x faster code. #2491

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Feb 19, 2020

Also add clamp unit test and benchmark, and the previously missing
implementation of clamp for vfloat16.

Also add clamp unit test and benchmark, and the previously missing
implementation of clamp for vfloat16.
@lgritz
Copy link
Collaborator Author

lgritz commented Feb 19, 2020

@AlexMWells

@AlexMWells
Copy link
Collaborator

LGTM. Should the unit test check NAN returns the low value (as that is a feature/requirement)?

@lgritz
Copy link
Collaborator Author

lgritz commented Feb 19, 2020

That unit test has existed all along. Its failure with the first implementation you suggested is how the NaN issue came to my attention.

@lgritz lgritz merged commit e740656 into AcademySoftwareFoundation:master Feb 19, 2020
@lgritz lgritz deleted the lg-clamp branch February 19, 2020 18:08
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Feb 26, 2020
…SoftwareFoundation#2491)

Also add clamp unit test and benchmark, and the previously missing
implementation of clamp for vfloat16.
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.

None yet

2 participants