From e975d0d5c5dd261c038764a07057d6a1c3c49ebb Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sat, 10 May 2014 18:35:52 +0200 Subject: [PATCH] Remove OMP usage, it leads to performance issues at runtime on machines with few cores (e.g. 2) --- PitchTracker/PitchTracker.vcxproj | 2 -- PitchTracker/ptAKF.cpp | 4 ---- 2 files changed, 6 deletions(-) diff --git a/PitchTracker/PitchTracker.vcxproj b/PitchTracker/PitchTracker.vcxproj index 65ce0ada..06c0b94c 100644 --- a/PitchTracker/PitchTracker.vcxproj +++ b/PitchTracker/PitchTracker.vcxproj @@ -135,7 +135,6 @@ Speed Fast false - true Windows @@ -158,7 +157,6 @@ true Speed Fast - true Windows diff --git a/PitchTracker/ptAKF.cpp b/PitchTracker/ptAKF.cpp index 27251d72..913e0cce 100644 --- a/PitchTracker/ptAKF.cpp +++ b/PitchTracker/ptAKF.cpp @@ -179,15 +179,11 @@ int PtAKF::_GetNote(float samples[_SampleCt], float* restrict maxVolume, float w float maxWeight = 0.f; //TODO: When using FFT this can be speed up a lot by only checking around the AKF peaks - #pragma omp parallel for schedule(static) for (int toneIndex = 0; toneIndex <= _MaxHalfTone; toneIndex++){ float curWeight = _AnalyzeByTone(samples, samplesWindowed, toneIndex); weights[toneIndex] = curWeight; - } - for (int toneIndex = 0; toneIndex <= _MaxHalfTone; toneIndex++){ - float curWeight = weights[toneIndex]; if(curWeight > maxWeight){ maxWeight = curWeight; }