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

Fix typo bug with vreinterpretq + CI improvements #21

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
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
40 changes: 10 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-latest]
build_type: [Release]
c_compiler: [gcc, clang]
include:
- os: ubuntu-20.04
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-20.04
c_compiler: clang
cpp_compiler: clang++
- os: ubuntu-22.04
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-22.04
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: gcc
cpp_compiler: g++
compiler: [{cpp: g++, c: gcc}, {cpp: clang++, c: clang}]
python: ["3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -60,33 +42,31 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"


- name: Install packages (Linux)
if: runner.os == 'Linux'
run: >
sudo apt-get install -y libeigen3-dev llvm


- name: Install packages (MacOS)
if: runner.os == 'macOS'
run: >
brew install eigen

- name: Install GCC (MacOS)
if: runner.os == 'macOS' && matrix.c_compiler == 'gcc'
if: runner.os == 'macOS' && matrix.compiler.c == 'gcc'
run: >
brew install gcc


- name: Install Python packages
run: >
pip install typing_extensions
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }}
-DCMAKE_C_COMPILER=${{ matrix.compiler.c }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}

Expand Down
2 changes: 1 addition & 1 deletion cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ find_package(Python 3.8
REQUIRED COMPONENTS Interpreter Development.Module
OPTIONAL_COMPONENTS Development.SABIModule)

CPMAddPackage("gh:wjakob/nanobind#4ed5fdf80de460edc416c0e948d6e6c60e61a02a")
CPMAddPackage("gh:wjakob/nanobind#b0136fe6ac1967cb2399456adc346a1af06a3b88")

CPMAddPackage("gh:kavrakilab/nigh#97130999440647c204e0265d05a997dbd8da4e70")
set(NIGH_INCLUDE_DIRS ${nigh_SOURCE_DIR}/src)
Expand Down
4 changes: 2 additions & 2 deletions src/impl/vamp/vector/neon.hh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ namespace vamp
template <unsigned int i>
inline static constexpr auto lshift_dispatch(VectorT v) noexcept -> VectorT
{
return vreinterpretq_u32_f32(vshlq_n_u32(vreinterpretq_u32_f32(v), i));
return vreinterpretq_f32_u32(vshlq_n_u32(vreinterpretq_u32_f32(v), i));
}

template <unsigned int = 0>
Expand All @@ -240,7 +240,7 @@ namespace vamp
template <unsigned int i>
inline static constexpr auto rshift_dispatch(VectorT v) noexcept -> VectorT
{
return vreinterpretq_u32_f32(vshrq_n_u32(vreinterpretq_u32_f32(v), i));
return vreinterpretq_f32_u32(vshrq_n_u32(vreinterpretq_u32_f32(v), i));
}

template <unsigned int = 0>
Expand Down
Loading