An open API service indexing awesome lists of open source software.

https://github.com/againstentropy/fftw3-android


https://github.com/againstentropy/fftw3-android

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# FFTW3 for Android

This is a fork of [Lauszus/fftw3-android](https://github.com/Lauszus/fftw3-android) that is modified to update the fftw version to 3.3.10.

## Prerequisites

- Android NDK

You can download and install the Android NDK from [here](https://developer.android.com/ndk/downloads).

For convenience, it's recommended to export the `ANDROID_NDK` environment variable to the path of the Android NDK, which can be used in [config.h](jni/fftw-3.3.10/config.h).

- fftw source code

You can download the fftw source code from [fftw.org](https://www.fftw.org/download.html), unzipped, and moved to `jni/`.

Public header `fftw.h` can be found at `fftw-3.3.10/api/fftw.h`.

## Build

Modify the [config.h](jni/fftw-3.3.10/config.h) file to enable/disable features, such as:
- neon
- openmp
- threads
- single precision

Then run the following command to build FFTW3:

```bash
bash ./build.sh
```

You will find the built static library `libfftw3.a` under `obj/local/arm64-v8a/`.

By default, the build script will build the double precision version of FFTW3, with the following features enabled:
- double precision
- neon
- openmp (shared library)

## Single-precision

Uncomment the following line in `config.h` to build the single precision version of FFTW3:

```C
#define FFTW_SINGLE 1
```

To follow the fftw official naming convention, it's highly recommended to update the module name from `fftw3` to `fftw3f` for single precision.

You can update the following files to do so:

- `APP_MODULES` in [Application.mk](jni/Application.mk)
- `LOCAL_MODULE` in [Android.mk](jni/fftw-3.3.10/Android.mk)