1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-27 15:26:33 -04:00

Benchmarking: added option to deactivate SIMD for decimators

This commit is contained in:
f4exb 2018-04-26 22:45:47 +02:00
parent ddfcccab22
commit 2427c885f7
2 changed files with 10 additions and 2 deletions

View File

@ -30,6 +30,7 @@ option(DEBUG_OUTPUT "Print debug messages" OFF)
option(SANITIZE_ADDRESS "Activate memory address sanitization" OFF)
option(HOST_RPI "Compiling on RPi" OFF)
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" OFF)
option(NO_DSP_SIMD "Do not ese SIMD instructions for DSP even if available" OFF)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
@ -203,6 +204,13 @@ if (SANITIZE_ADDRESS)
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -fsanitize=address")
endif()
if (NO_DSP_SIMD)
message(STATUS "Not compiling with SIMD instructions for DSP even if available")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_DSP_SIMD")
else()
message(STATUS "Compiling with SIMD instructions for DSP if available")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

View File

@ -18,7 +18,7 @@
#define INCLUDE_GPL_DSP_DECIMATORS_H_
#include "dsp/dsptypes.h"
#ifdef SDR_RX_SAMPLE_24BIT
#if defined(SDR_RX_SAMPLE_24BIT) || defined(NO_SIMD_DSP)
#include "dsp/inthalfbandfilterdb.h"
#else
#ifdef USE_SSE4_1
@ -331,7 +331,7 @@ public:
void decimate64_cen(SampleVector::iterator* it, const T* bufI, const T* bufQ, qint32 len);
private:
#ifdef SDR_RX_SAMPLE_24BIT
#if defined(SDR_RX_SAMPLE_24BIT) || defined(NO_SIMD_DSP)
IntHalfbandFilterDB<qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator2; // 1st stages
IntHalfbandFilterDB<qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator4; // 2nd stages
IntHalfbandFilterDB<qint64, DECIMATORS_HB_FILTER_ORDER> m_decimator8; // 3rd stages