Skip to content

Commit 20b1896

Browse files
author
Phil.Wang
committed
NE10/FFT/complex-non-power-of-2 NEON
ARM 64-bit (Cortex-A57) complex forward float LLVM 3.5 Time in ms | |kiss|opus|pffft|NE10| | C| C| NEON|NEON| 60| 129| 113| NA| 44| 120| 148| 127| NA| 49| 240| 151| 128| 55| 47| 480| 169| 142| 60| 55| 960| 183| 149| 65| 58| 1920| 193| 167| 71| 66| 3840| 217| 175| 76| 71| SNR > 100dB ARM 64-bit (Cortex-A53) complex forward float LLVM 3.5 Time in ms | |kiss|opus|pffft|NE10| | C| C| NEON|NEON| 60| 295| 311| NA| 72| 120| 368| 375| NA| 79| 240| 345| 342| 104| 77| 480| 415| 407| 115| 87| 960| 406| 378| 121| 95| 1920| 476| 441| 138| 113| 3840| 497| 424| 161| 126| SNR > 100dB ARM 32-bit (Cortex-A9) complex forward float LLVM 3.5 Time in ms | |kiss|opus|pffft|NE10| | C| C| NEON|NEON| 60| 224| 211| NA| 98| 120| 265| 245| NA| 104| 240| 262| 240| 130| 106| 480| 302| 274| 150| 122| 960| 305| 271| 162| 153| 1920| 369| 356| 230| 206| 3840| 415| 440| 282| 239| SNR > 100dB Change-Id: If9418041b01eed49dbdc8d6a18dd03f2c5684da8
1 parent 46b1da1 commit 20b1896

21 files changed

+1946
-316
lines changed

CMakeLists.txt

+11-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
cmake_minimum_required(VERSION 2.6)
2828

29-
project(NE10 C ASM)
29+
project(NE10 C CXX ASM)
3030

3131
option(NE10_BUILD_SHARED "Build NE10 shared libraries" OFF)
3232
option(NE10_BUILD_STATIC "Build NE10 static libraries" ON)
@@ -83,9 +83,6 @@ if(ANDROID_PLATFORM)
8383
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-as
8484
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-ar
8585
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-ranlib")
86-
if(ANDROID_PLATFORM AND ANDROID_DEMO)
87-
add_subdirectory(android/NE10Demo/jni)
88-
endif()
8986
elseif(GNULINUX_PLATFORM)
9087
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
9188
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
@@ -102,11 +99,10 @@ elseif(IOS_PLATFORM)
10299

103100
string(REPLACE ";" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
104101
string(REPLACE ";" "" CMAKE_ASM_FLAGS ${CMAKE_ASM_FLAGS})
105-
if(IOS_DEMO)
106-
add_subdirectory(ios)
107-
endif()
108102
endif()
109103

104+
set(CMAKE_CXX_FLAGS "${CMAKE_ASM_FLAGS}")
105+
110106
# The NE10 library.
111107
add_subdirectory(modules)
112108

@@ -117,3 +113,11 @@ endif()
117113
if(NE10_BUILD_UNIT_TEST)
118114
add_subdirectory(test)
119115
endif()
116+
117+
if(ANDROID_PLATFORM AND ANDROID_DEMO)
118+
add_subdirectory(android/NE10Demo/jni)
119+
endif()
120+
121+
if(IOS_PLATFORM AND IOS_DEMO)
122+
add_subdirectory(ios)
123+
endif()

inc/NE10_dsp.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ extern "C" {
4646
/* fft functions*/
4747

4848
/* function pointers*/
49+
extern ne10_fft_cfg_float32_t (*ne10_fft_alloc_c2c_float32) (ne10_int32_t nfft);
50+
4951
extern void (*ne10_fft_c2c_1d_float32) (ne10_fft_cpx_float32_t *fout,
5052
ne10_fft_cpx_float32_t *fin,
5153
ne10_fft_cfg_float32_t cfg,
@@ -92,7 +94,6 @@ extern "C" {
9294
ne10_int32_t scaled_flag);
9395

9496
/* init functions*/
95-
extern ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32 (ne10_int32_t nfft);
9697
extern ne10_fft_cfg_int32_t ne10_fft_alloc_c2c_int32 (ne10_int32_t nfft);
9798
extern ne10_fft_cfg_int16_t ne10_fft_alloc_c2c_int16 (ne10_int32_t nfft);
9899

@@ -101,6 +102,8 @@ extern "C" {
101102
extern ne10_fft_r2c_cfg_int16_t ne10_fft_alloc_r2c_int16 (ne10_int32_t nfft);
102103

103104
/* C version*/
105+
extern ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32_c (ne10_int32_t nfft);
106+
104107
extern void ne10_fft_c2c_1d_float32_c (ne10_fft_cpx_float32_t *fout,
105108
ne10_fft_cpx_float32_t *fin,
106109
ne10_fft_cfg_float32_t cfg,
@@ -148,6 +151,8 @@ extern "C" {
148151

149152

150153
/* NEON version*/
154+
extern ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32_neon (ne10_int32_t nfft);
155+
151156
extern void ne10_fft_c2c_1d_float32_neon (ne10_fft_cpx_float32_t *fout,
152157
ne10_fft_cpx_float32_t *fin,
153158
ne10_fft_cfg_float32_t cfg,

inc/NE10_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ typedef struct
223223
ne10_int32_t *factors;
224224
ne10_fft_cpx_float32_t *twiddles;
225225
ne10_fft_cpx_float32_t *buffer;
226+
ne10_fft_cpx_float32_t *last_twiddles;
226227
} ne10_fft_state_float32_t;
227228

228229
typedef ne10_fft_state_float32_t* ne10_fft_cfg_float32_t;

modules/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ if(NE10_ENABLE_DSP)
190190
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_float32.neon.c
191191
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_int32.neon.c
192192
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_int16.neon.c
193+
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_generic_float32.neonintrinsic.cpp
193194
#${PROJECT_SOURCE_DIR}/modules/dsp/NE10_rfft_float32.neonintrinsic.c
194195
#${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_float32.neonintrinsic.c
195196
#${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_int32.neonintrinsic.c

0 commit comments

Comments
 (0)