KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
Able to print either a single value or a vector of value to the given outstream. More...
#include <printer.hpp>
Public Member Functions | |
ScalarOrVectorPrinter (std::ostream &outstream) | |
Constructs a printer printing to the given outstream. | |
void | operator() (std::vector< T > const &vec) const |
Outputs the content of the given vector to outstream. | |
void | operator() (T const &scalar) const |
Outputs the given scalar to outstream. | |
Public Attributes | |
std::ostream & | _outstream |
Outstream used for printing. | |
Able to print either a single value or a vector of value to the given outstream.
Value | type to print. |
|
inline |
Constructs a printer printing to the given outstream.
outstream | Outstream to print on. |
|
inline |
Outputs the content of the given vector to outstream.
vec | Vector whose elements are comma-separated printed to the outstream. |
|
inline |
Outputs the given scalar to outstream.
scalar | Scalar to be printed. |