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

Refactor promotion.hpp (no policy promotion changes) #1022

Closed
wants to merge 5 commits into from

Conversation

ryanelandt
Copy link
Contributor

@ryanelandt ryanelandt commented Aug 27, 2023

Edit: #1021 was closed because it introduced misguided policy promotion changes. This PR contains the ideas from #1021 that are not problematic.


This PR includes the following features of #1021

  • Use of variadic templates instead of manual emulation with optional float arguments
  • Use of std::common_type for float_type promotion simplification

This PR does not including the following features of #1021

  • Support for 16 bit floating types

The file promotion.hpp in this PR is identical to that in #1021 except for line 91. In #1021 this reads:

using type = std::common_type_t<T1, T2>;

In this PR it reads:

using type = std::common_type_t<T1, T2, float>;

This preserves the current floating point promotion behavior.

@ryanelandt ryanelandt changed the title #1021 (chunk 1) Refactor promotion.hpp (no policy promotion changes) Sep 11, 2023
mborland added a commit to cppalliance/cuda-math that referenced this pull request Aug 13, 2024
mborland added a commit that referenced this pull request Aug 14, 2024
@mborland mborland mentioned this pull request Aug 14, 2024
@mborland
Copy link
Member

Merged in with 1179

@mborland mborland closed this Aug 15, 2024
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.

2 participants