diff --git a/3rdparty/kfr b/3rdparty/kfr index 5c16acbd61a..1b30f37dbd5 160000 --- a/3rdparty/kfr +++ b/3rdparty/kfr @@ -1 +1 @@ -Subproject commit 5c16acbd61a93823d5b5f8e006d3b3f87c6f6d04 +Subproject commit 1b30f37dbd5edcfc702eaaf0aea7ea804f2337ae diff --git a/cmake/deps/kfr.cmake b/cmake/deps/kfr.cmake index ba457dfcd4f..2a4de079ab6 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 bf4fa950274..848ba96fe99 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