00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CUDAKERNELS_H
00022 #define CUDAKERNELS_H
00023
00024 #include "WKFThreads.h"
00025
00026
00027 #undef hz
00028
00029 #if defined(__cplusplus)
00030 extern "C" {
00031 #endif
00032
00033
00034
00035
00036 #define VMDCUDA_ERR_NONE 0
00037 #define VMDCUDA_ERR_GENERAL -1
00038 #define VMDCUDA_ERR_NODEVICES -2
00039 #define VMDCUDA_ERR_SOMEDEVICES -3
00040 #define VMDCUDA_ERR_DRVMISMATCH -4
00041 #define VMDCUDA_ERR_EMUDEVICE -5
00042 int vmd_cuda_num_devices(int *numdev);
00043
00044
00045 #define VMDCUDA_COMPUTEMODE_DEFAULT 0
00046 #define VMDCUDA_COMPUTEMODE_EXCLUSIVE 1
00047 #define VMDCUDA_COMPUTEMODE_PROHIBITED 2
00048
00049
00050
00051
00052 int vmd_cuda_device_props(int dev, char *name, int namelen,
00053 int *revmajor, int *revminor,
00054 unsigned long *memb, int *clockratekhz,
00055 int *smcount, int *overlap, int *kerneltimeout,
00056 int *canmaphostmem, int *computemode);
00057
00058
00059
00060
00061
00062 void * vmd_cuda_devpool_setdevice(void * voidparms);
00063
00064 void * vmd_cuda_devpool_clear_device_mem(void *);
00065
00066 int vmd_cuda_madd_gflops(int numdevs, int *devlist, double *gflops,
00067 int testloops);
00068
00069 int vmd_cuda_bus_bw(int numdevs, int *devlist,
00070 double *hdmbsec, double *hdlatusec,
00071 double *phdmbsec, double *phdlatusec,
00072 double *dhmbsec, double *dhlatusec,
00073 double *pdhmbsec, double *pdhlatusec);
00074
00075 int vmd_cuda_globmem_bw(int numdevs, int *devlist,
00076 double *memsetgbsec, double *memcpygbsec);
00077
00078 int vmd_cuda_devpool_latency(wkf_threadpool_t *devpool, int tilesize,
00079 double *kernlaunchlatency,
00080 double *barlatency,
00081 double *cyclelatency,
00082 double *tilelatency,
00083 double *kernellatency);
00084
00085 int vmd_cuda_measure_latencies(wkf_threadpool_t *devpool);
00086
00087 int vmd_cuda_vol_cpotential(long int natoms, float* atoms, float* grideners,
00088 long int numplane, long int numcol, long int numpt,
00089 float gridspacing);
00090
00091 int vmd_cuda_quicksurf(long int natoms, const float *xyzr, const float *colors,
00092 int colorperatom,
00093 float *origin, int *numvoxels, float maxrad,
00094 float radscale, float gridspacing,
00095 float isovalue, float gausslim,
00096 int &numverts,
00097 float *&v,
00098 float *&n,
00099 float *&c,
00100 int &numfacets,
00101 int *&f);
00102
00103 int vmd_cuda_evaluate_orbital_grid(wkf_threadpool_t *devpool,
00104 int numatoms,
00105 const float *wave_f, int num_wave_f,
00106 const float *basis_array, int num_basis,
00107 const float *atompos,
00108 const int *atom_basis,
00109 const int *num_shells_per_atom,
00110 const int *num_prim_per_shell,
00111 const int *shell_types,
00112 int num_shells,
00113 const int *numvoxels,
00114 float voxelsize,
00115 const float *origin,
00116 int density,
00117 float *orbitalgrid);
00118
00119 int vmd_cuda_evaluate_occupancy_map(
00120 int mx, int my, int mz,
00121 float *map,
00122
00123
00124 float max_energy,
00125 float cutoff,
00126 float hx, float hy, float hz,
00127 float x0, float y0, float z0,
00128 float bx_1, float by_1, float bz_1,
00129
00130 int nbx, int nby, int nbz,
00131 const float *bin,
00132
00133 const float *bin_zero,
00134
00135 int num_binoffsets,
00136 const char *binoffsets,
00137
00138
00139 int num_extras,
00140 const float *extra,
00141
00142
00143
00144 int num_vdwparms,
00145 const float *vdwparms,
00146
00147
00148 int num_probes,
00149 const float *probevdwparms,
00150
00151
00152 int num_conformers,
00153 const float *conformers
00154
00155 );
00156
00157
00158 int rdf_gpu(wkf_threadpool_t *devpool,
00159 int usepbc,
00160 int natoms1,
00161
00162 float* xyz,
00163
00164 int natoms2,
00165
00166 float* xyz2,
00167
00168 float* cell,
00169 float* hist,
00170
00171 int maxbin,
00172 float rmin,
00173 float delr);
00174
00175
00176 #if defined(__cplusplus)
00177 }
00178 #endif
00179
00180 #endif
00181