// ************************************************************************** // ellipsoid_nbor.cu // ------------------- // W. Michael Brown (ORNL) // // Device code for Ellipsoid neighbor routines // // __________________________________________________________________________ // This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) // __________________________________________________________________________ // // begin : // email : brownw@ornl.gov // ***************************************************************************/ #ifdef NV_KERNEL #include "lal_preprocessor.h" #ifndef _DOUBLE_DOUBLE texture pos_tex; #else texture pos_tex; #endif #else #define pos_tex x_ #endif // --------------------------------------------------------------------------- // Unpack neighbors from dev_ij array into dev_nbor matrix for coalesced access // -- Only unpack neighbors matching the specified inclusive range of forms // -- Only unpack neighbors within cutoff // --------------------------------------------------------------------------- __kernel void kernel_nbor(const __global numtyp4 *restrict x_, const __global numtyp2 *restrict cut_form, const int ntypes, __global int *dev_nbor, const int nbor_pitch, const int start, const int inum, const __global int *dev_ij, const int form_low, const int form_high) { // ii indexes the two interacting particles in gi int ii=GLOBAL_ID_X+start; if (ii=form_low && cf.y<=form_high) { // Compute r12; numtyp rsq=jx.x-ix.x; rsq*=rsq; numtyp t=jx.y-ix.y; rsq+=t*t; t=jx.z-ix.z; rsq+=t*t; if (rsq=form_low && form[mtype]<=form_high) { // Compute r12; numtyp rsq=jx.x-ix.x; rsq*=rsq; numtyp t=jx.y-ix.y; rsq+=t*t; t=jx.z-ix.z; rsq+=t*t; if (rsq