queso-0.53.0
Functions | Variables
perf.cpp File Reference
#include <ANN/ANN.h>
#include <ANN/ANNperf.h>
Include dependency graph for perf.cpp:

Go to the source code of this file.

Functions

DLL_API void annResetStats (int data_size)
 
DLL_API void annResetCounts ()
 
DLL_API void annUpdateStats ()
 
void print_one_stat (const char *title, ANNsampStat s, double div)
 
DLL_API void annPrintStats (ANNbool validate)
 

Variables

int ann_Ndata_pts = 0
 
int ann_Nvisit_lfs = 0
 
int ann_Nvisit_spl = 0
 
int ann_Nvisit_shr = 0
 
int ann_Nvisit_pts = 0
 
int ann_Ncoord_hts = 0
 
int ann_Nfloat_ops = 0
 
ANNsampStat ann_visit_lfs
 
ANNsampStat ann_visit_spl
 
ANNsampStat ann_visit_shr
 
ANNsampStat ann_visit_nds
 
ANNsampStat ann_visit_pts
 
ANNsampStat ann_coord_hts
 
ANNsampStat ann_float_ops
 
ANNsampStat ann_average_err
 
ANNsampStat ann_rank_err
 

Function Documentation

DLL_API void annPrintStats ( ANNbool  validate)

Definition at line 116 of file perf.cpp.

References ann_average_err, ann_coord_hts, ann_float_ops, ann_Ndata_pts, ann_rank_err, ann_visit_lfs, ann_visit_nds, ann_visit_pts, ann_visit_shr, ann_visit_spl, and print_one_stat().

Referenced by main().

118 {
119  cout.precision(4); // set floating precision
120  cout << " (Performance stats: "
121  << " [ mean : stddev ]< min , max >\n";
122  print_one_stat(" leaf_nodes ", ann_visit_lfs, 1);
123  print_one_stat(" splitting_nodes ", ann_visit_spl, 1);
124  print_one_stat(" shrinking_nodes ", ann_visit_shr, 1);
125  print_one_stat(" total_nodes ", ann_visit_nds, 1);
126  print_one_stat(" points_visited ", ann_visit_pts, 1);
127  print_one_stat(" coord_hits/pt ", ann_coord_hts, ann_Ndata_pts);
128  print_one_stat(" floating_ops_(K) ", ann_float_ops, 1000);
129  if (validate) {
130  print_one_stat(" average_error ", ann_average_err, 1);
131  print_one_stat(" rank_error ", ann_rank_err, 1);
132  }
133  cout.precision(0); // restore the default
134  cout << " )\n";
135  cout.flush();
136 }
ANNsampStat ann_visit_nds
Definition: perf.cpp:59
ANNsampStat ann_visit_spl
Definition: perf.cpp:57
DLL_API ANNsampStat ann_average_err
Definition: perf.cpp:64
ANNbool validate
Definition: ann_test.cpp:489
void print_one_stat(const char *title, ANNsampStat s, double div)
Definition: perf.cpp:107
int ann_Ndata_pts
Definition: perf.cpp:49
ANNsampStat ann_visit_pts
Definition: perf.cpp:60
ANNsampStat ann_visit_lfs
Definition: perf.cpp:56
ANNsampStat ann_coord_hts
Definition: perf.cpp:61
ANNsampStat ann_float_ops
Definition: perf.cpp:62
DLL_API ANNsampStat ann_rank_err
Definition: perf.cpp:65
ANNsampStat ann_visit_shr
Definition: perf.cpp:58
DLL_API void annResetCounts ( )

Definition at line 85 of file perf.cpp.

References ann_Ncoord_hts, ann_Nfloat_ops, ann_Nvisit_lfs, ann_Nvisit_pts, ann_Nvisit_shr, and ann_Nvisit_spl.

Referenced by main().

86 {
87  ann_Nvisit_lfs = 0;
88  ann_Nvisit_spl = 0;
89  ann_Nvisit_shr = 0;
90  ann_Nvisit_pts = 0;
91  ann_Ncoord_hts = 0;
92  ann_Nfloat_ops = 0;
93 }
int ann_Ncoord_hts
Definition: perf.cpp:54
int ann_Nfloat_ops
Definition: perf.cpp:55
int ann_Nvisit_pts
Definition: perf.cpp:53
int ann_Nvisit_shr
Definition: perf.cpp:52
int ann_Nvisit_spl
Definition: perf.cpp:51
int ann_Nvisit_lfs
Definition: perf.cpp:50
DLL_API void annResetStats ( int  data_size)

Definition at line 71 of file perf.cpp.

References ann_average_err, ann_coord_hts, ann_float_ops, ann_Ndata_pts, ann_rank_err, ann_visit_lfs, ann_visit_nds, ann_visit_pts, ann_visit_shr, ann_visit_spl, data_size, and ANNsampStat::reset().

Referenced by main().

