7 #ifndef ALPS_CALLBACK_HPP 8 #define ALPS_CALLBACK_HPP 10 #include <alps/config.hpp> 16 #include <boost/optional.hpp> 27 typedef detail::posix_wall_clock clock_type;
28 typedef clock_type::time_duration_type time_duration_type;
29 typedef clock_type::time_point_type time_point_type;
45 const time_duration_type limit;
47 const time_point_type start;
49 boost::optional<alps::mpi::communicator> comm;
59 typedef detail::posix_wall_clock clock_type;
60 typedef clock_type::time_duration_type time_duration_type;
61 typedef clock_type::time_point_type time_point_type;
71 const time_duration_type limit;
72 const time_point_type start;
bool operator()() const
Returns true if it's time to stop (time is up or signal is received)
Header for object-oriented interface to MPI (similar to boost::mpi)
Encapsulation of an MPI communicator and some communicator-related operations.
stop_callback(std::size_t timelimit)
Initializes the functor with the desired time duration.
Functor-predicate: is it time to stop?
Functor-predicate: is it time to stop?