Benchmarking: added option to deactivate SIMD for decimators

pull/177/head
f4exb 2018-04-26 22:45:47 +02:00
rodzic ddfcccab22
commit 2427c885f7
2 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -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")

Wyświetl plik

@ -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