Changeset 2046


Ignore:
Timestamp:
01/23/07 23:00:04 (17 years ago)
Author:
bittner
Message:

time termination

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/CombinedPreprocessor.cpp

    r2043 r2046  
    116116         
    117117        if (i - lastEvaluation >= mSamplesPerEvaluation) { 
     118          long time = TimeDiff(startTime, GetTime()); 
    118119          mViewCellsManager->PrintPvsStatistics(mStats); 
    119120          mStats << 
    120121                "#Pass\n" <<mPass<<endl<< 
    121                 "#Time\n" << TimeDiff(startTime, GetTime())<<endl<< 
     122                "#Time\n" << time <<endl<< 
    122123                "#TotalSamples\n" <<i<<endl<< 
    123124                "#RssSamples\n" <<totalVssRays<<endl; 
     
    127128                ComputeRenderError(); 
    128129          } 
    129            
     130 
     131          if (mTotalTime!= -1 && time/1000 > mTotalTime) 
     132                break; 
    130133        } 
    131134 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r2020 r2046  
    11781178                                 "10000000"); 
    11791179 
     1180  RegisterOption("Preprocessor.totalTime", 
     1181                                 optInt, 
     1182                                 "total_time=", 
     1183                                 "-1"); 
     1184 
    11801185  RegisterOption("Preprocessor.samplesPerPass", 
    11811186                                 optInt, 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2045 r2046  
    172172        Environment::GetSingleton()->GetIntValue("Preprocessor.samplesPerPass", mSamplesPerPass); 
    173173        Environment::GetSingleton()->GetIntValue("Preprocessor.totalSamples", mTotalSamples); 
     174        Environment::GetSingleton()->GetIntValue("Preprocessor.totalTime", mTotalTime); 
    174175        Environment::GetSingleton()->GetIntValue("Preprocessor.samplesPerEvaluation", 
    175176                                                                                         mSamplesPerEvaluation); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h

    r2017 r2046  
    243243   
    244244        int mTotalSamples; 
     245        int mTotalTime; 
    245246        int mSamplesPerPass; 
    246247        int mSamplesPerEvaluation; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp

    r2043 r2046  
    162162 
    163163        if (samples - lastEvaluation >= mSamplesPerEvaluation) { 
     164          long time = TimeDiff(startTime, GetTime()); 
    164165          mViewCellsManager->PrintPvsStatistics(mStats); 
    165166          mStats << 
    166167                "#Pass\n" <<mPass<<endl<< 
    167                 "#Time\n" << TimeDiff(startTime, GetTime())<<endl<< 
     168                "#Time\n" << time <<endl<< 
    168169                "#TotalSamples\n" <<samples<<endl<< 
    169170                "#RssSamples\n" <<rssSamples<<endl; 
    170171          lastEvaluation = samples; 
    171  
     172           
    172173          if (renderer) { 
    173174                ComputeRenderError(); 
    174175          } 
    175176           
     177          if (mTotalTime != -1 && time/1000 > mTotalTime) 
     178                break; 
    176179        } 
    177180  } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test_arena

    r2045 r2046  
    88VIEWCELLS=../data/Arena/viewcells-5000.xml.gz 
    99 
    10 PREFIX=../work/plots/osp-arena1-1e5 
     10PREFIX=../work/plots/osp-arena2-1e5 
    1111 
    1212# $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     
    1919 
    2020$COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     21-total_samples=500000000000 -total_time=12208 \ 
    2122-preprocessor_visibility_file=$PREFIX-r-reference.xml \ 
    2223-view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 
     
    2425 
    2526$COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     27 -total_samples=500000000000 -total_time=12208 \ 
    2628 -rss_distributions=direction -view_cells_filter_max_size=1 \ 
    2729 -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \ 
Note: See TracChangeset for help on using the changeset viewer.