* The code is distributed under BSD license, you are allowed to use, modify or sell this code, but a statement is required if you used this code any where.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "vector_types.h"
#include "bbsort.h"
#include "bbsort_kernel.cu"
floatgetValue(float2v){
returnv.y;
}
template<typenameT>
TgetValue(Tv){
returnv;
}
# define CUDA_SAFE_CALL_NO_SYNC( call) { \
cudaErrorerr=call;\
if(cudaSuccess!=err){\
fprintf(stderr,"Cuda error in file '%s' in line %i : %s.\n",\
* The code is distributed under BSD license, you are allowed to use, modify or sell this code, but a statement is required if you used this code any where.
* The code is distributed under BSD license, you are allowed to use, modify or sell this code, but a statement is required if you used this code any where.
// int maxAtoms = min(GRID, cSim.atoms-(atomBlock<<GRIDBITS));
// for (int i = 0; i < maxAtoms; i++)
// {
// int localIndex = threadIdx.x-index+i;
// int atomIndex = (atomBlock<<GRIDBITS)+i;
// int ix = gridPoint.x-atomGridIndex[localIndex].x;
// int iy = gridPoint.y-atomGridIndex[localIndex].y;
// int iz = gridPoint.z-atomGridIndex[localIndex].z;
// ix += (ix < 0 ? cSim.pmeGridSize.x : 0);
// iy += (iy < 0 ? cSim.pmeGridSize.y : 0);
// iz += (iz < 0 ? cSim.pmeGridSize.z : 0);
// if (ix < PME_ORDER && iy < PME_ORDER && iz < PME_ORDER)
// result += atomCharge[threadIdx.x-index+i]*cSim.pPmeBsplineTheta[atomIndex+ix*cSim.atoms].x*cSim.pPmeBsplineTheta[atomIndex+iy*cSim.atoms].y*cSim.pPmeBsplineTheta[atomIndex+iz*cSim.atoms].z;
// }
// }
// unsigned int gridIndex = gridPoint.x*cSim.pmeGridSize.y*cSim.pmeGridSize.z+gridPoint.y*cSim.pmeGridSize.z+gridPoint.z;
// if (gridIndex < cSim.pmeGridSize.x*cSim.pmeGridSize.y*cSim.pmeGridSize.z)