CHROMA
lib
util
gauge
shift2.cc
Go to the documentation of this file.
1
/*! \file
2
* \brief Shift by a power of 2
3
*/
4
5
#include "
chromabase.h
"
6
#include "
util/gauge/shift2.h
"
7
8
namespace
Chroma
9
{
10
11
//! A simple not-fancy power of 2 shift
12
/*! \ingroup gauge */
13
LatticeColorMatrix
shift2
(
const
LatticeColorMatrix& s1,
int
isign
,
int
dir,
int
level)
14
{
15
START_CODE
();
16
17
LatticeColorMatrix
d
;
18
19
if
(level == 0)
20
{
21
d
= shift(s1,
isign
,dir);
22
}
23
else
24
{
25
LatticeColorMatrix
tmp
= shift(s1,
isign
,dir);
26
d
= shift(
tmp
,
isign
,dir);
27
28
int
cnt = 1 << (level -1);
29
for
(; cnt-- > 0; )
30
{
31
tmp
= shift(
d
,
isign
,dir);
32
d
= shift(
tmp
,
isign
,dir);
33
}
34
}
35
36
END_CODE
();
37
38
return
d
;
39
}
40
41
}
chromabase.h
Primary include file for CHROMA library code.
Chroma::shift2
LatticeColorMatrix shift2(const LatticeColorMatrix &s1, int isign, int dir, int level)
A simple not-fancy power of 2 shift.
Definition:
shift2.cc:13
Chroma
Asqtad Staggered-Dirac operator.
Definition:
klein_gord.cc:10
Chroma::tmp
LatticeFermion tmp
Definition:
mespbg5p_w.cc:36
Chroma::d
DComplex d
Definition:
invbicg.cc:99
Chroma::START_CODE
START_CODE()
Chroma::END_CODE
END_CODE()
Chroma::isign
isign
Definition:
pbg5p_w.cc:58
shift2.h
Shift by a power of 2.
Generated by
1.9.1