mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-04 10:38:45 -04:00
merged master
This commit is contained in:
commit
318602aab5
@ -26,6 +26,10 @@ find_package(PkgConfig)
|
||||
find_package(Boost)
|
||||
find_package(FFTW3F)
|
||||
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x86")
|
||||
SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions")
|
||||
ENDIF()
|
||||
|
||||
##############################################################################
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
@ -267,15 +271,18 @@ include_directories(
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE2" )
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE2" )
|
||||
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
|
||||
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
|
||||
else()
|
||||
#set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse2" )
|
||||
#set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -msse2" )
|
||||
add_definitions(-msse2 -Wall)
|
||||
if(USE_SIMD MATCHES SSE2)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse2" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -msse2" )
|
||||
add_definitions(-DUSE_SIMD)
|
||||
elseif(MSVC)
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE2" )
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE2" )
|
||||
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
|
||||
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
|
||||
add_definitions(-DUSE_SIMD)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
|
@ -1,7 +1,9 @@
|
||||
#ifndef INCLUDE_INTERPOLATOR_H
|
||||
#define INCLUDE_INTERPOLATOR_H
|
||||
|
||||
#ifdef USE_SIMD
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "util/export.h"
|
||||
#include <stdio.h>
|
||||
@ -53,7 +55,7 @@ private:
|
||||
{
|
||||
if (phase < 0)
|
||||
phase = 0;
|
||||
#if 1
|
||||
#if USE_SIMD
|
||||
// beware of the ringbuffer
|
||||
if(m_ptr == 0) {
|
||||
// only one straight block
|
||||
|
@ -15,7 +15,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef USE_SIMD
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
#include <QMouseEvent>
|
||||
#include "gui/glspectrum.h"
|
||||
|
||||
@ -378,8 +380,7 @@ void GLSpectrum::updateHistogram(const std::vector<Real>& spectrum)
|
||||
|
||||
m_currentSpectrum = &spectrum; // Store spectrum for current spectrum line display
|
||||
|
||||
//#define NO_AVX
|
||||
#ifdef NO_AVX
|
||||
#ifndef USE_SIMD
|
||||
for(int i = 0; i < m_fftSize; i++) {
|
||||
int v = (int)((spectrum[i] - m_referenceLevel) * 100.0 / m_powerRange + 100.0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user