Remove OMP usage, it leads to performance issues at runtime on machines with few cores (e.g. 2)
This commit is contained in:
1 parent
ae2672247c
commit
e975d0d5c5
2 files changed
-6
No files matched your search
@@ -135,7 +135,6 @@
|
|||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<FloatingPointModel>Fast</FloatingPointModel>
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
<OmitFramePointers>false</OmitFramePointers>
|
<OmitFramePointers>false</OmitFramePointers>
|
||||||
<OpenMPSupport>true</OpenMPSupport>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -158,7 +157,6 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<FloatingPointModel>Fast</FloatingPointModel>
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
<OpenMPSupport>true</OpenMPSupport>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -179,15 +179,11 @@ int PtAKF::_GetNote(float samples[_SampleCt], float* restrict maxVolume, float w
|
|||||||
float maxWeight = 0.f;
|
float maxWeight = 0.f;
|
||||||
|
|
||||||
//TODO: When using FFT this can be speed up a lot by only checking around the AKF peaks
|
//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++){
|
for (int toneIndex = 0; toneIndex <= _MaxHalfTone; toneIndex++){
|
||||||
float curWeight = _AnalyzeByTone(samples, samplesWindowed, toneIndex);
|
float curWeight = _AnalyzeByTone(samples, samplesWindowed, toneIndex);
|
||||||
|
|
||||||
weights[toneIndex] = curWeight;
|
weights[toneIndex] = curWeight;
|
||||||
}
|
|
||||||
|
|
||||||
for (int toneIndex = 0; toneIndex <= _MaxHalfTone; toneIndex++){
|
|
||||||
float curWeight = weights[toneIndex];
|
|
||||||
if(curWeight > maxWeight){
|
if(curWeight > maxWeight){
|
||||||
maxWeight = curWeight;
|
maxWeight = curWeight;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user