mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 21:20:31 -05:00 
			
		
		
		
	merged master
This commit is contained in:
		
						commit
						318602aab5
					
				@ -26,6 +26,10 @@ find_package(PkgConfig)
 | 
				
			|||||||
find_package(Boost)
 | 
					find_package(Boost)
 | 
				
			||||||
find_package(FFTW3F)
 | 
					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})
 | 
					#include(${QT_USE_FILE})
 | 
				
			||||||
@ -267,15 +271,18 @@ include_directories(
 | 
				
			|||||||
	${OPENGL_INCLUDE_DIR}
 | 
						${OPENGL_INCLUDE_DIR}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(MSVC)
 | 
					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_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE2" )
 | 
				
			||||||
		set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /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" )
 | 
							set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
 | 
				
			||||||
		add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
 | 
							add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
 | 
				
			||||||
else()
 | 
							add_definitions(-DUSE_SIMD)
 | 
				
			||||||
	#set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse2" )
 | 
						endif()
 | 
				
			||||||
	#set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -msse2" )
 | 
					 | 
				
			||||||
	add_definitions(-msse2 -Wall)
 | 
					 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,9 @@
 | 
				
			|||||||
#ifndef INCLUDE_INTERPOLATOR_H
 | 
					#ifndef INCLUDE_INTERPOLATOR_H
 | 
				
			||||||
#define INCLUDE_INTERPOLATOR_H
 | 
					#define INCLUDE_INTERPOLATOR_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef USE_SIMD
 | 
				
			||||||
#include <immintrin.h>
 | 
					#include <immintrin.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#include "dsp/dsptypes.h"
 | 
					#include "dsp/dsptypes.h"
 | 
				
			||||||
#include "util/export.h"
 | 
					#include "util/export.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
@ -53,7 +55,7 @@ private:
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		if (phase < 0)
 | 
							if (phase < 0)
 | 
				
			||||||
			phase = 0;
 | 
								phase = 0;
 | 
				
			||||||
#if 1
 | 
					#if USE_SIMD
 | 
				
			||||||
		// beware of the ringbuffer
 | 
							// beware of the ringbuffer
 | 
				
			||||||
		if(m_ptr == 0) {
 | 
							if(m_ptr == 0) {
 | 
				
			||||||
			// only one straight block
 | 
								// only one straight block
 | 
				
			||||||
 | 
				
			|||||||
@ -15,7 +15,9 @@
 | 
				
			|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | 
					// along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | 
				
			||||||
///////////////////////////////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef USE_SIMD
 | 
				
			||||||
#include <immintrin.h>
 | 
					#include <immintrin.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#include <QMouseEvent>
 | 
					#include <QMouseEvent>
 | 
				
			||||||
#include "gui/glspectrum.h"
 | 
					#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
 | 
						m_currentSpectrum = &spectrum; // Store spectrum for current spectrum line display
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//#define NO_AVX
 | 
					#ifndef USE_SIMD
 | 
				
			||||||
#ifdef NO_AVX
 | 
					 | 
				
			||||||
	for(int i = 0; i < m_fftSize; i++) {
 | 
						for(int i = 0; i < m_fftSize; i++) {
 | 
				
			||||||
		int v = (int)((spectrum[i] - m_referenceLevel) * 100.0 / m_powerRange + 100.0);
 | 
							int v = (int)((spectrum[i] - m_referenceLevel) * 100.0 / m_powerRange + 100.0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user