QMCPACK
DTD_BConds< T, 3, SUPERCELL_OPEN+SOA_OFFSET > Struct Template Reference

specialization for an open 3D More...

+ Collaboration diagram for DTD_BConds< T, 3, SUPERCELL_OPEN+SOA_OFFSET >:

Public Member Functions

 DTD_BConds (const CrystalLattice< T, 3 > &lat)
 constructor: doing nothing More...
 
template<typename PT , typename RSOA , typename DISPLSOA >
void computeDistances (const PT &pos, const RSOA &R0, T *restrict temp_r, DISPLSOA &temp_dr, int first, int last, int flip_ind=0) const
 
void computeDistancesOffload (const T pos[3], const T *restrict R0, int r0_stride, T *restrict temp_r, T *restrict temp_dr, int padded_size, int iat, int flip_ind=0) const
 
computeDist (T dx, T dy, T dz) const
 

Detailed Description

template<class T>
struct qmcplusplus::DTD_BConds< T, 3, SUPERCELL_OPEN+SOA_OFFSET >

specialization for an open 3D

Definition at line 26 of file ParticleBConds3DSoa.h.

Constructor & Destructor Documentation

◆ DTD_BConds()

DTD_BConds ( const CrystalLattice< T, 3 > &  lat)
inline

constructor: doing nothing

Definition at line 29 of file ParticleBConds3DSoa.h.

29 {}

Member Function Documentation

◆ computeDist()

T computeDist ( dx,
dy,
dz 
) const
inline

Definition at line 86 of file ParticleBConds3DSoa.h.

References qmcplusplus::sqrt().

87  {
88  return std::sqrt(dx * dx + dy * dy + dz * dz);
89  }
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)

◆ computeDistances()

void computeDistances ( const PT &  pos,
const RSOA &  R0,
T *restrict  temp_r,
DISPLSOA &  temp_dr,
int  first,
int  last,
int  flip_ind = 0 
) const
inline

Definition at line 32 of file ParticleBConds3DSoa.h.

References qmcplusplus::sqrt().

39  {
40  const T x0 = pos[0];
41  const T y0 = pos[1];
42  const T z0 = pos[2];
43  const T* restrict px = R0.data(0);
44  const T* restrict py = R0.data(1);
45  const T* restrict pz = R0.data(2);
46  T* restrict dx = temp_dr.data(0);
47  T* restrict dy = temp_dr.data(1);
48  T* restrict dz = temp_dr.data(2);
49 #pragma omp simd aligned(temp_r, px, py, pz, dx, dy, dz: QMC_SIMD_ALIGNMENT)
50  for (int iat = first; iat < last; ++iat)
51  {
52  dx[iat] = px[iat] - x0;
53  dy[iat] = py[iat] - y0;
54  dz[iat] = pz[iat] - z0;
55  temp_r[iat] = std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
56  }
57  }
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)

◆ computeDistancesOffload()

void computeDistancesOffload ( const T  pos[3],
const T *restrict  R0,
int  r0_stride,
T *restrict  temp_r,
T *restrict  temp_dr,
int  padded_size,
int  iat,
int  flip_ind = 0 
) const
inline

Definition at line 59 of file ParticleBConds3DSoa.h.

References qmcplusplus::sqrt().

67  {
68  const T x0 = pos[0];
69  const T y0 = pos[1];
70  const T z0 = pos[2];
71 
72  const T* restrict px = R0;
73  const T* restrict py = R0 + r0_stride;
74  const T* restrict pz = R0 + r0_stride * 2;
75 
76  T* restrict dx = temp_dr;
77  T* restrict dy = temp_dr + padded_size;
78  T* restrict dz = temp_dr + padded_size * 2;
79 
80  dx[iat] = px[iat] - x0;
81  dy[iat] = py[iat] - y0;
82  dz[iat] = pz[iat] - z0;
83  temp_r[iat] = std::sqrt(dx[iat] * dx[iat] + dy[iat] * dy[iat] + dz[iat] * dz[iat]);
84  }
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)

The documentation for this struct was generated from the following file: