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

Bins: Index Type int #3684

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open

Bins: Index Type int #3684

wants to merge 2 commits into from

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Dec 23, 2023

Summary

For performance reasons, int/long are better index types since they do not have over/underflow checks and thus vectorize better.

Also, I see narrowing warnings casting from int to AMReX' unsigned int in WarpX.

Additional background

Seen with clang-tidy in ECP-WarpX/WarpX#3850

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@ax3l ax3l changed the title Bins: Index Type int Bins: Index Type long Dec 23, 2023
@ax3l ax3l changed the title Bins: Index Type long Bins: Index Type int Dec 23, 2023
@ax3l ax3l added the warning label Dec 23, 2023
For performance reasons, `int` are better index types since
they do not have over/underflow checks and thus vectorize better.

Also, I see narrowing warnings casting from `int` to AMReX'
`unsigned int` in WarpX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant