timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
|
#include "timemory/data/stream.hpp"
Public Types | |
template<typename T > | |
using | set_t = std::set< T > |
template<typename K , typename M > | |
using | map_t = std::map< K, M > |
template<typename K , typename M > | |
using | pair_t = std::pair< K, M > |
template<typename T > | |
using | vector_t = std::vector< T > |
using | string_t = std::string |
using | stringstream_t = std::stringstream |
using | format_flags = std::ios_base::fmtflags |
using | order_map_t = vector_t< string_t > |
using | header_col_t = vector_t< header > |
using | entry_col_t = vector_t< entry > |
using | header_pair_t = pair_t< string_t, header_col_t > |
using | entry_pair_t = pair_t< string_t, entry_col_t > |
using | header_map_t = vector_t< header_pair_t > |
using | entry_map_t = vector_t< entry_pair_t > |
using | break_set_t = set_t< int > |
Public Member Functions | |
stream (char _delim='|', char _fill='-', format_flags _fmt={}, int _width=0, int _prec=0, bool _center=false) | |
bool | center () const |
int | precision () const |
int | width () const |
char | delim () const |
format_flags | flags () const |
int64_t | freq () const |
void | center (bool v) |
void | precision (int v) |
void | width (int v) |
void | delim (char v) |
void | setf (format_flags v) |
void | setfreq (int64_t v) |
void | set_name (string_t v) |
void | set_banner (string_t v) |
void | set_prefix_begin (int val=-1) |
void | set_prefix_end (int val=-1) |
void | insert_break (int val=-1) |
void | operator() (header _hdr) |
void | operator() (entry _obj) |
template<typename StreamT > | |
void | write_separator (StreamT &os, char _delim) const |
template<typename StreamT > | |
void | write_banner (StreamT &os) const |
void | clear () |
header & | get_header (const string_t &_key, int64_t _n) |
int | add_row () |
indicate that a row of data has been finished More... | |
void | sort (const std::function< bool(const std::string &, const std::string &)> &sorter, std::vector< std::string > keys={}, const std::set< std::string > &exclude={}) |
Provide a. More... | |
Static Public Member Functions | |
static int64_t & | separator_frequency () |
static int64_t | index (const string_t &_val, const vector_t< string_t > &_obj) |
static int64_t | insert (const string_t &_val, vector_t< string_t > &_obj) |
template<typename Tp > | |
static int64_t | index (const string_t &_val, const vector_t< pair_t< string_t, vector_t< Tp > > > &_obj) |
template<typename Tp > | |
static int64_t | insert (const string_t &_val, vector_t< pair_t< string_t, vector_t< Tp > > > &_obj) |
template<typename... Tp, template< typename... > class _Tuple, size_t... Idx> | |
static void | write (stream &, const _Tuple< Tp... > &, index_sequence< Idx... >) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const stream &obj) |
Definition at line 268 of file stream.hpp.
using tim::data::stream::break_set_t = set_t<int> |
Definition at line 295 of file stream.hpp.
using tim::data::stream::entry_col_t = vector_t<entry> |
Definition at line 288 of file stream.hpp.
Definition at line 294 of file stream.hpp.
Definition at line 291 of file stream.hpp.
using tim::data::stream::format_flags = std::ios_base::fmtflags |
Definition at line 284 of file stream.hpp.
Definition at line 287 of file stream.hpp.
Definition at line 293 of file stream.hpp.
Definition at line 290 of file stream.hpp.
using tim::data::stream::map_t = std::map<K, M> |
Definition at line 274 of file stream.hpp.
Definition at line 285 of file stream.hpp.
using tim::data::stream::pair_t = std::pair<K, M> |
Definition at line 277 of file stream.hpp.
using tim::data::stream::set_t = std::set<T> |
Definition at line 271 of file stream.hpp.
using tim::data::stream::string_t = std::string |
Definition at line 282 of file stream.hpp.
using tim::data::stream::stringstream_t = std::stringstream |
Definition at line 283 of file stream.hpp.
using tim::data::stream::vector_t = std::vector<T> |
Definition at line 280 of file stream.hpp.
|
inlineexplicit |
Definition at line 301 of file stream.hpp.
|
inline |
indicate that a row of data has been finished
Definition at line 693 of file stream.hpp.
Referenced by tim::operation::finalize::print< Tp, true >::write_stream().
|
inline |
Definition at line 311 of file stream.hpp.
|
inline |
Definition at line 318 of file stream.hpp.
|
inline |
Definition at line 665 of file stream.hpp.
|
inline |
Definition at line 314 of file stream.hpp.
|
inline |
Definition at line 321 of file stream.hpp.
|
inline |
Definition at line 315 of file stream.hpp.
|
inline |
Definition at line 316 of file stream.hpp.
Definition at line 672 of file stream.hpp.
References index().
Referenced by tim::data::write_entry().
|
inlinestatic |
Definition at line 354 of file stream.hpp.
|
inlinestatic |
Definition at line 330 of file stream.hpp.
Referenced by get_header(), insert(), operator()(), write_banner(), and write_separator().
|
inlinestatic |
|
inlinestatic |
Definition at line 340 of file stream.hpp.
References tim::debug, and index().
Referenced by operator()().
|
inline |
Definition at line 391 of file stream.hpp.
Referenced by tim::operation::print_header< Tp >::print_header().
|
inline |
Definition at line 413 of file stream.hpp.
References tim::data::base::stream_entry::center(), tim::data::base::stream_entry::column(), tim::data::base::stream_entry::get(), tim::data::entry::get_header(), index(), insert(), tim::data::entry::permit_empty(), tim::data::base::stream_entry::row(), tim::data::base::stream_entry::width(), and tim::data::entry::width().
|
inline |
Definition at line 396 of file stream.hpp.
References tim::data::base::stream_entry::center(), tim::data::base::stream_entry::column(), tim::data::base::stream_entry::get(), insert(), tim::data::base::stream_entry::row(), and tim::data::base::stream_entry::width().
|
inline |
Definition at line 312 of file stream.hpp.
|
inline |
Definition at line 319 of file stream.hpp.
|
inlinestatic |
|
inline |
Definition at line 328 of file stream.hpp.
|
inline |
Definition at line 326 of file stream.hpp.
Referenced by tim::data::write_entry().
|
inline |
Definition at line 381 of file stream.hpp.
Referenced by tim::operation::print_header< Tp >::print_header().
|
inline |
Definition at line 386 of file stream.hpp.
Referenced by tim::operation::print_header< Tp >::print_header().
|
inline |
Definition at line 322 of file stream.hpp.
|
inline |
Definition at line 323 of file stream.hpp.
|
inline |
Provide a.
sorter | functor that operates on all or a specific set of header keys. If |
keys | is empty, all header keys are sorted. If |
keys | is non-empty, the sorted keys are placed at the front of the container and any remaining keys not list in |
exclude | will be added to the end of the container in the order consistent with the origial construction |
Definition at line 705 of file stream.hpp.
|
inline |
Definition at line 313 of file stream.hpp.
|
inline |
Definition at line 320 of file stream.hpp.
|
static |
|
inline |
Definition at line 589 of file stream.hpp.
References tim::delimit(), index(), tim::os, and write_separator().
|
inline |
Definition at line 554 of file stream.hpp.
References index(), and tim::os.
Referenced by write_banner().
|
friend |
Definition at line 436 of file stream.hpp.