Skip to content

Commit

Permalink
Add Apple Silicon support for FFTW
Browse files Browse the repository at this point in the history
Thanks to @andrej5elin I was able to get this working locally.

This commit will add Apple Silicon support for FFTW 3.3.10.
  • Loading branch information
ThomasKluiters committed Jun 26, 2024
1 parent d30fda5 commit d5cb1f9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
13 changes: 11 additions & 2 deletions fftw/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,24 @@ case $PLATFORM in
make -j $MAKEJ V=0
make install-strip
;;
macosx-*)
patch -Np1 < ../../../fftw-macosx.patch
macosx-x86_64)
patch -Np1 < ../../../fftw-macosx_x64_64.patch
./configure --prefix=$INSTALL_PATH --disable-fortran --enable-shared --enable-threads --with-combined-threads --enable-sse2
make -j $MAKEJ V=0
make install-strip
./configure --prefix=$INSTALL_PATH --disable-fortran --enable-shared --enable-threads --with-combined-threads --enable-sse2 --enable-float
make -j $MAKEJ V=0
make install-strip
;;
macosx-arm64)
patch configure ../../../fftw-macosx_arm64.patch
./configure --prefix=$INSTALL_PATH --enable-threads --enable-neon --enable-armv8-cntvct-el0
make -j $MAKEJ V=0
make install-strip
./configure --prefix=$INSTALL_PATH --enable-threads --enable-neon --enable-armv8-cntvct-el0 --enable-float
make -j $MAKEJ V=0
make install-strip
;;
windows-x86)
./configure --prefix=$INSTALL_PATH --disable-fortran --enable-shared --enable-threads --with-combined-threads --enable-sse2 --enable-avx CC="gcc -m32" --with-our-malloc
make -j $MAKEJ V=0
Expand Down
4 changes: 4 additions & 0 deletions fftw/fftw-macosx_arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
3934c3934
< aarch64)
---
> arm)
File renamed without changes.
6 changes: 6 additions & 0 deletions fftw/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
<version>${project.version}</version>
<classifier>${javacpp.platform.linux-ppc64le}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.macosx-arm64}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
Expand Down

0 comments on commit d5cb1f9

Please sign in to comment.