Set up aggressive optimizations when using simde or MOD

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-31 18:01:22 +00:00
parent 7974430c4e
commit d0a354a411
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
11 changed files with 54 additions and 8 deletions

View file

@ -924,7 +924,7 @@ protected:
json_object_set_new(moduleJ, "favorite", json_boolean(m.favorite));
if (m.added > 0)
json_object_set_new(moduleJ, "added", json_integer(m.added));
if (std::isfinite(m.lastAdded))
if (std::isfinite(m.lastAdded) && d_isNotZero(m.lastAdded))
json_object_set_new(moduleJ, "lastAdded", json_real(m.lastAdded));
if (json_object_size(moduleJ))

View file

@ -104,6 +104,10 @@ ifeq ($(HAIKU),true)
BASE_FLAGS += -DCLOCK_MONOTONIC_RAW=CLOCK_MONOTONIC
endif
ifeq ($(MOD_BUILD),true)
BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp
endif
ifneq ($(WASM),true)
ifneq ($(HAIKU),true)
BASE_FLAGS += -pthread

View file

@ -323,6 +323,8 @@ BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=0
else
BASE_FLAGS += -DDISTRHO_PLUGIN_USES_CUSTOM_MODGUI=1
endif
BASE_FLAGS += -DSIMDE_ENABLE_OPENMP -fopenmp
LINK_FLAGS += -fopenmp
endif
ifneq ($(WASM),true)
@ -346,8 +348,6 @@ BASE_FLAGS += -DNANOVG_GLES3_FORCED
endif
BUILD_C_FLAGS += -std=gnu11
BUILD_C_FLAGS += -fno-finite-math-only -fno-strict-aliasing
BUILD_CXX_FLAGS += -fno-finite-math-only -fno-strict-aliasing
ifneq ($(MACOS),true)
BUILD_CXX_FLAGS += -faligned-new -Wno-abi

View file

@ -140,11 +140,9 @@ static void Cable_step(Cable* that) {
const int channels = output->channels;
// Copy all voltages from output to input
for (int c = 0; c < channels; c++) {
float v = output->voltages[c];
// Set 0V if infinite or NaN
if (!std::isfinite(v))
v = 0.f;
input->voltages[c] = v;
if (!std::isfinite(output->voltages[c]))
__builtin_unreachable();
input->voltages[c] = output->voltages[c];
}
// Set higher channel voltages to 0
for (int c = channels; c < input->channels; c++) {