Skip to content

Commit

Permalink
use Advanced SIMD only on 64bit ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
wx257osn2 committed Apr 2, 2024
1 parent 3c6666c commit f5f9270
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/qoixx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#if defined(__ARM_FEATURE_SVE)
#include<arm_sve.h>
#include<arm_neon.h>
#elif defined(__ARM_NEON)
#elif defined(__aarch64__)
#include<arm_neon.h>
#elif defined(__AVX2__)
#include<immintrin.h>
Expand Down Expand Up @@ -589,7 +589,7 @@ class qoi{

push<sizeof(padding)>(p_, padding);
}
#elif defined(__ARM_NEON)
#elif defined(__aarch64__)
template<bool Alpha>
using pixels_type = std::conditional_t<Alpha, uint8x16x4_t, uint8x16x3_t>;
template<bool Alpha>
Expand Down Expand Up @@ -1155,7 +1155,7 @@ class qoi{
const auto b1 = p.pull();
--size;

#if defined(__ARM_NEON) and not defined(QOIXX_NO_SIMD)
#if defined(__aarch64__) and not defined(QOIXX_NO_SIMD)
#define QOIXX_HPP_DECODE_RUN(px, run) { \
if constexpr(Pusher::is_contiguous){ \
++run; \
Expand Down Expand Up @@ -1335,7 +1335,7 @@ class qoi{
#undef QOIXX_HPP_SVE_REGISTER_SIZE_SWITCH_CASE
#undef QOIXX_HPP_SVE_REGISTER_SIZE_SWITCH
else
#elif defined(__ARM_NEON)
#elif defined(__aarch64__)
if constexpr(coT::pusher::is_contiguous && coU::puller::is_contiguous)
if(desc.channels == 4)
encode_neon<4>(p, puller, desc);
Expand Down

0 comments on commit f5f9270

Please sign in to comment.