Commit f0683a0c authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Fix issue with naming sections

parent 99eed3e6
......@@ -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.
......
......@@ -86,7 +86,7 @@ namespace ITA
bool CFilterNetwork::evaluateNetwork ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
bool audible = false;
if ( m_eUsageMode == IAudibilityFilter::UsageMode::filter )
......
......@@ -40,7 +40,7 @@ namespace ITA
bool CPerceptiveRotationFilter::changeIsAudible ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
// condition the arguments for the data as we only have half the azimuth range
azimuth = azimuth % 180;
......
......@@ -43,7 +43,7 @@ namespace ITA
bool CRateFilter::changeIsAudible ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
checkUpdateTimestamp ( previousState, newUpdate );
const auto dDeltaTime = newUpdate.getTimeStamp ( ) - previousState.getTimeStamp ( );
......
......@@ -41,7 +41,7 @@ namespace ITA
bool CReverberationRadiusFilter::changeIsAudible ( const CUpdateScene& previousState,
const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
checkUpdateTimestamp ( previousState, newUpdate );
const auto newSourceReceiverPair = newUpdate.getSourceReceiverPair ( );
......
......@@ -48,7 +48,7 @@ namespace ITA
bool CRotationFilter::changeIsAudible ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
const auto previousSourceReceiverPair = previousState.getSourceReceiverPair ( );
const auto newSourceReceiverPair = newUpdate.getSourceReceiverPair ( );
......
......@@ -39,7 +39,7 @@ namespace ITA
bool CTranslationFilter::changeIsAudible ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
checkUpdateTimestamp ( previousState, newUpdate );
const auto previousSourceReceiverPair = previousState.getSourceReceiverPair ( );
......
......@@ -58,7 +58,7 @@ namespace ITA
bool CZoneFilter::changeIsAudible ( const CUpdateScene& previousState, const CUpdateScene& newUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
checkUpdateTimestamp ( previousState, newUpdate );
auto source = newUpdate.getSourceReceiverPair ( ).source;
......
......@@ -4,7 +4,7 @@
void ITA::simulation_scheduler::CReplacementFilter::filterReplace ( std::list<std::unique_ptr<IUpdateMessage>>& updateList )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
// 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_SECTION ( );
PROFILER_FUNCTION ( );
// 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 )
......
......@@ -101,7 +101,7 @@ namespace ITA
void CMasterSimulationController::postUpdate ( std::unique_ptr<IUpdateMessage> pUpdateMessage )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
// Handle the stop of the loop
if ( m_bStopIndicated )
......
......@@ -47,7 +47,7 @@ namespace ITA
std::unique_ptr<CSimulationTask> IRavenWorkerInterface::createTaskFromUpdate (
std::unique_ptr<CUpdateScene> pUpdate ) const
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
if ( pResult->vcspResult.size ( ) != 1 )
{
......
......@@ -69,7 +69,7 @@ namespace ITA
void CSimulator::loadScene ( const std::string& sFileName )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
if ( sFileName.empty ( ) )
return;
......@@ -203,7 +203,7 @@ namespace ITA
void CSimulator::compute ( CSimulationTask* pTask, CRavenSimulationResult* pResult )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
assert ( pTask );
......@@ -264,7 +264,7 @@ namespace ITA
void CSimulator::init ( )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
RAVENSIMULATOR_REQUIRE_SCENE;
assert ( !viReceiverIDs.empty ( ) && ( viReceiverIDs.size ( ) == vpResult.size ( ) ) );
......
......@@ -73,7 +73,7 @@ namespace ITA
void CWorkerThread::postUpdate ( std::unique_ptr<CUpdateScene> pUpdate )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
if ( m_bStopIndicated )
{
......
......@@ -103,7 +103,7 @@ namespace ITA
void CScheduler::postUpdate ( std::unique_ptr<IUpdateMessage> pUpdateMessage )
{
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
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_SECTION ( );
PROFILER_FUNCTION ( );
PROFILER_VALUE ( "Processed Update Configs", pUpdate->getID ( ) );
switch ( pUpdate->getType ( ) )
......@@ -219,7 +219,7 @@ namespace ITA
m_evTriggerLoop.WaitForEvent ( true );
m_evTriggerLoop.ResetThisEvent ( );
PROFILER_SECTION ( );
PROFILER_FUNCTION ( );
if ( m_bResetIndicated )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment