initial OMP processing tests

This commit is contained in:
Volker Fischer 2020-06-08 21:47:36 +02:00
parent 1880520f77
commit 0c7866eda3
2 changed files with 13 additions and 0 deletions

View file

@ -6,6 +6,16 @@ contains(CONFIG, "noupcasename") {
TARGET = jamulus 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 \ CONFIG += qt \
thread \ thread \
release release

View file

@ -953,6 +953,9 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
vecChannelLevels ); vecChannelLevels );
} }
#ifdef USE_OMP
# pragma omp parallel for
#endif
for ( int i = 0; i < iNumClients; i++ ) for ( int i = 0; i < iNumClients; i++ )
{ {
int iClientFrameSizeSamples = 0; // initialize to avoid a compiler warning int iClientFrameSizeSamples = 0; // initialize to avoid a compiler warning