10struct dir_and_parity {
22 std::enable_if_t<hila::is_std_array<T>::value || hila::is_std_vector<T>::value,
int> = 0>
25 for (
int j = arr.size() - 1; j > 0; j--) {
28 std::swap(arr[i], arr[j]);
50 std::array<struct dir_and_parity, 2 * NDIM> arr;
84 std::array<Direction, NDIM> arr;
97inline auto shuffle_parities() {
98 std::array<Parity, 2> arr;
Parity
Parity enum with values EVEN, ODD, ALL; refers to parity of the site. Parity of site (x,...
constexpr Parity EVEN
bit pattern: 001
#define foralldir(d)
Macro to loop over (all) Direction(s)
constexpr Parity ODD
bit pattern: 010
Direction
Enumerator for direction that assigns integer to direction to be interpreted as unit vector.
Implement hila::swap for gauge fields.
auto shuffle_directions_and_parities()
double random()
Real valued uniform random number generator.
T broadcast(T &var, int rank=0)
Broadcast the value of var to all MPI ranks from rank (default=0).
auto shuffle_directions()