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 redefinition of _bit_scan_{forward,reverse} macros #248

Merged
merged 1 commit into from
Dec 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Vc/common/bitscanintrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define VC_COMMON_BITSCANINTRINSICS_H_

#if defined(Vc_GCC) || defined(Vc_CLANG) || defined(Vc_APPLECLANG)
# if Vc_GCC >= 0x40500
// GCC 4.5.0 introduced _bit_scan_forward / _bit_scan_reverse
# include <x86intrin.h>
# else
// GCC <= 4.4 and clang have x86intrin.h, but not the required functions
#include <x86intrin.h>
# ifndef _bit_scan_forward
# define _bit_scan_forward(x) __builtin_ctz(x)
#include "macros.h"
static Vc_ALWAYS_INLINE Vc_CONST int _Vc_bit_scan_reverse_asm(unsigned int x) {
Expand Down