MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / stop

Method stop

highs/lp_data/HighsInterface.cpp:4413–4436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4411}
4412
4413void HighsProfiling::stop(const HighsInt profiling_clock) {
4414 assert(profiling_clock >= 0);
4415 if (profiling_clock >= this->num_profiling_clock_) return;
4416 // For a sub-MIP, don't start the clock for anything but a
4417 // sub-solver
4418 if (this->isSubMip() && profiling_clock >= kToSubSolver) return;
4419 HighsInt thread = this->myThread();
4420 HighsProfilingRecord* thread_record = this->getHighsProfilingRecord();
4421 double time_stop = timer->read();
4422 double time_start = thread_record->start_time[profiling_clock];
4423 const bool clock_running = std::signbit(time_start);
4424 if (!clock_running) {
4425 // Check for stopping a clock that's currently stopped
4426 printf(
4427 "HighsProfiling: clock not running for thread %d when stopping clock "
4428 "%d (%s) \n",
4429 int(thread), int(profiling_clock), this->name[profiling_clock].c_str());
4430 assert(clock_running);
4431 } else {
4432 thread_record->num_call[profiling_clock]++;
4433 thread_record->run_time[profiling_clock] += (time_stop + time_start);
4434 }
4435 thread_record->start_time[profiling_clock] = time_stop;
4436}
4437
4438double HighsProfiling::read(const HighsInt profiling_clock,
4439 const HighsInt record_type) {

Callers 11

hipdlpTimerStopMethod · 0.45
simplexTimerStopMethod · 0.45
returnFromSolveLpSimplexFunction · 0.45
runProbingMethod · 0.45
enumerateSolutionsMethod · 0.45
calledOptimizeModelMethod · 0.45
callSolveQpMethod · 0.45
callSolveMipMethod · 0.45
callRunPostsolveMethod · 0.45
returnFromHighsMethod · 0.45
solveLpFunction · 0.45

Calls 5

isSubMipMethod · 0.95
myThreadMethod · 0.95
c_strMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected