HILA
|
#include <lattice_vector.h>
Public Member Functions | |
bool | is_on_first_subnode (CoordinateVector v) |
Check if this is the first subnode. | |
vectorized_lattice_struct () | |
void | get_boundary_permutations () |
Find the boundary permutations to different directions. | |
void | get_neighbours_and_local_halo () |
void | get_receive_lists () |
Get neighbour receive indices for MPI. | |
void | set_coordinates () |
Build the structs for coordinates. | |
void | build_wait_arrays () |
lattice_struct::nn_comminfo_struct | get_comminfo (int d) |
Return the communication info. | |
unsigned | vector_neighbour (Direction d, int idx) const |
unsigned | site_neighbour (Direction d, int idx) const |
unsigned | field_alloc_size () const |
auto | coordinates (int idx) const |
unsigned | loop_begin (::Parity P) const |
First index in a lattice loop. | |
unsigned | loop_end (::Parity P) const |
Last index in a lattice loop. | |
Public Attributes | |
size_t | v_sites |
pointer to the original lattice | |
CoordinateVector | subdivisions |
subnode divisions to different directions | |
CoordinateVector | subnode_origin |
origin of the 1st subnode = origin of mynode | |
bool | is_boundary_permutation [4] |
True if boundary needs a permutation. | |
bool | only_local_boundary_copy [NDIRS] |
True if the boundary elements are local. | |
int | boundary_permutation [NDIRS][vector_size] |
permutation vectors | |
unsigned | halo_offset [NDIRS] |
offsets to boundary halos | |
unsigned *__restrict__ | halo_index [NDIRS] |
storage for indexes to halo sites | |
unsigned * | recv_list [NDIRS] |
unsigned | recv_list_size [NDIRS] |
The size of the receive list in each direction. | |
unsigned *__restrict__ | neighbours [NDIRS] |
Storage for neighbour indexes on each site. | |
size_t | alloc_size |
The storage size of a field. | |
unsigned char *__restrict__ | vec_wait_arr_ |
A wait array for the vectorized field. | |
Vectorized lattice struct stores information needed for vectorized access to lattice fields.
Definition at line 19 of file lattice_vector.h.
|
inline |
Set up the vectorized lattice:
Initialize
sites on vector
Definition at line 90 of file lattice_vector.h.
|
inline |
Finally, initialize wait arrays it is a bit mask array containing a bit at location dir if the neighbour at that dir is out of the local volume
Definition at line 343 of file lattice_vector.h.
|
inline |
Return the coordinates of each vector nested as coordinate[Direction][vector_index]
Definition at line 389 of file lattice_vector.h.
|
inline |
Return the number of sites that need to be allocated returns sites, not vectors!
Definition at line 382 of file lattice_vector.h.
|
inline |
Set the neighbour array, and also local halo mapping reserve extra storage for permutation halo sites there are 2*(area) v-sites to each direction with permutation,
set also the index array, if needed halo_index[d] points to the subnode modded neighbour site to dir d, if there is boundary twist (meaning there are on-node subnodes to this dir) we'll use the standard neighb array to do this.
Finally, how big the field allocation should be - IN SITES, not vectors
Definition at line 180 of file lattice_vector.h.
|
inline |
Build the structs for coordinates.
first vector_size elements should give the coordinates of vector offsets
Definition at line 322 of file lattice_vector.h.
|
inline |
this gives the neighbour when the lattice is traversed site-by-site. Now idx is the "true" site index, not vector index
Definition at line 375 of file lattice_vector.h.
|
inline |
get neighbours for this, with 2 different methods: First vector neighbour. Now idx is the vector index
Definition at line 369 of file lattice_vector.h.
unsigned* vectorized_lattice_struct< vector_size >::recv_list[NDIRS] |
move data from receive buffer – sending is fine as it is takes the role of nn_comms
Definition at line 46 of file lattice_vector.h.
size_t vectorized_lattice_struct< vector_size >::v_sites |
pointer to the original lattice
vector sites on this node
Definition at line 27 of file lattice_vector.h.