tensorflow/core/profiler/utils/step_intersection.cc
// Computes the similarity between the given two steps. The closer their
// timespans are, the larger is the similarity.
Computes the similarity between the given two steps. The closer their
timespans are, the larger is the similarity.
Computes the similarity between the given two steps . The closer their timespans are the larger is the similarity .
double StepSimilarity(const PerCoreStepInfo& subordinate_step,
                      const PerCoreStepInfo& chief_step) {
  Timespan subordinate_timespan = StepTimespan(subordinate_step);
  Timespan chief_timespan = StepTimespan(chief_step);
  return chief_timespan.OverlappedDurationPs(subordinate_timespan);
}
double StepSimilarity ( const PerCoreStepInfo & subordinate_step , const PerCoreStepInfo & chief_step ) { Timespan subordinate_timespan = StepTimespan ( subordinate_step ) ; Timespan chief_timespan = StepTimespan ( chief_step ) ; return chief_timespan . OverlappedDurationPs ( subordinate_timespan ) ; }
Computes the similarity between the given two steps.
Computes the similarity between the given two steps .