CudaPmeSolverUtilKernel.h

Go to the documentation of this file.
00001 #ifndef CUDAPMESOLVERUTILKERNEL_H
00002 #define CUDAPMESOLVERUTILKERNEL_H
00003 
00004 #ifdef NAMD_CUDA
00005 
00006 void spread_charge(const float4 *atoms, const int numAtoms,
00007   const int nfftx, const int nffty, const int nfftz,
00008   const int xsize, const int ysize, const int zsize,
00009   const int xdim, const int y00, const int z00, 
00010   const bool periodicY, const bool periodicZ,
00011   float* data, const int order, cudaStream_t stream);
00012 
00013 void scalar_sum(const bool orderXYZ, const int nfft1, const int nfft2, const int nfft3,
00014   const int size1, const int size2, const int size3, const double kappa,
00015   const float recip1x, const float recip1y, const float recip1z,
00016   const float recip2x, const float recip2y, const float recip2z,
00017   const float recip3x, const float recip3y, const float recip3z,
00018   const double volume,
00019   const float* prefac1, const float* prefac2, const float* prefac3,
00020   const int k2_00, const int k3_00,
00021   const bool doEnergyVirial, double* energy, double* virial, float2* data,
00022   // const int cuda_arch,
00023   cudaStream_t stream);
00024 
00025 void gather_force(const float4 *atoms, const int numAtoms,
00026   // const float recip11, const float recip22, const float recip33,
00027   const int nfftx, const int nffty, const int nfftz,
00028   const int xsize, const int ysize, const int zsize,
00029   const int xdim, const int y00, const int z00, 
00030   const bool periodicY, const bool periodicZ,
00031   const float* data, const int order, float3* force,
00032   const cudaTextureObject_t gridTexObj,
00033   cudaStream_t stream);
00034 
00035 // void calc_sum_charge_squared(const float4 *atoms, const int numAtoms, double* sum_charge_squared,
00036 //   cudaStream_t stream);
00037 
00038 template <typename T>
00039 struct TransposeBatch {
00040   T* data_in;
00041   T* data_out;
00042   int nx;
00043   int zsize_out;
00044   int xsize_out;
00045   int ysize_out;
00046 };
00047 
00048 void transpose_xyz_yzx(
00049   const int nx, const int ny, const int nz,
00050   const int xsize_in, const int ysize_in,
00051   const int ysize_out, const int zsize_out,
00052   const float2* data_in, float2* data_out, cudaStream_t stream);
00053 
00054 void batchTranspose_xyz_yzx(
00055   const int numBatches, TransposeBatch<float2>* batches, 
00056   const int max_nx, const int ny, const int nz,
00057   const int xsize_in, const int ysize_in, cudaStream_t stream);
00058 
00059 void transpose_xyz_zxy(
00060   const int nx, const int ny, const int nz,
00061   const int xsize_in, const int ysize_in,
00062   const int zsize_out, const int xsize_out,
00063   const float2* data_in, float2* data_out, cudaStream_t stream);
00064 
00065 void batchTranspose_xyz_zxy(
00066   const int numBatches, TransposeBatch<float2>* batches, 
00067   const int max_nx, const int ny, const int nz,
00068   const int xsize_in, const int ysize_in,
00069   cudaStream_t stream);
00070 
00071 #endif // NAMD_CUDA
00072 
00073 #endif // CUDAPMESOLVERUTILKERNEL_H

Generated on Wed Nov 22 01:17:14 2017 for NAMD by  doxygen 1.4.7