// ************************************************************************** // sph_taitwater.cu // ------------------- // Trung Dac Nguyen (U Chicago) // // Device code for acceleration of the sph/taitwater pair style // // __________________________________________________________________________ // This file is part of the LAMMPS Accelerator Library (LAMMPS_AL) // __________________________________________________________________________ // // begin : September 2023 // email : ndactrung@gmail.com // *************************************************************************** #if defined(NV_KERNEL) || defined(USE_HIP) #include "lal_aux_fun1.h" #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( vel_tex,float4); #else _texture_2d( pos_tex,int4); _texture_2d( vel_tex,int4); #endif #else #define pos_tex x_ #define vel_tex v_ #endif #if (SHUFFLE_AVAIL == 0) #define store_drhoE(drhoEacc, ii, inum, tid, t_per_atom, offset, i, drhoE) \ if (t_per_atom>1) { \ simdsync(); \ simd_reduce_add2(t_per_atom, red_acc, offset, tid, \ drhoEacc.x, drhoEacc.y); \ } \ if (offset==0 && ii1) { \ for (unsigned int s=t_per_atom/2; s>0; s>>=1) { \ drhoEacc.x += shfl_down(drhoEacc.x, s, t_per_atom); \ drhoEacc.y += shfl_down(drhoEacc.y, s, t_per_atom); \ } \ } \ if (offset==0 && ii