9#include "plumbing/backend_vector/vector_types.h"
11#include "plumbing/has_unary_minus.h"
17#if defined(CUDA) || defined(HIP)
18#define DEVICE __device__
41 DEVICE
inline auto get(
const unsigned i,
const unsigned field_alloc_size)
const;
44 DEVICE
inline void set(
const T &value,
const unsigned i,
const unsigned field_alloc_size);
49 void set_element(A &value,
const unsigned i,
const lattice_struct &lattice);
54 inline void set_element(
const T &value,
const unsigned i);
57 template <
typename vecT>
58 inline void set_vector(
const vecT &val,
const unsigned idx);
60 template <
typename vecT>
61 inline vecT get_vector(
const unsigned idx)
const;
63 void gather_comm_vectors(
66 bool antiperiodic)
const;
68 void place_recv_elements(
94 T *allocate_mpi_buffer(
unsigned n);
95 void free_mpi_buffer(T *buffer);
98 return static_cast<T *
>(fieldbuf);
108#include "plumbing/backend_vector/field_storage_backend.h"
110#elif defined(CUDA) || defined(HIP)
112#include "plumbing/backend_gpu/field_storage_backend.h"
114#elif defined(VANILLA)
116#include "plumbing/backend_cpu/field_storage_backend.h"
119Something must be defined !
The field_storage struct contains minimal information for using the field in a loop....
void place_elements(T *__restrict__ buffer, const unsigned *__restrict__ index_list, int n, const lattice_struct &lattice)
CUDA implementation of place_elements without CUDA aware MPI.
void gather_elements(T *__restrict__ buffer, const unsigned *__restrict__ index_list, int n, const lattice_struct &lattice) const
CUDA implementation of gather_elements without CUDA aware MPI.
void gather_elements_negated(T *__restrict__ buffer, const unsigned *__restrict__ index_list, int n, const lattice_struct &lattice) const
CUDA implementation of gather_elements_negated without CUDA aware MPI.
void set_local_boundary_elements(Direction dir, Parity par, const lattice_struct &lattice, bool antiperiodic)
Place boundary elements from local lattice (used in vectorized version)
auto get_element(const unsigned i, const lattice_struct &lattice) const
void place_comm_elements(Direction d, Parity par, T *__restrict__ buffer, const lattice_struct::comm_node_struct &from_node, const lattice_struct &lattice)
Place boundary elements from neighbour.
This header file defines:
Parity
Parity enum with values EVEN, ODD, ALL; refers to parity of the site. Parity of site (x,...
constexpr unsigned NDIRS
Number of directions.
Direction
Enumerator for direction that assigns integer to direction to be interpreted as unit vector.
This file defines all includes for HILA.
This files containts definitions for the Field class and the classes required to define it such as fi...
Information necessary to communicate with a node.