Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITASimulationScheduler
Commits
f0683a0c
Commit
f0683a0c
authored
Jul 23, 2020
by
Pascal Palenda
Browse files
Fix issue with naming sections
parent
99eed3e6
Changes
14
Hide whitespace changes
Inline
Side-by-side
include/ITA/simulation_scheduler/profiler/profiler.h
View file @
f0683a0c
...
...
@@ -48,8 +48,7 @@ namespace ITA
///
/// \brief Start a section with the name "Full".
///
#define PROFILER_SECTION( ) profiler::CSection PROFILER_UNIQUE_SECTION(__LINE__);\
profiler::startSection(PROFILER_UNIQUE_SECTION(__LINE__), "Full", __FUNCTION__, __FILE__ );
#define PROFILER_FUNCTION( ) PROFILER_SECTION( "Full" );
///
/// \brief End the last opened section in this thread.
...
...
src/ITA/simulation_scheduler/audibility_filter/filter_network.cpp
View file @
f0683a0c
...
...
@@ -86,7 +86,7 @@ namespace ITA
bool
CFilterNetwork
::
evaluateNetwork
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
if
(
m_pNetworkTree
)
return
m_pNetworkTree
->
evaluate
(
previousState
,
newUpdate
);
else
...
...
@@ -105,7 +105,7 @@ namespace ITA
bool
CFilterNetwork
::
NetworkTreeNode
::
evaluate
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
bool
audible
=
false
;
if
(
m_eUsageMode
==
IAudibilityFilter
::
UsageMode
::
filter
)
...
...
src/ITA/simulation_scheduler/audibility_filter/perceptive_rotation_filter.cpp
View file @
f0683a0c
...
...
@@ -40,7 +40,7 @@ namespace ITA
bool
CPerceptiveRotationFilter
::
changeIsAudible
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
checkUpdateTimestamp
(
previousState
,
newUpdate
);
const
auto
previousSourceReceiverPair
=
previousState
.
getSourceReceiverPair
(
);
...
...
@@ -87,7 +87,7 @@ namespace ITA
std
::
pair
<
double
,
double
>
CPerceptiveRotationFilter
::
findNearest
(
int
azimuth
,
int
elevation
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
// condition the arguments for the data as we only have half the azimuth range
azimuth
=
azimuth
%
180
;
...
...
src/ITA/simulation_scheduler/audibility_filter/rate_filter.cpp
View file @
f0683a0c
...
...
@@ -43,7 +43,7 @@ namespace ITA
bool
CRateFilter
::
changeIsAudible
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
checkUpdateTimestamp
(
previousState
,
newUpdate
);
const
auto
dDeltaTime
=
newUpdate
.
getTimeStamp
(
)
-
previousState
.
getTimeStamp
(
);
...
...
src/ITA/simulation_scheduler/audibility_filter/reverberation_radius_filter.cpp
View file @
f0683a0c
...
...
@@ -41,7 +41,7 @@ namespace ITA
bool
CReverberationRadiusFilter
::
changeIsAudible
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
checkUpdateTimestamp
(
previousState
,
newUpdate
);
const
auto
newSourceReceiverPair
=
newUpdate
.
getSourceReceiverPair
(
);
...
...
src/ITA/simulation_scheduler/audibility_filter/rotation_filter.cpp
View file @
f0683a0c
...
...
@@ -48,7 +48,7 @@ namespace ITA
bool
CRotationFilter
::
changeIsAudible
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
checkUpdateTimestamp
(
previousState
,
newUpdate
);
if
(
m_eRotationMode
==
RotationModes
::
absolute
)
...
...
@@ -73,7 +73,7 @@ namespace ITA
bool
CRotationFilter
::
checkRelativeRotation
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
const
auto
previousSourceReceiverPair
=
previousState
.
getSourceReceiverPair
(
);
const
auto
newSourceReceiverPair
=
newUpdate
.
getSourceReceiverPair
(
);
...
...
@@ -124,7 +124,7 @@ namespace ITA
bool
CRotationFilter
::
checkAbsoluteRotation
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
const
auto
previousSourceReceiverPair
=
previousState
.
getSourceReceiverPair
(
);
const
auto
newSourceReceiverPair
=
newUpdate
.
getSourceReceiverPair
(
);
...
...
src/ITA/simulation_scheduler/audibility_filter/translation_filter.cpp
View file @
f0683a0c
...
...
@@ -39,7 +39,7 @@ namespace ITA
bool
CTranslationFilter
::
changeIsAudible
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
checkUpdateTimestamp
(
previousState
,
newUpdate
);
const
auto
previousSourceReceiverPair
=
previousState
.
getSourceReceiverPair
(
);
...
...
src/ITA/simulation_scheduler/audibility_filter/zone_filter.cpp
View file @
f0683a0c
...
...
@@ -58,7 +58,7 @@ namespace ITA
bool
CZoneFilter
::
changeIsAudible
(
const
CUpdateScene
&
previousState
,
const
CUpdateScene
&
newUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
checkUpdateTimestamp
(
previousState
,
newUpdate
);
auto
source
=
newUpdate
.
getSourceReceiverPair
(
).
source
;
...
...
src/ITA/simulation_scheduler/replacement_filter.cpp
View file @
f0683a0c
...
...
@@ -4,7 +4,7 @@
void
ITA
::
simulation_scheduler
::
CReplacementFilter
::
filterReplace
(
std
::
list
<
std
::
unique_ptr
<
IUpdateMessage
>>&
updateList
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
// Revers traversal of the updates, as the oldest updates are at the front,
// if a newer update removed them, the iterators are still valid.
for
(
auto
updateIter
=
updateList
.
rbegin
(
);
updateIter
!=
updateList
.
rend
(
);
++
updateIter
)
...
...
@@ -33,7 +33,7 @@ void ITA::simulation_scheduler::CReplacementFilter::filterReplace ( std::list<st
void
ITA
::
simulation_scheduler
::
CReplacementFilter
::
filterReplace
(
std
::
list
<
std
::
unique_ptr
<
CUpdateScene
>>&
updateList
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
// Revers traversal of the updates, as the oldest updates are at the front,
// if a newer update removed them, the iterators are still valid.
for
(
auto
updateIter
=
updateList
.
rbegin
(
);
updateIter
!=
updateList
.
rend
(
);
++
updateIter
)
...
...
src/ITA/simulation_scheduler/room_acoustics/master_simulation_controller.cpp
View file @
f0683a0c
...
...
@@ -101,7 +101,7 @@ namespace ITA
void
CMasterSimulationController
::
postUpdate
(
std
::
unique_ptr
<
IUpdateMessage
>
pUpdateMessage
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
PROFILER_VALUE
(
"Enqueued Update to Master Simulation Controller"
,
pUpdateMessage
->
getID
(
)
);
m_qUpdateQueue
.
push
(
std
::
move
(
pUpdateMessage
)
);
m_evTriggerLoop
.
SignalEvent
(
);
...
...
@@ -133,7 +133,7 @@ namespace ITA
m_evTriggerLoop
.
WaitForEvent
(
true
);
m_evTriggerLoop
.
ResetThisEvent
(
);
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
// Handle the stop of the loop
if
(
m_bStopIndicated
)
...
...
src/ITA/simulation_scheduler/room_acoustics/raven/raven_worker_interface.cpp
View file @
f0683a0c
...
...
@@ -47,7 +47,7 @@ namespace ITA
std
::
unique_ptr
<
CSimulationTask
>
IRavenWorkerInterface
::
createTaskFromUpdate
(
std
::
unique_ptr
<
CUpdateScene
>
pUpdate
)
const
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
auto
pTask
=
std
::
make_unique
<
CSimulationTask
>
(
);
pTask
->
eSimulationType
=
m_eFieldOfDuty
;
...
...
@@ -145,7 +145,7 @@ namespace ITA
std
::
unique_ptr
<
CRIRSimulationResult
>
IRavenWorkerInterface
::
convertSimulationResult
(
std
::
unique_ptr
<
CRavenSimulationResult
>
pResult
,
CSimulationTask
*
pTask
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
if
(
pResult
->
vcspResult
.
size
(
)
!=
1
)
{
...
...
src/ITA/simulation_scheduler/room_acoustics/raven/simulator.cpp
View file @
f0683a0c
...
...
@@ -69,7 +69,7 @@ namespace ITA
void
CSimulator
::
loadScene
(
const
std
::
string
&
sFileName
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
if
(
sFileName
.
empty
(
)
)
return
;
...
...
@@ -203,7 +203,7 @@ namespace ITA
void
CSimulator
::
compute
(
CSimulationTask
*
pTask
,
CRavenSimulationResult
*
pResult
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
assert
(
pTask
);
...
...
@@ -264,7 +264,7 @@ namespace ITA
void
CSimulator
::
init
(
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
m_pRavenMasterController
->
clearCurrentConfig
(
NET_MODE
,
true
);
m_pRavenMasterController
->
initLODEngine
(
);
...
...
@@ -371,7 +371,7 @@ namespace ITA
void
CSimulator
::
computeDirectSoundAudibility
(
std
::
vector
<
std
::
unique_ptr
<
CRavenSimulationResult
::
ComplexSimulationSoundPath
>
>&
vpResult
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_FILTER_ENGINE
;
const
int
iInitialFilterSize
=
1
;
...
...
@@ -412,7 +412,7 @@ namespace ITA
void
CSimulator
::
computeDirectSoundAudibility
(
const
int
iSourceID
,
const
int
iReceiverID
,
bool
&
bAudibility
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_SCENE
;
std
::
map
<
int
,
int
>::
iterator
it
=
m_mapSources
.
find
(
iSourceID
);
...
...
@@ -446,7 +446,7 @@ namespace ITA
void
CSimulator
::
computeDirectSound
(
std
::
vector
<
std
::
unique_ptr
<
CRavenSimulationResult
::
ComplexSimulationSoundPath
>
>&
vpResult
,
const
int
iResultMixingMode
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_FILTER_ENGINE
;
t_simulation_config_Simulation
&
scs
(
m_pRavenMasterController
->
m_currentConfig_Simulation
);
...
...
@@ -516,7 +516,7 @@ namespace ITA
void
CSimulator
::
computeDirectSound
(
const
int
iSourceID
,
const
int
iReceiverID
,
ITASampleFrame
&
oFilter
,
const
int
iResultMixingMode
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_SCENE
;
std
::
map
<
int
,
int
>::
iterator
it
=
m_mapSources
.
find
(
iSourceID
);
...
...
@@ -587,7 +587,7 @@ namespace ITA
void
CSimulator
::
computeImageSources
(
std
::
vector
<
std
::
unique_ptr
<
CRavenSimulationResult
::
ComplexSimulationSoundPath
>
>&
vpResult
,
const
int
iResultMixingMode
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_FILTER_ENGINE
;
const
double
dSampleRate
=
m_pRavenMasterController
->
m_currentConfig_Simulation
.
samplingFrequency
;
...
...
@@ -655,7 +655,7 @@ namespace ITA
void
CSimulator
::
computeImageSources
(
const
int
iSourceID
,
const
int
iReceiverID
,
ITASampleFrame
&
oFilter
,
const
int
iResultMixingMode
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_SCENE
;
std
::
map
<
int
,
int
>::
iterator
it
=
m_mapSources
.
find
(
iSourceID
);
...
...
@@ -726,7 +726,7 @@ namespace ITA
void
CSimulator
::
computeRayTracing
(
std
::
vector
<
std
::
unique_ptr
<
CRavenSimulationResult
::
ComplexSimulationSoundPath
>
>&
vpResult
,
const
int
iResultMixingMode
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_FILTER_ENGINE
;
const
double
dSampleRate
=
m_pRavenMasterController
->
m_currentConfig_Simulation
.
samplingFrequency
;
...
...
@@ -807,7 +807,7 @@ namespace ITA
void
CSimulator
::
computeRayTracing
(
const
int
iSourceID
,
const
std
::
vector
<
int
>&
viReceiverIDs
,
std
::
vector
<
ITASampleFrame
*>&
vpResult
,
const
int
iResultMixingMode
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
RAVENSIMULATOR_REQUIRE_SCENE
;
assert
(
!
viReceiverIDs
.
empty
(
)
&&
(
viReceiverIDs
.
size
(
)
==
vpResult
.
size
(
)
)
);
...
...
src/ITA/simulation_scheduler/room_acoustics/raven/worker_thread.cpp
View file @
f0683a0c
...
...
@@ -73,7 +73,7 @@ namespace ITA
void
CWorkerThread
::
postUpdate
(
std
::
unique_ptr
<
CUpdateScene
>
pUpdate
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
PROFILER_VALUE
(
"Update to Worker"
,
pUpdate
->
getID
(
)
);
auto
pTask
=
createTaskFromUpdate
(
std
::
move
(
pUpdate
)
);
...
...
@@ -149,7 +149,7 @@ namespace ITA
m_evTriggerLoop
.
WaitForEvent
(
true
);
m_evTriggerLoop
.
ResetThisEvent
(
);
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
if
(
m_bStopIndicated
)
{
...
...
src/ITA/simulation_scheduler/scheduler.cpp
View file @
f0683a0c
...
...
@@ -103,7 +103,7 @@ namespace ITA
void
CScheduler
::
postUpdate
(
std
::
unique_ptr
<
IUpdateMessage
>
pUpdateMessage
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
PROFILER_VALUE
(
"Enqueued Update to "
+
m_sThreadName
,
pUpdateMessage
->
getID
(
)
);
m_qUpdateQueue
.
push
(
std
::
move
(
pUpdateMessage
)
);
m_evTriggerLoop
.
SignalEvent
(
);
...
...
@@ -145,7 +145,7 @@ namespace ITA
void
CScheduler
::
processUpdateScene
(
std
::
unique_ptr
<
CUpdateScene
>
pUpdate
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
PROFILER_VALUE
(
"Processed Update Scenes"
,
pUpdate
->
getID
(
)
);
auto
bAudible
=
true
;
...
...
@@ -170,7 +170,7 @@ namespace ITA
void
CScheduler
::
processUpdateConfig
(
std
::
unique_ptr
<
CUpdateConfig
>
pUpdate
)
{
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
PROFILER_VALUE
(
"Processed Update Configs"
,
pUpdate
->
getID
(
)
);
switch
(
pUpdate
->
getType
(
)
)
...
...
@@ -219,7 +219,7 @@ namespace ITA
m_evTriggerLoop
.
WaitForEvent
(
true
);
m_evTriggerLoop
.
ResetThisEvent
(
);
PROFILER_
SE
CTION
(
);
PROFILER_
FUN
CTION
(
);
if
(
m_bResetIndicated
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment