planc
Parallel Lowrank Approximation with Non-negativity Constraints
distnmftime.hpp
Go to the documentation of this file.
1 /* Copyright 2016 Ramakrishnan Kannan */
2 
3 #ifndef DISTNMF_DISTNMFTIME_HPP_
4 #define DISTNMF_DISTNMFTIME_HPP_
5 
10 namespace planc {
11 
12 class DistNMFTime {
13  private:
14  double m_duration;
15  double m_compute_duration;
16  double m_communication_duration;
17  double m_allgather_duration;
18  double m_allreduce_duration;
19  double m_reducescatter_duration;
20  double m_gram_duration;
21  double m_mm_duration;
22  double m_nnls_duration;
23  double m_err_compute_duration;
24  double m_err_communication_duration;
25 
26  public:
27  DistNMFTime(double d, double compute_d, double communication_d,
28  double err_comp, double err_comm)
29  : m_duration(d),
30  m_compute_duration(compute_d),
31  m_communication_duration(communication_d),
32  m_err_compute_duration(err_comp),
33  m_err_communication_duration(err_comm) {}
34  DistNMFTime(double d, double compute_d, double communication_d,
35  double allgather_d, double allreduce_d, double reducescatter_d,
36  double gram_d, double mm_d, double nnls_d, double err_comp,
37  double err_comm)
38  : m_duration(d),
39  m_compute_duration(compute_d),
40  m_communication_duration(communication_d),
41  m_allgather_duration(allgather_d),
42  m_allreduce_duration(allreduce_d),
43  m_reducescatter_duration(reducescatter_d),
44  m_gram_duration(gram_d),
45  m_mm_duration(mm_d),
46  m_nnls_duration(nnls_d),
47  m_err_compute_duration(err_comp),
48  m_err_communication_duration(err_comm) {}
49  DistNMFTime(double d, double compute_d, double communication_d, double gram_d,
50  double mm_d, double nnls_d, double err_comp, double err_comm)
51  : m_duration(d),
52  m_compute_duration(compute_d),
53  m_communication_duration(communication_d),
54  m_gram_duration(gram_d),
55  m_mm_duration(mm_d),
56  m_nnls_duration(nnls_d),
57  m_err_compute_duration(err_comp),
58  m_err_communication_duration(err_comm) {}
59 
60  const double duration() const { return m_duration; }
61  const double compute_duration() const { return m_compute_duration; }
62  const double communication_duration() const {
63  return m_communication_duration;
64  }
65  const double allgather_duration() const { return m_allgather_duration; }
66  const double allreduce_duration() const { return m_allreduce_duration; }
67  const double reducescatter_duration() const {
68  return m_reducescatter_duration;
69  }
70  const double gram_duration() const { return m_gram_duration; }
71  const double mm_duration() const { return m_mm_duration; }
72  const double nnls_duration() const { return m_nnls_duration; }
73  const double err_compute_duration() const { return m_err_compute_duration; }
74  const double err_communication_duration() const {
75  return m_err_communication_duration;
76  }
77  void duration(double d) { m_duration += d; }
78  void compute_duration(double d) { m_compute_duration += d; }
79  void communication_duration(double d) { m_communication_duration += d; }
80  void allgather_duration(double d) { m_allgather_duration += d; }
81  void allreduce_duration(double d) { m_allreduce_duration += d; }
82  void reducescatter_duration(double d) { m_reducescatter_duration += d; }
83  void gram_duration(double d) { m_gram_duration += d; }
84  void mm_duration(double d) { m_mm_duration += d; }
85  void nnls_duration(double d) { m_nnls_duration += d; }
86  void err_compute_duration(double d) { m_err_compute_duration += d; }
87  void err_communication_duration(double d) {
88  m_err_communication_duration += d;
89  }
90 };
91 
92 } // namespace planc
93 
94 #endif // DISTNMF_DISTNMFTIME_HPP_
DistNMFTime(double d, double compute_d, double communication_d, double err_comp, double err_comm)
Definition: distnmftime.hpp:27
void nnls_duration(double d)
Definition: distnmftime.hpp:85
const double err_communication_duration() const
Definition: distnmftime.hpp:74
void compute_duration(double d)
Definition: distnmftime.hpp:78
const double communication_duration() const
Definition: distnmftime.hpp:62
const double err_compute_duration() const
Definition: distnmftime.hpp:73
void communication_duration(double d)
Definition: distnmftime.hpp:79
void reducescatter_duration(double d)
Definition: distnmftime.hpp:82
void gram_duration(double d)
Definition: distnmftime.hpp:83
DistNMFTime(double d, double compute_d, double communication_d, double allgather_d, double allreduce_d, double reducescatter_d, double gram_d, double mm_d, double nnls_d, double err_comp, double err_comm)
Definition: distnmftime.hpp:34
const double allgather_duration() const
Definition: distnmftime.hpp:65
const double duration() const
Definition: distnmftime.hpp:60
const double nnls_duration() const
Definition: distnmftime.hpp:72
void duration(double d)
Definition: distnmftime.hpp:77
const double compute_duration() const
Definition: distnmftime.hpp:61
const double gram_duration() const
Definition: distnmftime.hpp:70
DistNMFTime(double d, double compute_d, double communication_d, double gram_d, double mm_d, double nnls_d, double err_comp, double err_comm)
Definition: distnmftime.hpp:49
const double mm_duration() const
Definition: distnmftime.hpp:71
void err_compute_duration(double d)
Definition: distnmftime.hpp:86
void err_communication_duration(double d)
Definition: distnmftime.hpp:87
const double reducescatter_duration() const
Definition: distnmftime.hpp:67
void allreduce_duration(double d)
Definition: distnmftime.hpp:81
ncp_factors contains the factors of the ncp every ith factor is of size n_i * k number of factors is ...
Definition: ncpfactors.hpp:20
void mm_duration(double d)
Definition: distnmftime.hpp:84
const double allreduce_duration() const
Definition: distnmftime.hpp:66
void allgather_duration(double d)
Definition: distnmftime.hpp:80