From: Paul Brossier Date: Tue, 8 Jan 2019 16:43:12 +0000 (+0100) Subject: [crepe] prevent openblas from opening threads X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=dd4e5d592933ab2e1c980b55c29b1aab418f31d0;p=aubio.git [crepe] prevent openblas from opening threads --- 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;