HILA
Loading...
Searching...
No Matches
field_storage< T > Class Template Reference

The field_storage struct contains minimal information for using the field in a loop. It is communicated to CUDA kernels and other accelerator functions. More...

#include <field_storage.h>

Public Member Functions

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.
 
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.
 
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.
 
template<typename T >
void set_element (const T &value, const unsigned idx)
 
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)
 

Detailed Description

template<typename T>
class field_storage< T >

The field_storage struct contains minimal information for using the field in a loop. It is communicated to CUDA kernels and other accelerator functions.

Definition at line 29 of file field_storage.h.

Member Function Documentation

◆ gather_elements()

template<typename T >
void field_storage< T >::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.

Fetch elements from the field to buffer using sites in index_list.

Definition at line 41 of file backend_cpu/field_storage_backend.h.

◆ gather_elements_negated()

template<typename T >
void field_storage< T >::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.

requires unary - !!

Definition at line 54 of file backend_cpu/field_storage_backend.h.

◆ get_element()

template<typename T >
T field_storage< T >::get_element ( const unsigned  i,
const lattice_struct lattice 
) const
inline

get_element gathers one T-element from vectorized store again, idx is the "site" index

Definition at line 125 of file backend_cpu/field_storage_backend.h.

◆ place_elements()

template<typename T >
void field_storage< T >::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.

Vectorized implementation of setting elements.

Definition at line 72 of file backend_cpu/field_storage_backend.h.

◆ set_element()

template<typename T >
template<typename T >
void field_storage< T >::set_element ( const T &  value,
const unsigned  idx 
)
inline

set_element scatters one individual T-element to vectorized store, using the "site" index idx.

Definition at line 130 of file backend_vector/field_storage_backend.h.

◆ set_local_boundary_elements()

template<typename T >
void field_storage< T >::set_local_boundary_elements ( Direction  dir,
Parity  par,
const lattice_struct lattice,
bool  antiperiodic 
)

Place boundary elements from local lattice (used in vectorized version)

Loop over the boundary sites - i is the vector index location where the vectors are copied from are in halo_index

get ptrs to target and source vec elements

Definition at line 81 of file backend_cpu/field_storage_backend.h.


The documentation for this class was generated from the following files: