PhoenixThread  1.0.0
Tools to ease parallel programming in C++
Loading...
Searching...
No Matches
PMultiThreadProgress.cpp File Reference
#include <sys/ioctl.h>
#include <sstream>
#include <iostream>
#include "PMultiThreadProgress.h"
+ Include dependency graph for PMultiThreadProgress.cpp:

Go to the source code of this file.

Functions

void phoenix_print_parallel_progress (PMultiThreadProgress &progress, int refreshSecond)
 Print the parallel progression of the computing.
 

Function Documentation

◆ phoenix_print_parallel_progress()

void phoenix_print_parallel_progress ( PMultiThreadProgress & progress,
int refreshSecond )

Print the parallel progression of the computing.

Parameters
progress: PMultiThreadProgress which print all progress bars
refreshSecond: number of second between two refresh of the progress bars

Definition at line 17 of file PMultiThreadProgress.cpp.

17 {
18 while(!progress.isFinished()){ //While computation is ongoing
19 progress.print();
20 std::this_thread::sleep_for(std::chrono::seconds(refreshSecond)); //We check status of computation each second
21 }
22 progress.printSummary();
23 std::cout << "PMultiThreadProgress : Done" << std::endl;
24}
void printSummary() const
Print a summary of all the progress bars.
bool isFinished() const
Say if the PMultiThreadProgress is finished.
void print()
Print the multithread progress bar.

References PMultiThreadProgress::isFinished(), PMultiThreadProgress::print(), and PMultiThreadProgress::printSummary().

Referenced by phoenix_program_callParallelProgressBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: