diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index a988a36b..92149372 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -98,6 +98,13 @@ if(ASIOSDK_DIR) target_compile_definitions(juce_plugin_modules PUBLIC JUCE_ASIO=1) endif() +if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/math_approx") + message(STATUS "Configuring math_approx") + add_subdirectory(math_approx) + target_link_libraries(juce_plugin_modules PUBLIC math_approx) + target_compile_definitions(juce_plugin_modules PRIVATE BYOD_USE_MATH_APPROX=1) +endif() + if(IOS) target_link_libraries(juce_plugin_modules PRIVATE juce::juce_product_unlocking) target_compile_definitions(juce_plugin_modules PUBLIC JUCE_IN_APP_PURCHASES=1) diff --git a/modules/RTNeural b/modules/RTNeural index 1e7b5703..04cb333b 160000 --- a/modules/RTNeural +++ b/modules/RTNeural @@ -1 +1 @@ -Subproject commit 1e7b570348c01cd5e05c60082fc92d55d70186c2 +Subproject commit 04cb333bc4b174760958a77c7ce076eae38fe8e4 diff --git a/modules/chowdsp_wdf b/modules/chowdsp_wdf index 0dfd1bdf..7a3c85e4 160000 --- a/modules/chowdsp_wdf +++ b/modules/chowdsp_wdf @@ -1 +1 @@ -Subproject commit 0dfd1bdf98d4276a637d314f6a97ea74778740bd +Subproject commit 7a3c85e47346af7765c23c8855b032f6c0bcdedb diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d1f78446..9225fabe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,10 +167,6 @@ if (NOT(${JAI_COMPILER} STREQUAL "JAI_COMPILER-NOTFOUND")) endif() # AVX/SSE files for accelerated neural nets -if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../modules/math_approx") - message(STATUS "Using RTNeural with math_approx") - add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../modules/math_approx" math_approx) -endif() make_lib_simd_runtime(rnn_accelerated processors/drive/neural_utils/RNNAccelerated.cpp) foreach(target IN ITEMS rnn_accelerated_sse_or_arm rnn_accelerated_avx) target_link_libraries(${target} PRIVATE config_flags juce::juce_recommended_lto_flags warning_flags) @@ -187,6 +183,7 @@ foreach(target IN ITEMS rnn_accelerated_sse_or_arm rnn_accelerated_avx) CXX_VISIBILITY_PRESET hidden ) if(TARGET math_approx) + message(STATUS "Using math_approx for ${target}") target_compile_definitions(${target} PRIVATE RTNEURAL_USE_MATH_APPROX=1) target_link_libraries(${target} PRIVATE math_approx) endif() diff --git a/src/pch.h b/src/pch.h index 75662fb8..e58f5499 100644 --- a/src/pch.h +++ b/src/pch.h @@ -38,6 +38,10 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE #include "jai/SharedJaiContext.h" #endif +#if BYOD_USE_MATH_APPROX +#include +#endif + // global definitions using Parameters = std::vector>; using ParamLayout = AudioProcessorValueTreeState::ParameterLayout; diff --git a/src/processors/drive/diode_circuits/DiodeClipperWDF.h b/src/processors/drive/diode_circuits/DiodeClipperWDF.h index d329d555..d370a12d 100644 --- a/src/processors/drive/diode_circuits/DiodeClipperWDF.h +++ b/src/processors/drive/diode_circuits/DiodeClipperWDF.h @@ -1,8 +1,9 @@ #pragma once #include +#include "OmegaProvider.h" -template