// ************************************************************************** // ellipsoid_nbor.cu // ------------------- // W. Michael Brown (ORNL) // // Device code for Ellipsoid neighbor routines // // __________________________________________________________________________ // This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) // __________________________________________________________________________ // // email : brownw@ornl.gov // *************************************************************************** #if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_preprocessor.h" #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); #else _texture_2d( pos_tex,int4); #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, const int t_per_atom) { // 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