From ed29f9dcc51994ff5af56e8b1eb2dde5bbe140b8 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Mon, 26 Apr 2021 16:02:03 +0200 Subject: [PATCH] Added work around for old volk versions --- core/src/dsp/math.h | 4 ++++ docker_builds/ubuntu_bionic/do_build.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/dsp/math.h b/core/src/dsp/math.h index 62241d1f..e0eda3f4 100644 --- a/core/src/dsp/math.h +++ b/core/src/dsp/math.h @@ -30,7 +30,11 @@ namespace dsp { } if constexpr (std::is_same_v || std::is_same_v) { +#ifdef USE_OLD_VOLK_ADD + volk_32f_x2_add_32f((float*)out.writeBuf, (float*)_a->readBuf, (float*)_b->readBuf, a_count * 2); +#else volk_32fc_x2_add_32fc((lv_32fc_t*)out.writeBuf, (lv_32fc_t*)_a->readBuf, (lv_32fc_t*)_b->readBuf, a_count); +#endif } else { volk_32f_x2_add_32f(out.writeBuf, _a->readBuf, _b->readBuf, a_count); diff --git a/docker_builds/ubuntu_bionic/do_build.sh b/docker_builds/ubuntu_bionic/do_build.sh index c948c3f2..94aec9a5 100644 --- a/docker_builds/ubuntu_bionic/do_build.sh +++ b/docker_builds/ubuntu_bionic/do_build.sh @@ -15,7 +15,7 @@ cd SDRPlusPlus mkdir build cd build cmake .. -make -j2 +make CXX_FLAGS=-DUSE_OLD_VOLK_ADD=1 -j2 cd .. sh make_debian_package.sh ./build \ No newline at end of file