32 m_Time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
47 long workPackageSize = 0;
50 long now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
56 std::cout <<
"<filter-progress-text progress='" << ((double)(now -
m_Time) /
m_SimulationTime) <<
"'></filter-progress-text>" << std::endl;
82 return workPackageSize;
91 const MonteCarloThreadHandler::Pointer rightHandSide,
double ,
bool verbose)
93 if (rightHandSide->GetNumberPhotonsRemaining() != leftHandSide->GetNumberPhotonsRemaining())
95 MITK_INFO(verbose) <<
"Number of Photons remaining wasnt equal: lhs=" <<
96 leftHandSide->GetNumberPhotonsRemaining() <<
" rhs=" << rightHandSide->GetNumberPhotonsRemaining();
100 if (rightHandSide->GetNumberPhotonsToSimulate() != leftHandSide->GetNumberPhotonsToSimulate())
102 MITK_INFO(verbose) <<
"Number of Photons to simulate wasnt equal: lhs=" <<
103 leftHandSide->GetNumberPhotonsToSimulate() <<
" rhs=" << rightHandSide->GetNumberPhotonsToSimulate();
107 if (rightHandSide->GetWorkPackageSize() != leftHandSide->GetWorkPackageSize())
109 MITK_INFO(verbose) <<
"WorkPackageSize wasnt equal: lhs=" <<
110 leftHandSide->GetWorkPackageSize() <<
" rhs=" << rightHandSide->GetWorkPackageSize();
114 if (rightHandSide->GetSimulationTime() != leftHandSide->GetSimulationTime())
116 MITK_INFO(verbose) <<
"Simulationtime wasnt equal: lhs=" <<
117 leftHandSide->GetSimulationTime() <<
" rhs=" << rightHandSide->GetSimulationTime();
121 if (rightHandSide->GetSimulateOnTimeBasis() != leftHandSide->GetSimulateOnTimeBasis())
123 MITK_INFO(verbose) <<
"simulation on time basis wasnt equal: lhs=" <<
124 leftHandSide->GetSimulateOnTimeBasis() <<
" rhs=" << rightHandSide->GetSimulateOnTimeBasis();
128 if (rightHandSide->GetVerbose() != leftHandSide->GetVerbose())
130 MITK_INFO(verbose) <<
"Verbose wasnt equal: lhs=" <<
131 leftHandSide->GetVerbose() <<
" rhs=" << rightHandSide->GetVerbose();
std::mutex m_MutexRemainingPhotonsManipulation
void SetPackageSize(long sizeInMilliseconsOrNumberOfPhotons)
long m_NumberPhotonsToSimulate
MITKPHOTOACOUSTICSLIB_EXPORT bool Equal(const MonteCarloThreadHandler::Pointer leftHandSide, const MonteCarloThreadHandler::Pointer rightHandSide, double eps, bool verbose)
Equal A function comparing two thread handlers for beeing equal.
long GetNextWorkPackage()
bool m_SimulateOnTimeBasis
~MonteCarloThreadHandler() override
long m_NumberPhotonsRemaining
MonteCarloThreadHandler(long timInMilliseconsOrNumberofPhotons, bool simulateOnTimeBasis)
PhotoacousticThreadhandler.
The PhotoacousticStatefulObject class Designed for inheritence. Provides a state member variable and ...