-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
changed detection of Intel Compiler Classic to distinguish MS-Windows #2510
Merged
vitaut
merged 3 commits into
fmtlib:master
from
mborn-adi:fix_intrinsics_detection_with_icc_on_windows
Oct 2, 2021
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
3acda1c
changed detection of Intel Compiler Classic to distinguish MS-Windows
mborn-adi 17fb5de
replaced !FMT_ICC_ON_WINDOWS by FMT_ICC_POSIX
removed #pragma manged
mborn-adi a29db70
replaced FMT_ICC_POSIX with FMT_ICC_INTRINSIC_BUG to be crystal clear…
mborn-adi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,14 +49,6 @@ | |
# define FMT_GCC_VISIBILITY_HIDDEN | ||
#endif | ||
|
||
#ifdef __INTEL_COMPILER | ||
# define FMT_ICC_VERSION __INTEL_COMPILER | ||
#elif defined(__ICL) | ||
# define FMT_ICC_VERSION __ICL | ||
#else | ||
# define FMT_ICC_VERSION 0 | ||
#endif | ||
|
||
#ifdef __NVCC__ | ||
# define FMT_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 100 + __CUDACC_VER_MINOR__) | ||
#else | ||
|
@@ -173,10 +165,13 @@ FMT_END_NAMESPACE | |
!FMT_MSC_VER | ||
# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) | ||
#endif | ||
#if (FMT_GCC_VERSION || FMT_HAS_BUILTIN(__builtin_ctz) || FMT_ICC_VERSION) | ||
#if (FMT_GCC_VERSION || FMT_HAS_BUILTIN(__builtin_ctz) || FMT_ICC_VERSION) && \ | ||
!FMT_ICC_ON_WINDOWS | ||
# define FMT_BUILTIN_CTZ(n) __builtin_ctz(n) | ||
#endif | ||
#if (FMT_GCC_VERSION || FMT_HAS_BUILTIN(__builtin_ctzll) || FMT_ICC_VERSION) | ||
#if (FMT_GCC_VERSION || FMT_HAS_BUILTIN(__builtin_ctzll) || \ | ||
FMT_ICC_VERSION) && \ | ||
!FMT_ICC_ON_WINDOWS | ||
# define FMT_BUILTIN_CTZLL(n) __builtin_ctzll(n) | ||
#endif | ||
|
||
|
@@ -192,7 +187,9 @@ FMT_BEGIN_NAMESPACE | |
namespace detail { | ||
// Avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning. | ||
# if !defined(__clang__) | ||
# pragma managed(push, off) | ||
# if !defined(__ICL) | ||
# pragma managed(push, off) | ||
# endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So done. Please have a look. |
||
# pragma intrinsic(_BitScanForward) | ||
# pragma intrinsic(_BitScanReverse) | ||
# if defined(_WIN64) | ||
|
@@ -255,7 +252,9 @@ inline auto ctzll(uint64_t x) -> int { | |
} | ||
# define FMT_BUILTIN_CTZLL(n) detail::ctzll(n) | ||
# if !defined(__clang__) | ||
# pragma managed(pop) | ||
# if !defined(__ICL) | ||
# pragma managed(pop) | ||
# endif | ||
# endif | ||
} // namespace detail | ||
FMT_END_NAMESPACE | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest replacing
FMT_ICC_ON_WINDOWS
withFMT_ICC_POSIX
defined to 1 on non-Windows platforms. This will simplify the checks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me.