Skip to content

Commit

Permalink
Use _BitScanForward on Windows, fallback to __builtin_ctzl otherwise
Browse files Browse the repository at this point in the history
Fixes: VcDevel#307
Suggested-by: Bruno Manganelli <[email protected]>
  • Loading branch information
amadio committed Jun 13, 2022
1 parent d4b8109 commit 628f5c0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Vc/common/iterators.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,10 @@ template <typename V> using ConstIterator = Iterator<const V>;

void nextBit()
{
#ifdef Vc_GNU_ASM
bit = __builtin_ctzl(mask);
#elif defined(Vc_MSVC)
#ifdef Vc_MSVC
_BitScanForward(&bit, mask);
#else
#error "Not implemented yet. Please contact [email protected]"
bit = __builtin_ctzl(mask);
#endif
}
void resetLsb()
Expand Down

0 comments on commit 628f5c0

Please sign in to comment.