72 {
83 }
ANNsampStat ann_visit_nds
Definition: perf.cpp:59
ANNsampStat ann_visit_spl
Definition: perf.cpp:57
DLL_API ANNsampStat ann_average_err
Definition: perf.cpp:64
int data_size
Definition: ann_test.cpp:473
int ann_Ndata_pts
Definition: perf.cpp:49
void reset()
Definition: ANNperf.h:91
ANNsampStat ann_visit_pts
Definition: perf.cpp:60
ANNsampStat ann_visit_lfs
Definition: perf.cpp:56
ANNsampStat ann_coord_hts
Definition: perf.cpp:61
ANNsampStat ann_float_ops
Definition: perf.cpp:62
DLL_API ANNsampStat ann_rank_err
Definition: perf.cpp:65
ANNsampStat ann_visit_shr
Definition: perf.cpp:58
DLL_API void annUpdateStats ( )

Definition at line 95 of file perf.cpp.

References ann_coord_hts, ann_float_ops, ann_Ncoord_hts, ann_Nfloat_ops, ann_Nvisit_lfs, ann_Nvisit_pts, ann_Nvisit_shr, ann_Nvisit_spl, ann_visit_lfs, ann_visit_nds, ann_visit_pts, ann_visit_shr, and ann_visit_spl.

Referenced by main().

96 {
104 }
ANNsampStat ann_visit_nds
Definition: perf.cpp:59
ANNsampStat ann_visit_spl
Definition: perf.cpp:57
int ann_Ncoord_hts
Definition: perf.cpp:54
int ann_Nfloat_ops
Definition: perf.cpp:55
int ann_Nvisit_pts
Definition: perf.cpp:53
ANNsampStat ann_visit_pts
Definition: perf.cpp:60
ANNsampStat ann_visit_lfs
Definition: perf.cpp:56
int ann_Nvisit_shr
Definition: perf.cpp:52
int ann_Nvisit_spl
Definition: perf.cpp:51
ANNsampStat ann_coord_hts
Definition: perf.cpp:61
ANNsampStat ann_float_ops
Definition: perf.cpp:62
int ann_Nvisit_lfs
Definition: perf.cpp:50
ANNsampStat ann_visit_shr
Definition: perf.cpp:58
void print_one_stat ( const char *  title,
ANNsampStat  s,
double  div 
)

Definition at line 107 of file perf.cpp.

References ANNsampStat::max(), ANNsampStat::mean(), ANNsampStat::min(), and ANNsampStat::stdDev().

Referenced by annPrintStats().

108 {
109  cout << title << "= [ ";
110  cout.width(9); cout << s.mean()/div << " : ";
111  cout.width(9); cout << s.stdDev()/div << " ]<";
112  cout.width(9); cout << s.min()/div << " , ";
113  cout.width(9); cout << s.max()/div << " >\n";
114 }
double stdDev()
Definition: ANNperf.h:113
double max()
Definition: ANNperf.h:116
double min()
Definition: ANNperf.h:115
double mean()
Definition: ANNperf.h:110

Variable Documentation

ANNsampStat ann_average_err

Definition at line 64 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and doValidation().

ANNsampStat ann_coord_hts

Definition at line 61 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().

ANNsampStat ann_float_ops

Definition at line 62 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().

int ann_Ncoord_hts = 0

Definition at line 54 of file perf.cpp.

Referenced by annResetCounts(), and annUpdateStats().

int ann_Ndata_pts = 0

Definition at line 49 of file perf.cpp.

Referenced by annPrintStats(), and annResetStats().

int ann_Nfloat_ops = 0

Definition at line 55 of file perf.cpp.

Referenced by annResetCounts(), and annUpdateStats().

int ann_Nvisit_lfs = 0

Definition at line 50 of file perf.cpp.

Referenced by annResetCounts(), and annUpdateStats().

int ann_Nvisit_pts = 0

Definition at line 53 of file perf.cpp.

Referenced by annResetCounts(), and annUpdateStats().

int ann_Nvisit_shr = 0

Definition at line 52 of file perf.cpp.

Referenced by annResetCounts(), and annUpdateStats().

int ann_Nvisit_spl = 0

Definition at line 51 of file perf.cpp.

Referenced by annResetCounts(), and annUpdateStats().

ANNsampStat ann_rank_err

Definition at line 65 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and doValidation().

ANNsampStat ann_visit_lfs

Definition at line 56 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().

ANNsampStat ann_visit_nds

Definition at line 59 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().

ANNsampStat ann_visit_pts

Definition at line 60 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().

ANNsampStat ann_visit_shr

Definition at line 58 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().

ANNsampStat ann_visit_spl

Definition at line 57 of file perf.cpp.

Referenced by annPrintStats(), annResetStats(), and annUpdateStats().


Generated on Thu Jun 11 2015 13:52:33 for queso-0.53.0 by  doxygen 1.8.5