tensorflow/core/profiler/utils/step_intersection.cc
// Returns the timespan in this step (across all cores).
Returns the timespan in this step (across all cores).
Returns the timespan in this step ( across all cores ) .
Timespan StepTimespan(const PerCoreStepInfo& percore_stepinfo) {
  uint64 min_ps = kuint64max;
  uint64 max_ps = 0;
  for (const auto& core_stepinfo : percore_stepinfo.step_info_per_core()) {
    const auto& stepinfo = core_stepinfo.second;
    uint64 begin_ps = stepinfo.begin_ps();
    uint64 end_ps = begin_ps + stepinfo.duration_ps();
    min_ps = std::min(min_ps, begin_ps);
    max_ps = std::max(max_ps, end_ps);
  }
  return (min_ps < max_ps) ? Timespan::FromEndPoints(min_ps, max_ps)
                           : Timespan();
}
Timespan StepTimespan ( const PerCoreStepInfo & percore_stepinfo ) { uint64 min_ps = kuint64max ; uint64 max_ps = 0 ; for ( const auto & core_stepinfo : percore_stepinfo . step_info_per_core ( ) ) { const auto & stepinfo = core_stepinfo . second ; uint64 begin_ps = stepinfo . begin_ps ( ) ; uint64 end_ps = begin_ps + stepinfo . duration_ps ( ) ; min_ps = std :: min ( min_ps , begin_ps ) ; max_ps = std :: max ( max_ps , end_ps ) ; } return ( min_ps < max_ps ) ? Timespan :: FromEndPoints ( min_ps , max_ps ) : Timespan ( ) ; }
Returns the timespan in this step (across all cores).
Returns the timespan in this step ( across all cores ) .