14 if (s != lattice.volume()) {
15 hila::out0 <<
" Reduction test error! Sum " << s <<
" should be "
16 << lattice.volume() <<
'\n';
27 f1[X] = X.coordinates();
28 f2[X] = (X.coordinates() + d).mod(lattice.size());
32 dif1 +=
abs(f1[X + d] - f2[X]);
33 dif2 +=
abs(f1[X] - f2[X - d]);
38 <<
" direction " << (unsigned)d <<
" dif1 " << dif1 <<
'\n';
42 if (dif2.squarenorm() != 0) {
44 <<
" direction " << (unsigned)d <<
" dif2 " << dif2 <<
'\n';
48#if 0 && defined(SPECIAL_BOUNDARY_CONDITIONS)
50 if (next_direction(d) == NDIM) {
54 if (X.coordinate(d) == lattice.size(d) - 1)
61 onsites(
ALL) { dif1 += f1[X] - f2[X - d]; }
65 <<
" direction " << (unsigned)d <<
'\n';
73void test_std_gathers() {
79#if defined(CUDA) || defined(HIP)
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
void set_boundary_condition(Direction dir, hila::bc bc)
Set the boundary condition in a given Direction (periodic or antiperiodic)
hila::arithmetic_type< T > squarenorm() const
Calculate square norm - sum of squared elements.
T abs(const Complex< T > &a)
Return absolute value of Complex number.
#define foralldir(d)
Macro to loop over (all) Direction(s)
constexpr Parity ALL
bit pattern: 011
int myrank()
rank of this node
std::ostream out
this is our default output file stream
std::ostream out0
This writes output only from main process (node 0)
void terminate(int status)