1 #ifndef GRID_WEIGHTS_HPP
2 #define GRID_WEIGHTS_HPP
17 template<PhiWtUsage PWU>
19 KOKKOS_INLINE_FUNCTION
void set(
const Simd<double>& phi_in,
double inv_delta_phi,
int nplanes){}
35 KOKKOS_INLINE_FUNCTION
void set(
const Simd<double>& phi_in,
double inv_delta_phi,
int nplanes){
36 phi.set(phi_in, inv_delta_phi, nplanes);
46 template<Order OT, PhiInterpType PIT>
51 template<PhiInterpType PIT>
56 KOKKOS_INLINE_FUNCTION
bool is_valid(
int i_simd)
const{
57 return (node[i_simd]>=0);
61 KOKKOS_INLINE_FUNCTION
bool is_invalid(
int i_simd)
const{
62 return (node[i_simd]<0);
72 template<PhiInterpType PIT>
84 KOKKOS_INLINE_FUNCTION
bool is_valid(
int i_simd)
const{
85 return (itr[i_simd]>0);
88 KOKKOS_INLINE_FUNCTION
bool is_invalid(
int i_simd)
const{
89 return (itr[i_simd]<=0);
93 for (
int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
94 is_not_valid[i_simd] = is_invalid(i_simd);
109 itr[i_simd] = grid_wts.
itr[i_simd];
Definition: grid_weights.hpp:12
KOKKOS_INLINE_FUNCTION SimdGridWeights()
Definition: grid_weights.hpp:79
SimdLinearWeights phi
Definition: grid_weights.hpp:33
Definition: linear_weights.hpp:46
Simd< int > itr
Definition: grid_weights.hpp:74
Definition: grid_weights.hpp:73
Simd< int > node
Definition: grid_weights.hpp:53
Definition: grid_weights.hpp:47
KOKKOS_INLINE_FUNCTION bool is_invalid(int i_simd) const
Definition: grid_weights.hpp:88
KOKKOS_INLINE_FUNCTION bool is_invalid(int i_simd) const
Definition: grid_weights.hpp:61
KOKKOS_INLINE_FUNCTION void is_not_in_grid(Simd< bool > &is_not_valid) const
Definition: grid_weights.hpp:92
KOKKOS_INLINE_FUNCTION void set(const Simd< double > &phi_in, double inv_delta_phi, int nplanes)
Definition: grid_weights.hpp:19
KOKKOS_INLINE_FUNCTION void set(const Simd< double > &phi_in, double inv_delta_phi, int nplanes)
Definition: grid_weights.hpp:35
constexpr KOKKOS_INLINE_FUNCTION PhiWtUsage get_phi_wt_usage(PhiInterpType PIT)
Definition: grid_weights.hpp:15
SimdPhiWeights< get_phi_wt_usage(PIT)> phi_wts
Definition: grid_weights.hpp:77
Definition: grid_weights.hpp:18
Simd< int > i_phi
Definition: grid_weights.hpp:26
PhiInterpType
Definition: globals.hpp:95
Order
Definition: globals.hpp:77
KOKKOS_INLINE_FUNCTION void mark_as_invalid(int i_simd)
Definition: grid_weights.hpp:65
Definition: grid_structs.hpp:7
KOKKOS_INLINE_FUNCTION void set_to_midplane()
Definition: grid_weights.hpp:21
KOKKOS_INLINE_FUNCTION void add_hint(const SimdGridWeights< Order::One, PIT > &grid_wts)
Definition: grid_weights.hpp:103
KOKKOS_INLINE_FUNCTION void set_to_midplane()
Definition: grid_weights.hpp:39
Definition: grid_weights.hpp:11
SimdGridVec p
Definition: grid_weights.hpp:75
KOKKOS_INLINE_FUNCTION void add_hint(const SimdGridWeights< Order::One, PIT > &grid_wts, int i_simd)
Definition: grid_weights.hpp:108
KOKKOS_INLINE_FUNCTION bool is_valid(int i_simd) const
Definition: grid_weights.hpp:84
KOKKOS_INLINE_FUNCTION bool is_valid(int i_simd) const
Definition: grid_weights.hpp:56
PhiWtUsage
Definition: grid_weights.hpp:9
Definition: grid_weights.hpp:10
KOKKOS_INLINE_FUNCTION void mark_as_invalid()
Definition: grid_weights.hpp:98