From dd4e5d592933ab2e1c980b55c29b1aab418f31d0 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 8 Jan 2019 17:43:12 +0100 Subject: [PATCH] [crepe] prevent openblas from opening threads --- src/pitch/pitch_crepe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pitch/pitch_crepe.c b/src/pitch/pitch_crepe.c index adeafe68..f1c7d95a 100644 --- a/src/pitch/pitch_crepe.c +++ b/src/pitch/pitch_crepe.c @@ -99,6 +99,12 @@ aubio_pitch_crepe_t *new_aubio_pitch_crepe(void) uint_t output_shape[2]; uint_t i; +#if defined(HAVE_BLAS) && defined(HAVE_OPENBLAS_CBLAS_H) + // workaround to prevent openblas from opening multiple threads, since + // the overhead appears to be higher than using a single thread. + openblas_set_num_threads(1); +#endif + AUBIO_ASSERT (capacity_mode < 5 && (sint_t)capacity_mode >= 0); o->n_layers = 6; -- 2.11.0