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

Use sse2neon.h for Linux ARM64 #45

Merged
merged 2 commits into from
Feb 14, 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
26 changes: 25 additions & 1 deletion .github/workflows/ninja-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: make check
run: make check

build-aarch64:
name: Build on Linux ARM64
runs-on: ubuntu-latest

steps:
- name: Checkout bwa
uses: actions/checkout@v4

- name: Build
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu22.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/NINJA"
install: |
apt-get update -q -y
apt-get install -q -y make gcc g++
run: |
cd /NINJA
make check

5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ OBJECTS := $(SOURCES:.cpp=.o)

# The C++ compiler must support C++11
CXX := g++
CXXFLAGS := -std=gnu++11 -Wall -mssse3
CXXFLAGS := -std=gnu++11 -Wall
ifeq ($(shell uname -m),x86_64)
CXXFLAGS += -mssse3
endif

# TODO: build to a dist directory or similar
# TODO: use separate release and debug build directories
Expand Down
6 changes: 5 additions & 1 deletion NINJA/DistanceCalculator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@

#include <cmath>
#include <cfloat>
#include <cstdint>
#ifdef __x86_64__
#include <xmmintrin.h> /* SSE */
#include <emmintrin.h> /* SSE2 */
#include <tmmintrin.h> /* SSE3 */
#include <cstdint>
#elif defined __ARM_NEON
#include "sse2neon.h"
#endif


class DistanceCalculator {
Expand Down
Loading