1 #ifndef LINGEN_HINTS_HPP_ 2 #define LINGEN_HINTS_HPP_ 3 4 #include <cstddef> // for size_t 5 #include <map> 6 #include <iosfwd> // istream, ostream 7 #include "select_mpi.h" 8 #include "lingen_call_companion.hpp" 9 10 struct lingen_hints : public std::map<lingen_call_companion::key, lingen_call_companion> { 11 typedef std::map<lingen_call_companion::key, lingen_call_companion> super; 12 double tt_scatter_per_unit; 13 double tt_gather_per_unit; 14 int ipeak; 15 size_t peak; 16 void share(int root, MPI_Comm comm); 17 std::istream& unserialize(std::istream& is); 18 std::ostream& serialize(std::ostream& os) const; 19 }; 20 operator <<(std::ostream & os,lingen_hints const & c)21inline std::ostream& operator<<(std::ostream& os, lingen_hints const & c) { 22 return c.serialize(os); 23 } 24 operator >>(std::istream & is,lingen_hints & c)25inline std::istream& operator>>(std::istream& is, lingen_hints & c) { 26 return c.unserialize(is); 27 } 28 29 30 31 #endif /* LINGEN_HINTS_HPP_ */ 32