NiHu  2.0
fmm_assembly_times.hpp
Go to the documentation of this file.
1 
7 #ifndef NIHU_FMM_ASSEMBLY_TIMES_HPP_INCLUDED
8 #define NIHU_FMM_ASSEMBLY_TIMES_HPP_INCLUDED
9 
10 #include "fmm_timer.h"
11 
12 namespace NiHu
13 {
14 namespace fmm
15 {
16 
21 {
22 public:
28  template <class Collection>
29  void fill_times(Collection const & coll)
30  {
31  m_times[fmm_timer::M2M] = coll.get(op_tags::idx2tag<fmm_timer::M2M>::type()).get_assembly_time();
32  m_times[fmm_timer::L2L] = coll.get(op_tags::idx2tag<fmm_timer::L2L>::type()).get_assembly_time();
33  m_times[fmm_timer::M2L] = coll.get(op_tags::idx2tag<fmm_timer::M2L>::type()).get_assembly_time();
34 
35  m_times[fmm_timer::P2M] = coll.get(op_tags::idx2tag<fmm_timer::P2M>::type()).get_assembly_time();
36  m_times[fmm_timer::P2L] = coll.get(op_tags::idx2tag<fmm_timer::P2L>::type()).get_assembly_time();
37  m_times[fmm_timer::L2P] = coll.get(op_tags::idx2tag<fmm_timer::L2P>::type()).get_assembly_time();
38  m_times[fmm_timer::M2P] = coll.get(op_tags::idx2tag<fmm_timer::M2P>::type()).get_assembly_time();
39 
40  m_times[fmm_timer::P2P] = coll.get(op_tags::idx2tag<fmm_timer::P2P>::type()).get_assembly_time();
41  }
42 
47  size_t const get_time(size_t idx) const
48  {
49  return m_times[idx];
50  }
51 
52 private:
53  size_t m_times[fmm_timer::NUM_TIME_INDICES];
54 };
55 
56 } // end of namespace fmm
57 } // end of namespace NiHu
58 
59 #endif /* NIHU_FMM_ASSEMBLY_TIMES_HPP_INCLUDED */
NiHu::fmm::fmm_timer::M2L
@ M2L
index of M2L operation
Definition: fmm_timer.h:33
NiHu::fmm::fmm_assembly_times::fill_times
void fill_times(Collection const &coll)
Fill the assembly time from an operator collection.
Definition: fmm_assembly_times.hpp:29
NiHu::fmm::fmm_timer::P2M
@ P2M
index of P2M operation
Definition: fmm_timer.h:35
NiHu::fmm::fmm_timer::L2L
@ L2L
index of L2L operation
Definition: fmm_timer.h:31
NiHu::fmm::fmm_timer::M2M
@ M2M
index of M2M operation
Definition: fmm_timer.h:29
NiHu::fmm::fmm_timer::P2L
@ P2L
index of P2L operation
Definition: fmm_timer.h:37
NiHu::fmm::fmm_timer::P2P
@ P2P
index of P2P operation
Definition: fmm_timer.h:43
NiHu::fmm::fmm_timer::M2P
@ M2P
index of M2P operation
Definition: fmm_timer.h:41
NiHu::fmm::fmm_timer::L2P
@ L2P
index of L2P operation
Definition: fmm_timer.h:39
fmm_timer.h
Interface of the class NiHu::fmm::fmm_timer.
NiHu::fmm::fmm_assembly_times::get_time
const size_t get_time(size_t idx) const
Returns the assembly time for the given operation index.
Definition: fmm_assembly_times.hpp:47
NiHu::fmm::fmm_timer::NUM_TIME_INDICES
@ NUM_TIME_INDICES
number of time indices
Definition: fmm_timer.h:45
NiHu::fmm::fmm_assembly_times
Helper class for storing FMM assembly times.
Definition: fmm_assembly_times.hpp:20