Boost logo

Boost Users :

From: Levent Yilmaz (sly5+gmane_at_[hidden])
Date: 2006-06-21 13:58:38


Hi All,

This little utility (progress_display in progress.hpp) is so useful that
I couldn't help but send out a feature request (hoping that this list is
the right place to do that).

For programs using multiple threads or multiple distributed processes
(as in MPI) it is useful to output progress indication only from some
root node.

However, these programs are usually SPMD (single program multiple data)
and it is not convenient/possible to simply not create a
progress_display object. One solution would be:

// create a progress_display that does nothing for non root nodes
int total_run = 100;
boost::progress_display pg( i_am_root ? total_run : pg::DUMMY_DISPLAY );
// Then operator++() will output only from some root process.
for (int i=0; i!=total_run; pg++);

So my feature request is, can we have some facilities for creating
trivial and does-nothing-useful type of progress_displays?

best regards,
- Levent.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net