changa 3.5
Loading...
Searching...
No Matches
EwaldCUDA.h
1#ifndef _EWALD_CUDA_H_
2#define _EWALD_CUDA_H_
3
4#include "HostCUDA.h"
5
6#define NEWH 80
7#define BLOCK_SIZE 128
8
11typedef struct {
12 cudatype hx, hy, hz;
13 cudatype hCfac, hSfac;
14} EwtData;
15
18typedef struct {
19#ifndef HEXADECAPOLE
20 cudatype xx, xy, xz, yy, yz, zz;
21#endif
22 cudatype totalMass;
23 cudatype cmx, cmy, cmz;
24
26
29typedef struct {
30 cudatype m;
31 cudatype xx,yy,xy,xz,yz;
32 cudatype xxx,xyy,xxy,yyy,xxz,yyz,xyz;
33 cudatype xxxx,xyyy,xxxy,yyyy,xxxz,yyyz,xxyy,xxyz,xyyz;
34 cudatype zz;
35 cudatype xzz,yzz,zzz;
36 cudatype xxzz,xyzz,xzzz,yyzz,yzzz,zzzz;
37} MomcData;
38
41typedef struct {
43 MomcData momcRoot;
44
45 int n, nReps, nEwReps, nEwhLoop;
46 cudatype L, fEwCut, alpha, alpha2, k1, ka, fEwCut2, fInner2;
47
49
58
59void EwaldHostMemorySetup(EwaldData *h_idata, int size, int nEwhLoop, int largephase);
60void EwaldHostMemoryFree(EwaldData *h_idata, int largephase);
61void EwaldHost(CompactPartData *d_localParts, VariablePartData *d_localVars,
62 EwaldData *h_idata, cudaStream_t stream, void *cb, int myIndex, int largephase);
63
64__global__ void EwaldKernel(CompactPartData *particleCores, VariablePartData *particleVars, int *markers, int largephase, int First, int Last);
65
66#endif
67
float cudatype
floating point type on the GPU
Definition cuda_typedef.h:12
Particle data needed on the GPU to calculate gravity.
Definition cuda_typedef.h:240
structure to hold information specific to GPU Ewald
Definition EwaldCUDA.h:51
EwtData * ewt
Definition EwaldCUDA.h:55
EwaldReadOnlyData * cachedData
Definition EwaldCUDA.h:56
int EwaldRange[2]
Definition EwaldCUDA.h:52
int * EwaldMarkers
Definition EwaldCUDA.h:54
Parameters and data for Ewald in the CUDA kernel.
Definition EwaldCUDA.h:41
Data for the Ewald h loop in the CUDA kernel.
Definition EwaldCUDA.h:11
CUDA version of MOMC for Ewald.
Definition EwaldCUDA.h:29
CUDA version of complete MultipoleMoments for Ewald.
Definition EwaldCUDA.h:18
Particle data that gets calculated by the GPU.
Definition cuda_typedef.h:268