From eab1b6125338e473019b9f204762da0e7b388a74 Mon Sep 17 00:00:00 2001 From: Hoernchen Date: Wed, 8 May 2013 20:25:23 +0200 Subject: [PATCH] hackrf: default to sse2 on x86/64 --- CMakeLists.txt | 4 ++++ lib/hackrf/hackrf_sink_c.cc | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 823fddd..e6685fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,11 @@ include(GrVersion) #setup version info # Compiler specific setup ######################################################################## +IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x86") + SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions") +ELSE() SET(USE_SIMD "no" CACHE STRING "Use SIMD instructions") +ENDIF() SET(USE_SIMD_VALUES "no" "SSE2" "AVX") SET_PROPERTY(CACHE USE_SIMD PROPERTY STRINGS ${USE_SIMD_VALUES}) LIST(FIND USE_SIMD_VALUES ${USE_SIMD} USE_SIMD_INDEX) diff --git a/lib/hackrf/hackrf_sink_c.cc b/lib/hackrf/hackrf_sink_c.cc index c76f70f..94fd05f 100644 --- a/lib/hackrf/hackrf_sink_c.cc +++ b/lib/hackrf/hackrf_sink_c.cc @@ -441,11 +441,9 @@ int hackrf_sink_c::work( int noutput_items, } } - noutput_items = items_consumed; - // Tell runtime system how many input items we consumed on // each input stream. - consume_each(noutput_items); + consume_each(items_consumed); // Tell runtime system how many output items we produced. return 0;