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

Avoid integer promotion warnings with MSVC #460

Merged

Conversation

miscco
Copy link
Contributor

@miscco miscco commented Sep 20, 2023

It seems that MSVC introduces an integer promotion when calling a templated call operator, e.g. with std::minus

We can work around this issue by explicitly passing in the type w want. See https://godbolt.org/z/b5qP86dTE

Fixes thrust build issues on MSVC

@miscco miscco requested review from a team as code owners September 20, 2023 11:18
@miscco miscco requested review from elstehle and wmaxey and removed request for a team September 20, 2023 11:18
It seems that MSVC introduces an integer promotion when calling a templated call operator, e.g. with `std::minus`

We can work around this issue by explicitly passing in the type w want. See https://godbolt.org/z/b5qP86dTE
@miscco miscco force-pushed the avoid_integer_promotion_adjacent_difference branch from 3b49095 to 81ad380 Compare September 20, 2023 11:41
@miscco miscco merged commit 92cc917 into NVIDIA:main Sep 21, 2023
@miscco miscco deleted the avoid_integer_promotion_adjacent_difference branch September 21, 2023 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants