2#include "ff/amoeba/mpole.h"
3#include "ff/energybuffer.h"
8template <
bool do_a,
bool do_e,
int CFLX>
14 real aewald_sq_2 = 2 * aewald * aewald;
15 real fterm = -f * aewald * 0.5f * (
real)(M_2_SQRTPI);
17 for (
int i = threadIdx.x + blockIdx.x * blockDim.x; i <
n;
18 i += blockDim.x * gridDim.x) {
31 real dii = dix * dix + diy * diy + diz * diz;
32 real qii = 2 * (qixy * qixy + qixz * qixz + qiyz * qiyz) + qixx * qixx
33 + qiyy * qiyy + qizz * qizz;
35 int offset = threadIdx.x + blockIdx.x * blockDim.x;
37 * (cii + aewald_sq_2 * (dii / 3 + 2 * aewald_sq_2 * qii * (
real)0.2));
42 real cfl_term = 2 * fterm * ci;
void atomic_add(T value, T *buffer, size_t offset=0)
Definition: acc/adddef.h:14
#define restrict
Definition: macro.h:51
#define CONSTEXPR
Definition: macro.h:61
CountBufferTraits::type * CountBuffer
Definition: energybuffer.h:92
EnergyBufferTraits::type * EnergyBuffer
Definition: energybuffer.h:93
int n
Number of atoms padded by WARP_SIZE.
float real
Definition: precision.h:80
@ MPL_PME_XY
Definition: mpole.h:13
@ MPL_PME_Y
Definition: mpole.h:8
@ MPL_PME_0
Definition: mpole.h:6
@ MPL_PME_ZZ
Definition: mpole.h:12
@ MPL_PME_YZ
Definition: mpole.h:15
@ MPL_PME_XX
Definition: mpole.h:10
@ MPL_PME_XZ
Definition: mpole.h:14
@ MPL_PME_X
Definition: mpole.h:7
@ MPL_PME_YY
Definition: mpole.h:11
@ MPL_PME_Z
Definition: mpole.h:9
__global__ void empoleChgpenSelf_cu(CountBuffer __restrict__ nem, EnergyBuffer __restrict__ em, const real(*__restrict__ rpole)[10], real *__restrict__ pot, int n, real f, real aewald)
Definition: emselfhippo.h:10