@@ -34,7 +34,7 @@ extern boost::exception_ptr rev_error;
3434extern boost::exception_ptr cmb_error;
3535extern boost::exception_ptr prep_error;
3636
37- bool combineAdjustmentExceptionThrown (const vector<boost::exception_ptr>& cmb_errors_)
37+ bool combineAdjustmentExceptionThrown (const std:: vector<boost::exception_ptr>& cmb_errors_)
3838{
3939 // got a forward or reverse exception, or
4040 // have any of the other combination adjustments failed?
@@ -58,7 +58,7 @@ bool combineAdjustmentExceptionThrown(const vector<boost::exception_ptr>& cmb_er
5858 return false ;
5959}
6060
61- bool prepareAdjustmentExceptionThrown (const vector<boost::exception_ptr>& prep_errors_)
61+ bool prepareAdjustmentExceptionThrown (const std:: vector<boost::exception_ptr>& prep_errors_)
6262{
6363 // have any of the other combination adjustments failed?
6464 UINT32 err_size (static_cast <UINT32>(prep_errors_.size ()));
@@ -94,19 +94,19 @@ void dna_adjust::AdjustPhasedMultiThread()
9494{
9595 initialiseIteration ();
9696
97- string corr_msg;
98- ostringstream ss;
97+ std:: string corr_msg;
98+ std:: ostringstream ss;
9999 UINT32 i;
100100 bool iterate (true );
101101
102- milliseconds iteration_time (milliseconds (0 ));
103- cpu_timer it_time, tot_time;
102+ boost::posix_time:: milliseconds iteration_time (boost::posix_time:: milliseconds (0 ));
103+ boost::timer:: cpu_timer it_time, tot_time;
104104
105105#if defined(__ICC) || defined(__INTEL_COMPILER) // Intel compiler
106106 boost::shared_ptr<thread> f, r, c;
107- vector< boost::shared_ptr<thread> > mt_adjust_threads_sp;
107+ std:: vector< boost::shared_ptr<thread> > mt_adjust_threads_sp;
108108#else
109- vector<boost::thread> mt_adjust_threads;
109+ std:: vector<boost::thread> mt_adjust_threads;
110110#endif
111111
112112 concurrentAdjustments.resize_runs (blockCount_);
@@ -170,7 +170,7 @@ void dna_adjust::AdjustPhasedMultiThread()
170170 for_each (mt_adjust_threads.begin (), mt_adjust_threads.end (), boost::mem_fn (&boost::thread::join));
171171#endif
172172 // This point is reached when the threads have finished
173- iteration_time = milliseconds (it_time.elapsed ().wall /MILLI_TO_NANO);
173+ iteration_time = boost::posix_time:: milliseconds (it_time.elapsed ().wall /MILLI_TO_NANO);
174174
175175 // delete mt_adjust_threads;
176176#if defined(__ICC) || defined(__INTEL_COMPILER) // Intel compiler
@@ -197,15 +197,15 @@ void dna_adjust::AdjustPhasedMultiThread()
197197 break ;
198198
199199 ss.str (" " );
200- if (iteration_time > seconds (1 ))
201- ss << seconds (static_cast <long >(iteration_time.total_seconds ()));
200+ if (iteration_time > boost::posix_time:: seconds (1 ))
201+ ss << boost::posix_time:: seconds (static_cast <long >(iteration_time.total_seconds ()));
202202 else
203203 ss << iteration_time;
204204
205205 // /////////////////////////////////
206206 // protected write to adj file (not needed here since write to
207207 // adj file at this stage is via single thread
208- adj_file << setw (PRINT_VAR_PAD) << left << " Elapsed time" << ss.str () << endl;
208+ adj_file << std:: setw (PRINT_VAR_PAD) << std:: left << " Elapsed time" << ss.str () << std:: endl;
209209 OutputLargestCorrection (corr_msg);
210210 // /////////////////////////////////
211211
@@ -277,7 +277,7 @@ void dna_adjust::SolveMTTry(bool COMPUTE_INVERSE, const UINT32& block)
277277 try {
278278 SolveMT (COMPUTE_INVERSE, block);
279279 }
280- catch (const runtime_error& e) {
280+ catch (const std:: runtime_error& e) {
281281
282282 // could not invert matrix. throw error
283283
@@ -286,12 +286,12 @@ void dna_adjust::SolveMTTry(bool COMPUTE_INVERSE, const UINT32& block)
286286#endif
287287 if (projectSettings_.g .verbose )
288288 {
289- debug_file << " Block " << block + 1 << " (reverse, multi-thread)" << endl;
290- debug_file << " Pre-adjustment Estimates" << fixed << setprecision (16 ) << v_estimatedStationsR_.at (block);
291- debug_file << " Design" << fixed << setprecision (16 ) << v_designR_.at (block);
292- debug_file << " Measurements" << fixed << setprecision (16 ) << v_measMinusCompR_.at (block);
293- debug_file << " At * V-inv" << fixed << setprecision (16 ) << v_AtVinvR_.at (block);
294- debug_file << " Normals " << fixed << setprecision (16 ) << v_normalsR_.at (block) << endl;
289+ debug_file << " Block " << block + 1 << " (reverse, multi-thread)" << std:: endl;
290+ debug_file << " Pre-adjustment Estimates" << std:: fixed << std:: setprecision (16 ) << v_estimatedStationsR_.at (block);
291+ debug_file << " Design" << std:: fixed << std:: setprecision (16 ) << v_designR_.at (block);
292+ debug_file << " Measurements" << std:: fixed << std:: setprecision (16 ) << v_measMinusCompR_.at (block);
293+ debug_file << " At * V-inv" << std:: fixed << std:: setprecision (16 ) << v_AtVinvR_.at (block);
294+ debug_file << " Normals " << std:: fixed << std:: setprecision (16 ) << v_normalsR_.at (block) << std:: endl;
295295 debug_file.flush ();
296296 }
297297#ifdef _MS_COMPILER_
@@ -344,29 +344,29 @@ void dna_adjust::SolveMT(bool COMPUTE_INVERSE, const UINT32& block)
344344 break ;
345345 }
346346
347- debug_file << endl;
347+ debug_file << std:: endl;
348348
349349 debug_file << " Block " << block + 1 << " (Reverse)" ;
350- debug_file << endl;
351- debug_file << " Pre-adjustment Estimates" << fixed << setprecision (16 ) << v_estimatedStationsR_.at (block);
350+ debug_file << std:: endl;
351+ debug_file << " Pre-adjustment Estimates" << std:: fixed << std:: setprecision (16 ) << v_estimatedStationsR_.at (block);
352352 debug_file << " Block " << block + 1 << " (Reverse)" ;
353- debug_file << endl;
354- debug_file << " Design" << fixed << setprecision (16 ) << v_designR_.at (block);
353+ debug_file << std:: endl;
354+ debug_file << " Design" << std:: fixed << std:: setprecision (16 ) << v_designR_.at (block);
355355 debug_file << " Block " << block + 1 << " (Reverse)" ;
356- debug_file << endl;
357- debug_file << " Measurements" << fixed << setprecision (16 ) << v_measMinusCompR_.at (block);
356+ debug_file << std:: endl;
357+ debug_file << " Measurements" << std:: fixed << std:: setprecision (16 ) << v_measMinusCompR_.at (block);
358358 debug_file << " Block " << block + 1 << " (Reverse)" ;
359- debug_file << endl;
360- debug_file << " At * V-inv" << fixed << setprecision (16 ) << v_AtVinvR_.at (block) << endl;
359+ debug_file << std:: endl;
360+ debug_file << " At * V-inv" << std:: fixed << std:: setprecision (16 ) << v_AtVinvR_.at (block) << std:: endl;
361361 debug_file << " Block " << block + 1 << " (Reverse)" ;
362- debug_file << endl;
363- debug_file << " Normals " << fixed << setprecision (16 ) << v_normalsR_.at (block) << endl;
362+ debug_file << std:: endl;
363+ debug_file << " Normals " << std:: fixed << std:: setprecision (16 ) << v_normalsR_.at (block) << std:: endl;
364364 debug_file << " Block " << block + 1 << " (Reverse)" ;
365- debug_file << endl;
366- debug_file << " Precisions" << fixed << setprecision (16 ) << v_normalsR_.at (block) << endl;
365+ debug_file << std:: endl;
366+ debug_file << " Precisions" << std:: fixed << std:: setprecision (16 ) << v_normalsR_.at (block) << std:: endl;
367367 debug_file << " Block " << block + 1 << " (Reverse)" ;
368- debug_file << endl;
369- debug_file << " Corrections" << fixed << setprecision (16 ) << v_correctionsR_.at (block) << endl;
368+ debug_file << std:: endl;
369+ debug_file << " Corrections" << std:: fixed << std:: setprecision (16 ) << v_correctionsR_.at (block) << std:: endl;
370370 debug_file.flush ();
371371
372372 dbg_file_mutex.unlock ();
@@ -381,7 +381,7 @@ void dna_adjust::SolveMT(bool COMPUTE_INVERSE, const UINT32& block)
381381
382382void adjust_forward_thread::operator ()()
383383{
384- stringstream ss;
384+ std:: stringstream ss;
385385 UINT32 currentBlock;
386386
387387 concurrentAdjustments.forward_run_started ();
@@ -396,7 +396,7 @@ void adjust_forward_thread::operator()()
396396 return ;
397397
398398 // ss.str("");
399- // ss << "1> Adjusted block " << currentBlock + 1 << " (forward, in isolation)... " << endl;
399+ // ss << "1> Adjusted block " << currentBlock + 1 << " (forward, in isolation)... " << std:: endl;
400400 // main_adj_->ThreadSafeWritetoAdjFile(ss.str());
401401
402402 // Check if an exception was thrown in the reverse or combine threads
@@ -422,7 +422,7 @@ void adjust_forward_thread::operator()()
422422 // ///////////////////////////////////
423423 // // protected write to adj file
424424 // ss.str("");
425- // ss << "1> Forward adjustment (in isolation) of block " << currentBlock + 1 << " complete." << endl;
425+ // ss << "1> Forward adjustment (in isolation) of block " << currentBlock + 1 << " complete." << std:: endl;
426426
427427 // adj_file_mutex.lock();
428428 // main_adj_->ThreadSafeWritetoAdjFile(ss.str());
@@ -453,7 +453,7 @@ void adjust_forward_thread::operator()()
453453 // /////////////////////////////////
454454 // protected write to adj file
455455 // ss.str("");
456- // ss << "1> Forward adjustment of block " << currentBlock << " complete." << endl;
456+ // ss << "1> Forward adjustment of block " << currentBlock << " complete." << std:: endl;
457457
458458 // main_adj_->ThreadSafeWritetoAdjFile(ss.str());
459459 // /////////////////////////////////
@@ -482,7 +482,7 @@ void adjust_forward_thread::operator()()
482482 // notify all threads waiting on combineAdjustmentQueue
483483 // combineAdjustmentQueue.notify_all();
484484
485- // this_thread::sleep(milliseconds(10));
485+ // this_thread::sleep(boost::posix_time:: milliseconds(10));
486486
487487 // notify all threads waiting on combineAdjustmentQueue
488488 // combineAdjustmentQueue.notify_all();
@@ -491,7 +491,7 @@ void adjust_forward_thread::operator()()
491491
492492void adjust_reverse_thread::operator ()()
493493{
494- stringstream ss;
494+ std:: stringstream ss;
495495 UINT32 currentBlock (main_adj_->blockCount_ -1 ), block;
496496
497497 concurrentAdjustments.reverse_run_started ();
@@ -516,7 +516,7 @@ void adjust_reverse_thread::operator()()
516516 // ///////////////////////////////////
517517 // // protected write to adj file
518518 // ss.str("");
519- // ss << "2> Adjusted block " << currentBlock + 1 << " (reverse, in isolation)... " << endl;
519+ // ss << "2> Adjusted block " << currentBlock + 1 << " (reverse, in isolation)... " << std:: endl;
520520 // main_adj_->ThreadSafeWritetoAdjFile(ss.str());
521521 // ///////////////////////////////////
522522
@@ -543,7 +543,7 @@ void adjust_reverse_thread::operator()()
543543 // ///////////////////////////////////
544544 // // protected write to adj file
545545 // ss.str("");
546- // ss << "2> Reverse adjustment (in isolation) of block " << currentBlock + 1 << " complete." << endl;
546+ // ss << "2> Reverse adjustment (in isolation) of block " << currentBlock + 1 << " complete." << std:: endl;
547547
548548 // adj_file_mutex.lock();
549549 // main_adj_->ThreadSafeWritetoAdjFile(ss.str());
@@ -583,7 +583,7 @@ void adjust_reverse_thread::operator()()
583583 // /////////////////////////////////
584584 // protected write to adj file
585585 // ss.str("");
586- // ss << "2> Reverse adjustment of block " << currentBlock << " complete." << endl;
586+ // ss << "2> Reverse adjustment of block " << currentBlock << " complete." << std:: endl;
587587
588588 // main_adj_->ThreadSafeWritetoAdjFile(ss.str());
589589 // /////////////////////////////////
@@ -609,7 +609,7 @@ void adjust_reverse_thread::operator()()
609609
610610void adjust_process_combine_thread::operator ()()
611611{
612- stringstream ss;
612+ std:: stringstream ss;
613613 UINT32 pseudomsrJSLCount;
614614 UINT32 currentBlock;
615615
@@ -629,7 +629,7 @@ void adjust_process_combine_thread::operator()()
629629 // Wait here until blocks have been placed on the queue
630630 if (!combineAdjustmentQueue.front_and_pop (currentBlock))
631631 {
632- boost::this_thread::sleep (milliseconds (2 ));
632+ boost::this_thread::sleep (boost::posix_time:: milliseconds (2 ));
633633 continue ;
634634 }
635635
@@ -675,15 +675,15 @@ void adjust_combine_thread::operator()()
675675 UINT32 thread_id, cores (boost::thread::hardware_concurrency ());
676676
677677 // Set up exception pointers
678- vector<boost::exception_ptr> cmb_errors;
678+ std:: vector<boost::exception_ptr> cmb_errors;
679679 cmb_errors.resize (cores);
680680
681681 // Create the thread pool
682682#if defined(__ICC) || defined(__INTEL_COMPILER) // Intel compiler
683683 boost::shared_ptr<thread> c;
684- vector< boost::shared_ptr<thread> > mt_combine_threads_sp;
684+ std:: vector< boost::shared_ptr<thread> > mt_combine_threads_sp;
685685#else
686- vector<boost::thread> mt_combine_threads;
686+ std:: vector<boost::thread> mt_combine_threads;
687687#endif
688688
689689 for (thread_id=0 ; thread_id<cores; ++thread_id)
@@ -732,7 +732,7 @@ void adjust_combine_thread::operator()()
732732
733733void adjust_process_prepare_thread::operator ()()
734734{
735- stringstream ss;
735+ std:: stringstream ss;
736736 UINT32 currentBlock;
737737
738738 try {
@@ -748,7 +748,7 @@ void adjust_process_prepare_thread::operator()()
748748 // Wait here until blocks have been placed on the queue
749749 if (!prepareAdjustmentQueue.front_and_pop (currentBlock))
750750 {
751- boost::this_thread::sleep (milliseconds (2 ));
751+ boost::this_thread::sleep (boost::posix_time:: milliseconds (2 ));
752752 continue ;
753753 }
754754
@@ -782,15 +782,15 @@ void adjust_prepare_thread::operator()()
782782 UINT32 thread_id, cores (boost::thread::hardware_concurrency ());
783783
784784 // Set up exception pointers
785- vector<boost::exception_ptr> prep_errors;
785+ std:: vector<boost::exception_ptr> prep_errors;
786786 prep_errors.resize (cores);
787787
788788 // Create the thread pool
789789#if defined(__ICC) || defined(__INTEL_COMPILER) // Intel compiler
790790 boost::shared_ptr<thread> p;
791- vector< boost::shared_ptr<thread> > mt_prepare_threads_sp;
791+ std:: vector< boost::shared_ptr<thread> > mt_prepare_threads_sp;
792792#else
793- vector<boost::thread> mt_prepare_threads;
793+ std:: vector<boost::thread> mt_prepare_threads;
794794#endif
795795
796796
0 commit comments