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

Add support for Aarch64 cores. #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 4 additions & 3 deletions cmake/Modules/SetSystemProcessor.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ macro (set_system_processor)
if (NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
include (CheckCSourceCompiles)
set (CPU_LINES
"#if defined __x86_64__ || defined _M_X64 /*\;x86_64\;*/"
"#if defined __i386__ || defined _M_IX86 /*\;x86_32\;*/"
"#if defined __arm__ || defined _M_ARM /*\;arm\;*/"
"#if defined __x86_64__ || defined _M_X64 /*\;x86_64\;*/"
"#if defined __i386__ || defined _M_IX86 /*\;x86_32\;*/"
"#if defined __arm__ || defined _M_ARM /*\;arm\;*/"
"#if defined __aarch64__ || defined _M_ARM64 /*\;arm64\;*/"
)
foreach (CPU_LINE ${CPU_LINES})
string (CONCAT CPU_SOURCE "${CPU_LINE}" "
Expand Down
7 changes: 6 additions & 1 deletion src/pffft-wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ static void pffft_zconvolve(PFFFT_Setup *s, const float *a, const float *b, floa

float ar, ai, br, bi;

#ifdef __arm__
#if defined(__arm__) || defined(__aarch64__) || defined(_M_ARM64)

#if defined _MSC_VER
#define __builtin_prefetch(_p) __prefetch(_p)
#endif

__builtin_prefetch(va);
__builtin_prefetch(vb);
__builtin_prefetch(va+2);
Expand Down
2 changes: 1 addition & 1 deletion src/pffft.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ typedef __m128 v4sf;
/*
ARM NEON support macros
*/
#elif !defined(PFFFT_SIMD_DISABLE) && defined(__arm__)
#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(__aarch64__) || defined(_M_ARM64))
# include <arm_neon.h>
typedef float32x4_t v4sf;
# define SIMD_SZ 4
Expand Down