Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
moab::SpatialLocatorTimes Class Reference

Statistics for spatial location. More...

#include <SpatialLocatorTimes.hpp>

Public Types

enum  {
  INTMED_INIT = 0 , INTMED_SEND , INTMED_SEARCH , SRC_SEND ,
  SRC_SEARCH , TARG_RETURN , TARG_STORE , NUM_STATS
}
 

Public Member Functions

 SpatialLocatorTimes ()
 
void reset ()
 
void output_header (bool print_endl=false) const
 
void output (bool print_head=false, bool print_endl=false) const
 

Public Attributes

double slTimes [NUM_STATS]
 

Detailed Description

Statistics for spatial location.

Class to accumulate statistics on performance of spatial location. This structure stores only local (single proc) statistics, but provides functions for accumulating max/min/avg time properties for performance reporting.

Similar to TreeStats, this class is very lightweight, with most variables publicly accessible.

Definition at line 26 of file SpatialLocatorTimes.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
INTMED_INIT 
INTMED_SEND 
INTMED_SEARCH 
SRC_SEND 
SRC_SEARCH 
TARG_RETURN 
TARG_STORE 
NUM_STATS 

Definition at line 67 of file SpatialLocatorTimes.hpp.

68  {
69  INTMED_INIT = 0, // time to compute intermediate partition, incl global bounding box
70  INTMED_SEND, // time to send search points from target to intermediate parts
71  INTMED_SEARCH, // time to find candidate src boxes for search points on intermidiate procs
72  SRC_SEND, // time to send search points to src procs
73  SRC_SEARCH, // time to search local box/elements on src procs
74  TARG_RETURN, // time to return point location data to target procs
75  TARG_STORE, // time to store point location into local SpatialLocator object
76  NUM_STATS // number of stats, useful for array sizing and terminating loops over stats
77  };

Constructor & Destructor Documentation

◆ SpatialLocatorTimes()

moab::SpatialLocatorTimes::SpatialLocatorTimes ( )
inline

Definition at line 31 of file SpatialLocatorTimes.hpp.

32  {
33  reset();
34  }

References reset().

Member Function Documentation

◆ output()

void moab::SpatialLocatorTimes::output ( bool  print_head = false,
bool  print_endl = false 
) const
inline

Definition at line 139 of file SpatialLocatorTimes.hpp.

140 {
141  if( print_head ) output_header( true );
142  for( int i = 0; i < NUM_STATS; i++ )
143  std::cout << slTimes[i] << " ";
144 
145  if( print_endl ) std::cout << std::endl;
146 }

References NUM_STATS, output_header(), and slTimes.

◆ output_header()

void moab::SpatialLocatorTimes::output_header ( bool  print_endl = false) const
inline

Definition at line 131 of file SpatialLocatorTimes.hpp.

132 {
133  std::cout << "Intmed_init Intmed_send Intmed_search src_send src_search targ_return targ_store";
134  if( print_endl ) std::cout << std::endl;
135 }

Referenced by output().

◆ reset()

void moab::SpatialLocatorTimes::reset ( )
inline

Definition at line 82 of file SpatialLocatorTimes.hpp.

83 {
84  for( int i = 0; i < NUM_STATS; i++ )
85  slTimes[i] = 0.0;
86 }

References NUM_STATS, and slTimes.

Referenced by SpatialLocatorTimes().

Member Data Documentation

◆ slTimes

double moab::SpatialLocatorTimes::slTimes[NUM_STATS]

Definition at line 79 of file SpatialLocatorTimes.hpp.

Referenced by moab::SpatialLocator::locate_points(), output(), and reset().


The documentation for this class was generated from the following file: