Check and use constexpr for fns and constructors#2925
Merged
umar456 merged 3 commits intoarrayfire:masterfrom Jun 21, 2020
Merged
Check and use constexpr for fns and constructors#2925umar456 merged 3 commits intoarrayfire:masterfrom
umar456 merged 3 commits intoarrayfire:masterfrom
Conversation
cb5e824 to
62f6ced
Compare
umar456
previously approved these changes
Jun 10, 2020
Member
Author
|
Don't merge this yet, looks like just having this |
1e46b17 to
5e1b722
Compare
f1299ab to
876e27f
Compare
* AF_CONSTEXPR expands to nothing if constexpr support is not available. * Replace CONSTEXPR_DH with AF_CONSTEXPR and __DH__ in `src/backend/common/half.hpp` * Removed AF_CONSTEXPR where it is invalid in half.hpp
876e27f to
90b760b
Compare
* Adds the Zc:__cplusplus flag to cuda builds for MSVC if the flag is available. the cuda_fp16 header does not define the default constructor for __half as "= default" and that prevents the __half struct to be used in a constexpr expression * For older versions of MSVC we define the __cplusplus macro before and after the inclusion of cuda_fp16.h header. * Define the AF_CONSTEXPR macro for NVRTC compilation
umar456
approved these changes
Jun 21, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2924