Bridge++  Ver. 2.0.2
shiftAField_eo.h
Go to the documentation of this file.
1 
10 #ifndef SHIFTAFIELD_EO_INCLUDED
11 #define SHIFTAFIELD_EO_INCLUDED
12 
13 #include <vector>
14 
17 
18 #include "lib/IO/bridgeIO.h"
19 using Bridge::vout;
20 
22 
31 template<typename AFIELD>
33  public:
34  typedef typename AFIELD::real_t real_t;
35  static const std::string class_name;
36 
37  private:
38  int m_Nin;
40  int m_Ndim;
41  int m_Nx, m_Ny, m_Nz, m_Nt;
42  int m_Nx2;
44 
45  std::vector<int> m_boundary;
47 
48  std::vector<int> m_Leo;
49 
50  int do_comm[4]; // switchs of communication (4=Ndim): (0: n, 1: y).
51  int do_comm_any; // switchs of communication (if any): (0: n, 1: y).
52 
53  std::vector<int> m_Nbdsize;
54  using allocator_t = typename AFIELD::template aligned_allocator<char>;
56  std::vector<Channel> chsend_up, chrecv_up, chsend_dn, chrecv_dn;
58 
59  public:
60  ShiftAField_eo(int nin) { init(nin); }
61 
62  ShiftAField_eo(int nin, std::vector<int>& bc)
63  { init(nin, bc); }
64 
66 
67  private:
68  // non-copyable
71 
72  public:
73 
74  void forward(AFIELD&, const AFIELD&, const int mu, const int ieo);
75  void backward(AFIELD&, const AFIELD&, const int mu, const int ieo);
76 
77  void forward(AFIELD&, const int, const AFIELD&, const int,
78  const int mu, const int ieo);
79  void backward(AFIELD&, const int, const AFIELD&, const int,
80  const int mu, const int ieo);
81 
82  private:
83 
85  void setup_channels();
86 
87  void init(int Nin);
88  void init(int Nin, std::vector<int>& bc);
89  void tidyup();
90 
91  void up_xh_simd(real_t *, real_t *, const int);
92  void up_yh(real_t *, real_t *, const int);
93  void up_zh(real_t *, real_t *, const int);
94  void up_th(real_t *, real_t *, const int);
95  void dn_xh_simd(real_t *, real_t *, const int);
96  void dn_yh(real_t *, real_t *, const int);
97  void dn_zh(real_t *, real_t *, const int);
98  void dn_th(real_t *, real_t *, const int);
99 
100  void up_xh_naive(real_t *, real_t *, const int);
101  void up_yh_nv(real_t *, real_t *, const int);
102  void up_zh_nv(real_t *, real_t *, const int);
103  void up_th_nv(real_t *, real_t *, const int);
104  void dn_xh_naive(real_t *, real_t *, const int);
105  void dn_yh_nv(real_t *, real_t *, const int);
106  void dn_zh_nv(real_t *, real_t *, const int);
107  void dn_th_nv(real_t *, real_t *, const int);
108 };
109 
110 #endif
ShiftAField_eo::chset_recv
ChannelSet chset_recv
Definition: shiftAField_eo.h:57
ShiftAField_eo::dn_zh_nv
void dn_zh_nv(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:851
ShiftAField_eo::dn_xh_naive
void dn_xh_naive(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:484
ShiftAField_eo< Field >::allocator_t
typename Field ::template aligned_allocator< char > allocator_t
Definition: shiftAField_eo.h:54
bridgeIO.h
ShiftAField_eo::m_Ndim
int m_Ndim
Definition: shiftAField_eo.h:40
ShiftAField_eo::class_name
static const std::string class_name
Definition: shiftAField_eo.h:35
ShiftAField_eo::m_Nx2
int m_Nx2
Definition: shiftAField_eo.h:42
ShiftAField_eo::chset_send
ChannelSet chset_send
Definition: shiftAField_eo.h:57
communicator_impl.h
ShiftAField_eo::dn_th_nv
void dn_th_nv(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:1041
ShiftAField_eo::dn_xh_simd
void dn_xh_simd(real_t *, real_t *, const int)
ShiftAField_eo::m_Nin
int m_Nin
internal degree of freedom.
Definition: shiftAField_eo.h:38
ShiftAField_eo::m_Nx
int m_Nx
Definition: shiftAField_eo.h:41
ChannelSet
ChannelSet class for a collection of channels.
Definition: channel.h:148
ShiftAField_eo::dn_yh
void dn_yh(real_t *, real_t *, const int)
ShiftAField_eo::setup_channels
void setup_channels()
setup channels for communication.
Definition: shiftAField_eo-tmpl.h:102
ShiftAField_eo::dn_zh
void dn_zh(real_t *, real_t *, const int)
ShiftAField_eo::up_yh_nv
void up_yh_nv(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:570
real_t
double real_t
Definition: bridgeQXS_Clover_coarse_double.cpp:16
ShiftAField_eo::up_xh_naive
void up_xh_naive(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:335
ShiftAField_eo::~ShiftAField_eo
~ShiftAField_eo()
Definition: shiftAField_eo.h:65
Field::real_t
double real_t
Definition: field.h:51
ShiftAField_eo::m_Leo
std::vector< int > m_Leo
Definition: shiftAField_eo.h:48
ShiftAField_eo::tidyup
void tidyup()
Definition: shiftAField_eo-tmpl.h:95
ShiftAField_eo::up_xh_simd
void up_xh_simd(real_t *, real_t *, const int)
ShiftAField_eo::m_Nx2v
int m_Nx2v
Definition: shiftAField_eo.h:43
ShiftAField_eo::ShiftAField_eo
ShiftAField_eo(int nin)
Definition: shiftAField_eo.h:60
ShiftAField_eo::real_t
AFIELD::real_t real_t
Definition: shiftAField_eo.h:34
ShiftAField_eo::ShiftAField_eo
ShiftAField_eo(int nin, std::vector< int > &bc)
Definition: shiftAField_eo.h:62
ShiftAField_eo::do_comm
int do_comm[4]
Definition: shiftAField_eo.h:50
ShiftAField_eo::backward
void backward(AFIELD &, const AFIELD &, const int mu, const int ieo)
Definition: shiftAField_eo-tmpl.h:135
ShiftAField_eo::chrecv_dn
std::vector< Channel > chrecv_dn
Definition: shiftAField_eo.h:56
ShiftAField_eo::do_comm_any
int do_comm_any
Definition: shiftAField_eo.h:51
ShiftAField_eo::operator=
ShiftAField_eo & operator=(const ShiftAField_eo &)
ShiftAField_eo::m_Nvol
int m_Nvol
Definition: shiftAField_eo.h:39
ShiftAField_eo::up_th_nv
void up_th_nv(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:950
ShiftAField_eo::m_vl
Bridge::VerboseLevel m_vl
Definition: shiftAField_eo.h:46
ShiftAField_eo::dn_th
void dn_th(real_t *, real_t *, const int)
ShiftAField_eo::init
void init(int Nin)
Definition: shiftAField_eo-tmpl.h:16
ShiftAField_eo::m_Nbdsize
std::vector< int > m_Nbdsize
Definition: shiftAField_eo.h:53
ShiftAField_eo::up_zh
void up_zh(real_t *, real_t *, const int)
ShiftAField_eo::m_Nz
int m_Nz
Definition: shiftAField_eo.h:41
ShiftAField_eo::m_Nvol2
int m_Nvol2
Definition: shiftAField_eo.h:39
ShiftAField_eo::m_Ny
int m_Ny
Definition: shiftAField_eo.h:41
ShiftAField_eo::m_boundary
std::vector< int > m_boundary
Definition: shiftAField_eo.h:45
ShiftAField_eo::up_th
void up_th(real_t *, real_t *, const int)
ShiftAField_eo::up_zh_nv
void up_zh_nv(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:756
ShiftAField_eo::m_Nst2v
int m_Nst2v
Definition: shiftAField_eo.h:43
ShiftAField_eo::up_yh
void up_yh(real_t *, real_t *, const int)
ShiftAField_eo::forward
void forward(AFIELD &, const AFIELD &, const int mu, const int ieo)
Definition: shiftAField_eo-tmpl.h:203
Field
Container of Field-type object.
Definition: field.h:46
communicator.h
ShiftAField_eo
Methods to shift a field in the even-odd site index.
Definition: shiftAField_eo.h:32
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
ShiftAField_eo::chsend_up
std::vector< Channel > chsend_up
Definition: shiftAField_eo.h:56
ShiftAField_eo::dn_yh_nv
void dn_yh_nv(real_t *, real_t *, const int)
Definition: shiftAField_eo-tmpl.h:662
ShiftAField_eo::m_Nt
int m_Nt
Definition: shiftAField_eo.h:41
Channel_impl
Definition: channel.h:86
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
ShiftAField_eo::chsend_dn
std::vector< Channel > chsend_dn
Definition: shiftAField_eo.h:56
ShiftAField_eo::m_Nyv
int m_Nyv
Definition: shiftAField_eo.h:43
ShiftAField_eo::chrecv_up
std::vector< Channel > chrecv_up
Definition: shiftAField_eo.h:56