From cab77720deed80c67f78e1c166a545b375ff2fe4 Mon Sep 17 00:00:00 2001 From: "W. Michael Brown" Date: Sun, 23 Oct 2011 18:04:42 -0400 Subject: [PATCH] Replacing mul24 with fast_mul in device code. --- lib/gpu/cg_cmm.cu | 2 +- lib/gpu/cg_cmm_long.cu | 2 +- lib/gpu/cg_cmm_msm.cu | 2 +- lib/gpu/ellipsoid_extra.h | 8 ++++---- lib/gpu/ellipsoid_nbor.cu | 10 +++++----- lib/gpu/gayberne.cu | 2 +- lib/gpu/gayberne_lj.cu | 4 ++-- lib/gpu/lj.cu | 2 +- lib/gpu/lj96.cu | 2 +- lib/gpu/lj_class2_long.cu | 2 +- lib/gpu/lj_coul.cu | 2 +- lib/gpu/lj_coul_long.cu | 2 +- lib/gpu/lj_expand.cu | 2 +- lib/gpu/morse.cu | 2 +- lib/gpu/neighbor_cpu.cu | 6 +++--- lib/gpu/neighbor_gpu.cu | 10 +++++----- lib/gpu/pppm.cu | 16 ++++++++-------- lib/gpu/preprocessor.h | 5 +++-- lib/gpu/re_squared.cu | 2 +- lib/gpu/re_squared_lj.cu | 6 +++--- lib/gpu/replace_code.sh | 2 +- 21 files changed, 46 insertions(+), 45 deletions(-) diff --git a/lib/gpu/cg_cmm.cu b/lib/gpu/cg_cmm.cu index 55468d8a80..f0d47d448c 100644 --- a/lib/gpu/cg_cmm.cu +++ b/lib/gpu/cg_cmm.cu @@ -147,7 +147,7 @@ __kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp4 *lj1_in, numtyp4 ix=fetch_pos(i,x_); //x_[i]; int iw=ix.w; - int itype=mul24((int)MAX_SHARED_TYPES,iw); + int itype=fast_mul((int)MAX_SHARED_TYPES,iw); numtyp factor_lj; for ( ; nbor=nlocal_z) z_stop-=nz-nlocal_z+1; - int z_stride=mul24(nlocal_x,nlocal_y); + int z_stride=fast_mul(nlocal_x,nlocal_y); int loop_count=npts_x/PENCIL_SIZE+1; int nx=fid; - int pt=mul24(nz,mul24(npts_y,npts_x))+mul24(ny,npts_x)+nx; + int pt=fast_mul(nz,fast_mul(npts_y,npts_x))+fast_mul(ny,npts_x)+nx; for (int i=0 ; i=n; k-=order) rho1d_2=rho_coeff[k]+rho1d_2*dz; grdtyp z0=qs*rho1d_2; - int my=mz+mul24(ny,npts_x); + int my=mz+fast_mul(ny,npts_x); for (int m=0; mdev_engv/ans->dev_engv/g' $file + sed -i.bak 's/atom->dev_engv/ans->dev_engv/g' $file end