40 #ifndef __VMML__TENSOR_STATS__HPP__
41 #define __VMML__TENSOR_STATS__HPP__
49 ranks = n_iterations = error = nnz = dec_time = rec_time = 0;
53 description = other.description;
55 n_iterations = other.n_iterations;
58 dec_time = other.dec_time;
59 rec_time = other.rec_time;
70 n_iterations += other.n_iterations;
73 dec_time += other.dec_time;
74 rec_time += other.rec_time;
77 friend std::ostream& operator <<(std::ostream& os,
79 os << stats.description <<
" " << stats.ranks <<
" " << stats.n_iterations <<
" " << stats.error <<
" " << stats.nnz <<
" " << stats.dec_time <<
" " << stats.rec_time;
83 std::string get_description() {
87 std::string get_short_description() {
88 return short_description;
95 int get_n_iterations() {
107 double get_dec_time() {
111 double get_rec_time() {
115 void set_description(
const std::string& desc ) {
119 void set_short_description(
const std::string& short_desc ) {
120 short_description = short_desc;
123 void set_ranks(
const int r ) { ranks = r; }
125 void set_n_iterations(
const int n_it ) { n_iterations = n_it; }
127 void set_error(
const double err ) { error = err; }
129 void set_nnz(
const int nnz_ ) { nnz = nnz_; }
131 void set_dec_time(
const double dec ) { dec_time = dec; }
133 void set_rec_time(
const double rec ) { rec_time = rec; }
135 static std::string get_content() {
136 return "description ranks n_iterations error nnz dec_time rec_time";
140 std::string description;
141 std::string short_description;