Changeset 725 for GTP/trunk/Lib/Vis/shared/EvalStats
- Timestamp:
- 04/04/06 23:49:52 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
r720 r725 110 110 } 111 111 112 // Computes number of view cells to reach the same render cost 113 int ComputeNoViewCells(const StatsContainer &firstStats, 114 const StatsContainer ¤tStats) 112 #if 0 113 void EvalNumViewCells(const int i, 114 const StatsContainer &firstStats, 115 const StatsContainer ¤tStats, 116 vector<float> &ratios) 115 117 { 116 118 const int n = min((int)firstStats.size(), (int)currentStats.size()); 117 119 118 const float renderCost = (float)currentStats[n - 1].mRenderCost;120 StatsContainer::const_iterator it, it_end = currentStats.end(); 119 121 120 122 int i = 0; 121 while ((i ++ < (int)firstStats.size()) && (renderCost > (int)firstStats[i].mRenderCost)); 122 123 124 for (it = currentStats.begin(); it != it_end; ++ it) 125 { 126 const float renderCost = (*it).mRenderCost; 127 128 // find equivalent render cost in second stats container 129 while ((i < n) && (renderCost < (int)firstStats[i ++].mRenderCost)); 130 131 // lower bound 132 int j = max (0, i - 1); 133 } 134 123 135 return i; 124 136 } 125 137 #endif 126 138 127 139 int _tmain(int argc, _TCHAR* argv[]) … … 194 206 ComputeStats(statsOut, firstStats[i], (*it)[i], i); 195 207 } 196 197 int vc = ComputeNoViewCells(firstStats, *it);208 #if 0 209 const int vc = ComputeNoViewCells(firstStats, *it); 198 210 cout << "need " << vc << " view cells to reach rendercost of method " << i << " with " << n << " view cells" << endl; 199 211 #endif 200 212 statsOut.close(); 201 213
Note: See TracChangeset
for help on using the changeset viewer.