From 0c7866eda3266bd7cba8bc6af03d969b777e188d Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 8 Jun 2020 21:47:36 +0200 Subject: [PATCH] initial OMP processing tests --- Jamulus.pro | 10 ++++++++++ src/server.cpp | 3 +++ 2 files changed, 13 insertions(+) diff --git a/Jamulus.pro b/Jamulus.pro index 27568b72..42f4dad8 100755 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -6,6 +6,16 @@ contains(CONFIG, "noupcasename") { TARGET = jamulus } +# support multi-threading with OMP if requested +contains(CONFIG, "multithreading") { + unix { + message(The OpenMP multithreading is enabled.) + DEFINES += USE_OMP + QMAKE_CXXFLAGS += -fopenmp + QMAKE_LFLAGS += -fopenmp + } +} + CONFIG += qt \ thread \ release diff --git a/src/server.cpp b/src/server.cpp index acab3b19..d072bd5d 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -953,6 +953,9 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE vecChannelLevels ); } +#ifdef USE_OMP +# pragma omp parallel for +#endif for ( int i = 0; i < iNumClients; i++ ) { int iClientFrameSizeSamples = 0; // initialize to avoid a compiler warning