diff --git a/3rdparty/kfr b/3rdparty/kfr index 5c16acbd61a9..3400128bd4aa 160000 --- a/3rdparty/kfr +++ b/3rdparty/kfr @@ -1 +1 @@ -Subproject commit 5c16acbd61a93823d5b5f8e006d3b3f87c6f6d04 +Subproject commit 3400128bd4aae050fe50ff33b041a2f2e8f67c4c diff --git a/cmake/deps/kfr.cmake b/cmake/deps/kfr.cmake index ba457dfcd4f9..2a4de079ab6c 100644 --- a/cmake/deps/kfr.cmake +++ b/cmake/deps/kfr.cmake @@ -16,6 +16,7 @@ endif() if(OSSIA_ENABLE_KFR) if(NOT TARGET kfr) add_subdirectory("${OSSIA_3RDPARTY_FOLDER}/kfr" "${CMAKE_CURRENT_BINARY_DIR}/kfr_build") + set_target_properties(kfr PROPERTIES UNITY_BUILD 0) set_target_properties(kfr_dft PROPERTIES UNITY_BUILD 0) endif() endif() diff --git a/src/ossia/audio/fft.cpp b/src/ossia/audio/fft.cpp index bf4fa950274a..848ba96fe990 100644 --- a/src/ossia/audio/fft.cpp +++ b/src/ossia/audio/fft.cpp @@ -186,17 +186,18 @@ namespace ossia { static_assert(sizeof(kfr::c64) == sizeof(fft_complex)); static const constexpr auto fft_real_allocator = pod_allocator_avx2{}; -static const constexpr auto fft_cplx_allocator = pod_allocator_avx2{}; + static const constexpr auto alloc_real = [](std::size_t sz) { return fft_real_allocator.allocate(sz); }; +// FIXME KFR 6: no more pod static const constexpr auto alloc_complex - = [](std::size_t sz) { return fft_cplx_allocator.allocate(sz); }; + = [](std::size_t sz) { return std::allocator{}.allocate(sz); }; static const constexpr struct { void operator()(fft_real* p) const noexcept { fft_real_allocator.deallocate(p, 0); } void operator()(fft_complex* p) const noexcept { - fft_cplx_allocator.deallocate(reinterpret_cast(p), 0); + std::allocator{}.deallocate(reinterpret_cast(p), 0); } } fft_free; static const constexpr auto create_plan_r2c