Skip to content

Commit

Permalink
NE10/FFT/complex-non-power-of-2 NEON
Browse files Browse the repository at this point in the history
    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
  • Loading branch information
Phil.Wang committed Dec 18, 2014
1 parent 46b1da1 commit 20b1896
Show file tree
Hide file tree
Showing 21 changed files with 1,946 additions and 316 deletions.
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#
cmake_minimum_required(VERSION 2.6)

project(NE10 C ASM)
project(NE10 C CXX ASM)

option(NE10_BUILD_SHARED "Build NE10 shared libraries" OFF)
option(NE10_BUILD_STATIC "Build NE10 static libraries" ON)
Expand Down Expand Up @@ -83,9 +83,6 @@ if(ANDROID_PLATFORM)
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-as
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-ar
${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-ranlib")
if(ANDROID_PLATFORM AND ANDROID_DEMO)
add_subdirectory(android/NE10Demo/jni)
endif()
elseif(GNULINUX_PLATFORM)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
Expand All @@ -102,11 +99,10 @@ elseif(IOS_PLATFORM)

string(REPLACE ";" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
string(REPLACE ";" "" CMAKE_ASM_FLAGS ${CMAKE_ASM_FLAGS})
if(IOS_DEMO)
add_subdirectory(ios)
endif()
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_ASM_FLAGS}")

# The NE10 library.
add_subdirectory(modules)

Expand All @@ -117,3 +113,11 @@ endif()
if(NE10_BUILD_UNIT_TEST)
add_subdirectory(test)
endif()

if(ANDROID_PLATFORM AND ANDROID_DEMO)
add_subdirectory(android/NE10Demo/jni)
endif()

if(IOS_PLATFORM AND IOS_DEMO)
add_subdirectory(ios)
endif()
7 changes: 6 additions & 1 deletion inc/NE10_dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ extern "C" {
/* fft functions*/

/* function pointers*/
extern ne10_fft_cfg_float32_t (*ne10_fft_alloc_c2c_float32) (ne10_int32_t nfft);

extern void (*ne10_fft_c2c_1d_float32) (ne10_fft_cpx_float32_t *fout,
ne10_fft_cpx_float32_t *fin,
ne10_fft_cfg_float32_t cfg,
Expand Down Expand Up @@ -92,7 +94,6 @@ extern "C" {
ne10_int32_t scaled_flag);

/* init functions*/
extern ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32 (ne10_int32_t nfft);
extern ne10_fft_cfg_int32_t ne10_fft_alloc_c2c_int32 (ne10_int32_t nfft);
extern ne10_fft_cfg_int16_t ne10_fft_alloc_c2c_int16 (ne10_int32_t nfft);

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

/* C version*/
extern ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32_c (ne10_int32_t nfft);

extern void ne10_fft_c2c_1d_float32_c (ne10_fft_cpx_float32_t *fout,
ne10_fft_cpx_float32_t *fin,
ne10_fft_cfg_float32_t cfg,
Expand Down Expand Up @@ -148,6 +151,8 @@ extern "C" {


/* NEON version*/
extern ne10_fft_cfg_float32_t ne10_fft_alloc_c2c_float32_neon (ne10_int32_t nfft);

extern void ne10_fft_c2c_1d_float32_neon (ne10_fft_cpx_float32_t *fout,
ne10_fft_cpx_float32_t *fin,
ne10_fft_cfg_float32_t cfg,
Expand Down
1 change: 1 addition & 0 deletions inc/NE10_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ typedef struct
ne10_int32_t *factors;
ne10_fft_cpx_float32_t *twiddles;
ne10_fft_cpx_float32_t *buffer;
ne10_fft_cpx_float32_t *last_twiddles;
} ne10_fft_state_float32_t;

typedef ne10_fft_state_float32_t* ne10_fft_cfg_float32_t;
Expand Down
1 change: 1 addition & 0 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ if(NE10_ENABLE_DSP)
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_float32.neon.c
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_int32.neon.c
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_int16.neon.c
${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_generic_float32.neonintrinsic.cpp
#${PROJECT_SOURCE_DIR}/modules/dsp/NE10_rfft_float32.neonintrinsic.c
#${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_float32.neonintrinsic.c
#${PROJECT_SOURCE_DIR}/modules/dsp/NE10_fft_int32.neonintrinsic.c
Expand Down

0 comments on commit 20b1896

Please sign in to comment.