Skip to content

Commit

Permalink
Merge pull request #35 from lemire/dlemire/add_windows_arm_checks
Browse files Browse the repository at this point in the history
Adding ARM checks under Windows.
  • Loading branch information
lemire committed Jun 7, 2021
2 parents 1a4ac1c + 890b60d commit 4d421be
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/vs16-arm-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: VS16-ARM-CI

on: [push, pull_request]

jobs:
ci:
name: windows-vs16
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {arch: ARM}
- {arch: ARM64}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use cmake
run: |
cmake -A ${{ matrix.arch }} -DCMAKE_CROSSCOMPILING=1 -DFASTFLOAT_TEST=ON -B build &&
cmake --build build --verbose
4 changes: 2 additions & 2 deletions include/ewah/ewahutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static inline uint32_t ctz16(uint16_t n) {
inline uint32_t countOnes(uint32_t x) {
return static_cast<uint32_t>(__builtin_popcount(x));
}
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#elif defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM)&& !defined(_M_ARM64)
inline uint32_t countOnes(uint32_t x) { return __popcnt(x); }
#else
inline uint32_t countOnes(uint32_t v) {
Expand All @@ -173,7 +173,7 @@ inline uint32_t countOnes(uint32_t v) {
inline uint32_t countOnes(uint64_t x) {
return static_cast<uint32_t>(__builtin_popcountll(x));
}
#elif defined(_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1400
#elif defined(_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM64)
inline uint32_t countOnes(uint64_t x) {
return static_cast<uint32_t>(__popcnt64(static_cast<__int64>(x)));
}
Expand Down

0 comments on commit 4d421be

Please sign in to comment.