git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7575 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -17,5 +17,7 @@ LIB_DIR = .
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -16,5 +16,7 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -19,5 +19,7 @@ OBJ_DIR = ./
|
||||
LIB_DIR = ./
|
||||
AR = ar
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -27,5 +27,7 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -19,5 +19,7 @@ OBJ_DIR = ./
|
||||
LIB_DIR = ./
|
||||
AR = ar
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -22,5 +22,7 @@ LIB_DIR = ./
|
||||
AR = ar
|
||||
BSH = /bin/sh
|
||||
|
||||
CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini
|
||||
|
||||
include Nvidia.makefile
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generic Mac Makefile for OpenCL
|
||||
# ------------------------------------------------------------------------- */
|
||||
|
||||
OCL_CPP = mpic++ -I./geryon/opencl_1_0 -O3 -DMPI_GERYON -DUCL_NO_EXIT
|
||||
OCL_CPP = mpic++ -O3 -DMPI_GERYON -DUCL_NO_EXIT
|
||||
OCL_LINK = -framework OpenCL
|
||||
OCL_PREC = -D_SINGLE_SINGLE
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
CUDA = $(NVCC) $(CUDA_INCLUDE) $(CUDA_OPTS) -Icudpp_mini $(CUDA_ARCH) \
|
||||
$(CUDA_PRECISION)
|
||||
CUDR = $(CUDR_CPP) $(CUDR_OPTS) $(CUDA_PRECISION) $(CUDA_INCLUDE) \
|
||||
-Icudpp_mini
|
||||
$(CUDPP_OPT)
|
||||
CUDA_LINK = $(CUDA_LIB) -lcudart
|
||||
|
||||
GPU_LIB = $(LIB_DIR)/libgpu.a
|
||||
@ -18,9 +18,11 @@ PAIR_H = lal_atom.h lal_answer.h lal_neighbor_shared.h \
|
||||
ALL_H = $(NVD_H) $(PAIR_H)
|
||||
|
||||
EXECS = $(BIN_DIR)/nvc_get_devices
|
||||
ifdef CUDPP_OPT
|
||||
CUDPP = $(OBJ_DIR)/cudpp.o $(OBJ_DIR)/cudpp_plan.o \
|
||||
$(OBJ_DIR)/cudpp_maximal_launch.o $(OBJ_DIR)/cudpp_plan_manager.o \
|
||||
$(OBJ_DIR)/radixsort_app.cu_o $(OBJ_DIR)/scan_app.cu_o
|
||||
endif
|
||||
OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_ans.o \
|
||||
$(OBJ_DIR)/lal_neighbor.o $(OBJ_DIR)/lal_neighbor_shared.o \
|
||||
$(OBJ_DIR)/lal_device.o $(OBJ_DIR)/lal_base_atomic.o \
|
||||
@ -39,7 +41,12 @@ OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_ans.o \
|
||||
$(OBJ_DIR)/lal_charmm_long.o $(OBJ_DIR)/lal_charmm_long_ext.o \
|
||||
$(OBJ_DIR)/lal_cg_cmm.o $(OBJ_DIR)/lal_cg_cmm_ext.o \
|
||||
$(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o \
|
||||
$(CUDPP)
|
||||
$(OBJ_DIR)/lal_eam.o $(OBJ_DIR)/lal_eam_ext.o \
|
||||
$(OBJ_DIR)/lal_buck.o $(OBJ_DIR)/lal_buck_ext.o \
|
||||
$(OBJ_DIR)/lal_buck_coul.o $(OBJ_DIR)/lal_buck_coul_ext.o \
|
||||
$(OBJ_DIR)/lal_buck_coul_long.o $(OBJ_DIR)/lal_buck_coul_long_ext.o \
|
||||
$(OBJ_DIR)/lal_table.o $(OBJ_DIR)/lal_table_ext.o \
|
||||
$(OBJ_DIR)/lal_yukawa.o $(OBJ_DIR)/lal_yukawa_ext.o
|
||||
PTXS = $(OBJ_DIR)/device.ptx $(OBJ_DIR)/device_ptx.h \
|
||||
$(OBJ_DIR)/atom.ptx $(OBJ_DIR)/atom_ptx.h \
|
||||
$(OBJ_DIR)/neighbor_cpu.ptx $(OBJ_DIR)/neighbor_cpu_ptx.h \
|
||||
@ -61,7 +68,13 @@ PTXS = $(OBJ_DIR)/device.ptx $(OBJ_DIR)/device_ptx.h \
|
||||
$(OBJ_DIR)/morse.ptx $(OBJ_DIR)/morse_ptx.h \
|
||||
$(OBJ_DIR)/charmm_long.ptx $(OBJ_DIR)/charmm_long_ptx.h \
|
||||
$(OBJ_DIR)/cg_cmm.ptx $(OBJ_DIR)/cg_cmm_ptx.h \
|
||||
$(OBJ_DIR)/cg_cmm_long.ptx $(OBJ_DIR)/cg_cmm_long_ptx.h
|
||||
$(OBJ_DIR)/cg_cmm_long.ptx $(OBJ_DIR)/cg_cmm_long_ptx.h \
|
||||
$(OBJ_DIR)/eam.ptx $(OBJ_DIR)/eam_ptx.h \
|
||||
$(OBJ_DIR)/buck.ptx $(OBJ_DIR)/buck_ptx.h \
|
||||
$(OBJ_DIR)/buck_coul.ptx $(OBJ_DIR)/buck_coul_ptx.h \
|
||||
$(OBJ_DIR)/buck_coul_long.ptx $(OBJ_DIR)/buck_coul_long_ptx.h \
|
||||
$(OBJ_DIR)/table.ptx $(OBJ_DIR)/table_ptx.h \
|
||||
$(OBJ_DIR)/yukawa.ptx $(OBJ_DIR)/yukawa_ptx.h
|
||||
|
||||
all: $(GPU_LIB) $(EXECS)
|
||||
|
||||
@ -323,15 +336,89 @@ $(OBJ_DIR)/lal_cg_cmm_long.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long.cpp $(O
|
||||
$(OBJ_DIR)/lal_cg_cmm_long_ext.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long_ext.cpp lal_base_charge.h
|
||||
$(CUDR) -o $@ -c lal_cg_cmm_long_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(BIN_DIR)/nvc_get_devices: ./geryon/ucl_get_devices.cpp $(NVC_H)
|
||||
$(CUDR) -o $@ ./geryon/ucl_get_devices.cpp -DUCL_CUDART $(CUDA_LINK)
|
||||
$(OBJ_DIR)/eam.ptx: lal_eam.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --ptx -DNV_KERNEL -o $@ lal_eam.cu
|
||||
|
||||
$(GPU_LIB): $(OBJS)
|
||||
$(AR) -crusv $(GPU_LIB) $(OBJS)
|
||||
$(OBJ_DIR)/eam_ptx.h: $(OBJ_DIR)/eam.ptx $(OBJ_DIR)/eam.ptx
|
||||
$(BSH) ./geryon/file_to_cstr.sh eam $(OBJ_DIR)/eam.ptx $(OBJ_DIR)/eam_ptx.h
|
||||
|
||||
$(OBJ_DIR)/lal_eam.o: $(ALL_H) lal_eam.h lal_eam.cpp $(OBJ_DIR)/eam_ptx.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(CUDR) -o $@ -c lal_eam.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_eam_ext.o: $(ALL_H) lal_eam.h lal_eam_ext.cpp lal_base_atomic.h
|
||||
$(CUDR) -o $@ -c lal_eam_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/buck.ptx: lal_buck.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --ptx -DNV_KERNEL -o $@ lal_buck.cu
|
||||
|
||||
$(OBJ_DIR)/buck_ptx.h: $(OBJ_DIR)/buck.ptx $(OBJ_DIR)/buck.ptx
|
||||
$(BSH) ./geryon/file_to_cstr.sh buck $(OBJ_DIR)/buck.ptx $(OBJ_DIR)/buck_ptx.h
|
||||
|
||||
$(OBJ_DIR)/lal_buck.o: $(ALL_H) lal_buck.h lal_buck.cpp $(OBJ_DIR)/buck_ptx.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(CUDR) -o $@ -c lal_buck.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_buck_ext.o: $(ALL_H) lal_buck.h lal_buck_ext.cpp lal_base_atomic.h
|
||||
$(CUDR) -o $@ -c lal_buck_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/buck_coul.ptx: lal_buck_coul.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --ptx -DNV_KERNEL -o $@ lal_buck_coul.cu
|
||||
|
||||
$(OBJ_DIR)/buck_coul_ptx.h: $(OBJ_DIR)/buck_coul.ptx $(OBJ_DIR)/buck_coul.ptx
|
||||
$(BSH) ./geryon/file_to_cstr.sh buck_coul $(OBJ_DIR)/buck_coul.ptx $(OBJ_DIR)/buck_coul_ptx.h
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul.o: $(ALL_H) lal_buck_coul.h lal_buck_coul.cpp $(OBJ_DIR)/buck_coul_ptx.h $(OBJ_DIR)/lal_base_charge.o
|
||||
$(CUDR) -o $@ -c lal_buck_coul.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul_ext.o: $(ALL_H) lal_buck_coul.h lal_buck_coul_ext.cpp lal_base_charge.h
|
||||
$(CUDR) -o $@ -c lal_buck_coul_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/buck_coul_long.ptx: lal_buck_coul_long.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --ptx -DNV_KERNEL -o $@ lal_buck_coul_long.cu
|
||||
|
||||
$(OBJ_DIR)/buck_coul_long_ptx.h: $(OBJ_DIR)/buck_coul_long.ptx $(OBJ_DIR)/buck_coul_long.ptx
|
||||
$(BSH) ./geryon/file_to_cstr.sh buck_coul_long $(OBJ_DIR)/buck_coul_long.ptx $(OBJ_DIR)/buck_coul_long_ptx.h
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul_long.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long.cpp $(OBJ_DIR)/buck_coul_long_ptx.h $(OBJ_DIR)/lal_base_charge.o
|
||||
$(CUDR) -o $@ -c lal_buck_coul_long.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul_long_ext.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long_ext.cpp lal_base_charge.h
|
||||
$(CUDR) -o $@ -c lal_buck_coul_long_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/table.ptx: lal_table.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --ptx -DNV_KERNEL -o $@ lal_table.cu
|
||||
|
||||
$(OBJ_DIR)/table_ptx.h: $(OBJ_DIR)/table.ptx $(OBJ_DIR)/table.ptx
|
||||
$(BSH) ./geryon/file_to_cstr.sh table $(OBJ_DIR)/table.ptx $(OBJ_DIR)/table_ptx.h
|
||||
|
||||
$(OBJ_DIR)/lal_table.o: $(ALL_H) lal_table.h lal_table.cpp $(OBJ_DIR)/table_ptx.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(CUDR) -o $@ -c lal_table.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_table_ext.o: $(ALL_H) lal_table.h lal_table_ext.cpp lal_base_atomic.h
|
||||
$(CUDR) -o $@ -c lal_table_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/yukawa.ptx: lal_yukawa.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --ptx -DNV_KERNEL -o $@ lal_yukawa.cu
|
||||
|
||||
$(OBJ_DIR)/yukawa_ptx.h: $(OBJ_DIR)/yukawa.ptx $(OBJ_DIR)/yukawa.ptx
|
||||
$(BSH) ./geryon/file_to_cstr.sh yukawa $(OBJ_DIR)/yukawa.ptx $(OBJ_DIR)/yukawa_ptx.h
|
||||
|
||||
$(OBJ_DIR)/lal_yukawa.o: $(ALL_H) lal_yukawa.h lal_yukawa.cpp $(OBJ_DIR)/yukawa_ptx.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(CUDR) -o $@ -c lal_yukawa.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_yukawa_ext.o: $(ALL_H) lal_yukawa.h lal_yukawa_ext.cpp lal_base_atomic.h
|
||||
$(CUDR) -o $@ -c lal_yukawa_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(BIN_DIR)/nvc_get_devices: ./geryon/ucl_get_devices.cpp $(NVD_H)
|
||||
$(CUDR) -o $@ ./geryon/ucl_get_devices.cpp -DUCL_CUDADR $(CUDA_LIB) -lcuda
|
||||
|
||||
$(GPU_LIB): $(OBJS) $(CUDPP)
|
||||
$(AR) -crusv $(GPU_LIB) $(OBJS) $(CUDPP)
|
||||
|
||||
clean:
|
||||
rm -f $(EXECS) $(GPU_LIB) $(OBJS) $(PTXS) *.linkinfo
|
||||
rm -f $(EXECS) $(GPU_LIB) $(OBJS) $(CUDPP) $(PTXS) *.linkinfo
|
||||
|
||||
veryclean: clean
|
||||
rm -rf *~ *.linkinfo
|
||||
|
||||
cleanlib:
|
||||
rm -f $(EXECS) $(GPU_LIB) $(OBJS) $(PTXS) *.linkinfo
|
||||
|
||||
@ -30,7 +30,13 @@ OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_answer.o \
|
||||
$(OBJ_DIR)/lal_morse.o $(OBJ_DIR)/lal_morse_ext.o \
|
||||
$(OBJ_DIR)/lal_charmm_long.o $(OBJ_DIR)/lal_charmm_long_ext.o \
|
||||
$(OBJ_DIR)/lal_cg_cmm.o $(OBJ_DIR)/lal_cg_cmm_ext.o \
|
||||
$(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o
|
||||
$(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o \
|
||||
$(OBJ_DIR)/lal_eam.o $(OBJ_DIR)/lal_eam_ext.o \
|
||||
$(OBJ_DIR)/lal_buck.o $(OBJ_DIR)/lal_buck_ext.o \
|
||||
$(OBJ_DIR)/lal_buck_coul.o $(OBJ_DIR)/lal_buck_coul_ext.o \
|
||||
$(OBJ_DIR)/lal_buck_coul_long.o $(OBJ_DIR)/lal_buck_coul_long_ext.o \
|
||||
$(OBJ_DIR)/lal_table.o $(OBJ_DIR)/lal_table_ext.o \
|
||||
$(OBJ_DIR)/lal_yukawa.o $(OBJ_DIR)/lal_yukawa_ext.o
|
||||
KERS = $(OBJ_DIR)/device_cl.h $(OBJ_DIR)/atom_cl.h \
|
||||
$(OBJ_DIR)/neighbor_cpu_cl.h $(OBJ_DIR)/pppm_cl.h \
|
||||
$(OBJ_DIR)/ellipsoid_nbor_cl.h $(OBJ_DIR)/gayberne_cl.h \
|
||||
@ -40,7 +46,10 @@ KERS = $(OBJ_DIR)/device_cl.h $(OBJ_DIR)/atom_cl.h \
|
||||
$(OBJ_DIR)/lj_coul_long_cl.h $(OBJ_DIR)/lj_class2_long_cl.h \
|
||||
$(OBJ_DIR)/coul_long_cl.h $(OBJ_DIR)/morse_cl.h \
|
||||
$(OBJ_DIR)/charmm_long_cl.h $(OBJ_DIR)/cg_cmm_cl.h \
|
||||
$(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h
|
||||
$(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h \
|
||||
$(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/buck_cl.h \
|
||||
$(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/buck_coul_long_cl.h \
|
||||
$(OBJ_DIR)/table_cl.h $(OBJ_DIR)/yukawa_cl.h
|
||||
|
||||
OCL_EXECS = $(BIN_DIR)/ocl_get_devices
|
||||
|
||||
@ -217,6 +226,60 @@ $(OBJ_DIR)/lal_cg_cmm_long.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long.cpp $(
|
||||
$(OBJ_DIR)/lal_cg_cmm_long_ext.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long_ext.cpp lal_base_charge.h
|
||||
$(OCL) -o $@ -c lal_cg_cmm_long_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/eam_cl.h: lal_eam.cu $(PRE1_H)
|
||||
$(BSH) ./geryon/file_to_cstr.sh eam $(PRE1_H) lal_eam.cu $(OBJ_DIR)/eam_cl.h;
|
||||
|
||||
$(OBJ_DIR)/lal_eam.o: $(ALL_H) lal_eam.h lal_eam.cpp $(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(OCL) -o $@ -c lal_eam.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_eam_ext.o: $(ALL_H) lal_eam.h lal_eam_ext.cpp lal_base_charge.h
|
||||
$(OCL) -o $@ -c lal_eam_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/buck_cl.h: lal_buck.cu $(PRE1_H)
|
||||
$(BSH) ./geryon/file_to_cstr.sh buck $(PRE1_H) lal_buck.cu $(OBJ_DIR)/buck_cl.h;
|
||||
|
||||
$(OBJ_DIR)/lal_buck.o: $(ALL_H) lal_buck.h lal_buck.cpp $(OBJ_DIR)/buck_cl.h $(OBJ_DIR)/buck_cl.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(OCL) -o $@ -c lal_buck.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_buck_ext.o: $(ALL_H) lal_buck.h lal_buck_ext.cpp lal_base_atomic.h
|
||||
$(OCL) -o $@ -c lal_buck_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/buck_coul_cl.h: lal_buck_coul.cu $(PRE1_H)
|
||||
$(BSH) ./geryon/file_to_cstr.sh buck_coul $(PRE1_H) lal_buck_coul.cu $(OBJ_DIR)/buck_coul_cl.h;
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul.o: $(ALL_H) lal_buck_coul.h lal_buck_coul.cpp $(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/lal_base_charge.o
|
||||
$(OCL) -o $@ -c lal_buck_coul.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul_ext.o: $(ALL_H) lal_buck_coul.h lal_buck_coul_ext.cpp lal_base_charge.h
|
||||
$(OCL) -o $@ -c lal_buck_coul_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/buck_coul_long_cl.h: lal_buck_coul_long.cu $(PRE1_H)
|
||||
$(BSH) ./geryon/file_to_cstr.sh buck_coul_long $(PRE1_H) lal_buck_coul_long.cu $(OBJ_DIR)/buck_coul_long_cl.h;
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul_long.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long.cpp $(OBJ_DIR)/buck_coul_long_cl.h $(OBJ_DIR)/buck_coul_long_cl.h $(OBJ_DIR)/lal_base_charge.o
|
||||
$(OCL) -o $@ -c lal_buck_coul_long.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_buck_coul_long_ext.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long_ext.cpp lal_base_charge.h
|
||||
$(OCL) -o $@ -c lal_buck_coul_long_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/table_cl.h: lal_table.cu $(PRE1_H)
|
||||
$(BSH) ./geryon/file_to_cstr.sh table $(PRE1_H) lal_table.cu $(OBJ_DIR)/table_cl.h;
|
||||
|
||||
$(OBJ_DIR)/lal_table.o: $(ALL_H) lal_table.h lal_table.cpp $(OBJ_DIR)/table_cl.h $(OBJ_DIR)/table_cl.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(OCL) -o $@ -c lal_table.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_table_ext.o: $(ALL_H) lal_table.h lal_table_ext.cpp lal_base_atomic.h
|
||||
$(OCL) -o $@ -c lal_table_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/yukawa_cl.h: lal_yukawa.cu $(PRE1_H)
|
||||
$(BSH) ./geryon/file_to_cstr.sh yukawa $(PRE1_H) lal_yukawa.cu $(OBJ_DIR)/yukawa_cl.h;
|
||||
|
||||
$(OBJ_DIR)/lal_yukawa.o: $(ALL_H) lal_yukawa.h lal_yukawa.cpp $(OBJ_DIR)/yukawa_cl.h $(OBJ_DIR)/yukawa_cl.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(OCL) -o $@ -c lal_yukawa.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_yukawa_ext.o: $(ALL_H) lal_yukawa.h lal_yukawa_ext.cpp lal_base_atomic.h
|
||||
$(OCL) -o $@ -c lal_yukawa_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(BIN_DIR)/ocl_get_devices: ./geryon/ucl_get_devices.cpp
|
||||
$(OCL) -o $@ ./geryon/ucl_get_devices.cpp -DUCL_OPENCL $(OCL_LINK)
|
||||
|
||||
|
||||
101
lib/gpu/atom.ptx
Normal file
101
lib/gpu/atom.ptx
Normal file
@ -0,0 +1,101 @@
|
||||
.version 2.3
|
||||
.target sm_20
|
||||
.address_size 64
|
||||
// compiled with /usr/local/cuda/open64/lib//be
|
||||
// nvopencc 4.0 built on 2011-05-12
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Compiling /tmp/tmpxft_000099dd_00000000-9_lal_atom.cpp3.i (/home/sjplimp/ccBI#.Q6OzuV)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Options:
|
||||
//-----------------------------------------------------------
|
||||
// Target:ptx, ISA:sm_20, Endian:little, Pointer Size:64
|
||||
// -O3 (Optimization level)
|
||||
// -g0 (Debug level)
|
||||
// -m2 (Report advisories)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
.file 1 "<command-line>"
|
||||
.file 2 "/tmp/tmpxft_000099dd_00000000-8_lal_atom.cudafe2.gpu"
|
||||
.file 3 "/usr/lib/gcc/x86_64-redhat-linux/4.4.5/include/stddef.h"
|
||||
.file 4 "/usr/local/cuda/include/crt/device_runtime.h"
|
||||
.file 5 "/usr/local/cuda/include/host_defines.h"
|
||||
.file 6 "/usr/local/cuda/include/builtin_types.h"
|
||||
.file 7 "/usr/local/cuda/include/device_types.h"
|
||||
.file 8 "/usr/local/cuda/include/driver_types.h"
|
||||
.file 9 "/usr/local/cuda/include/surface_types.h"
|
||||
.file 10 "/usr/local/cuda/include/texture_types.h"
|
||||
.file 11 "/usr/local/cuda/include/vector_types.h"
|
||||
.file 12 "/usr/local/cuda/include/device_launch_parameters.h"
|
||||
.file 13 "/usr/local/cuda/include/crt/storage_class.h"
|
||||
.file 14 "/usr/include/bits/types.h"
|
||||
.file 15 "/usr/include/time.h"
|
||||
.file 16 "lal_atom.cu"
|
||||
.file 17 "/usr/local/cuda/include/common_functions.h"
|
||||
.file 18 "/usr/local/cuda/include/math_functions.h"
|
||||
.file 19 "/usr/local/cuda/include/math_constants.h"
|
||||
.file 20 "/usr/local/cuda/include/device_functions.h"
|
||||
.file 21 "/usr/local/cuda/include/sm_11_atomic_functions.h"
|
||||
.file 22 "/usr/local/cuda/include/sm_12_atomic_functions.h"
|
||||
.file 23 "/usr/local/cuda/include/sm_13_double_functions.h"
|
||||
.file 24 "/usr/local/cuda/include/sm_20_atomic_functions.h"
|
||||
.file 25 "/usr/local/cuda/include/sm_20_intrinsics.h"
|
||||
.file 26 "/usr/local/cuda/include/surface_functions.h"
|
||||
.file 27 "/usr/local/cuda/include/texture_fetch_functions.h"
|
||||
.file 28 "/usr/local/cuda/include/math_functions_dbl_ptx3.h"
|
||||
|
||||
|
||||
.entry kernel_cast_x (
|
||||
.param .u64 __cudaparm_kernel_cast_x_x_type,
|
||||
.param .u64 __cudaparm_kernel_cast_x_x,
|
||||
.param .u64 __cudaparm_kernel_cast_x_type,
|
||||
.param .s32 __cudaparm_kernel_cast_x_nall)
|
||||
{
|
||||
.reg .u32 %r<10>;
|
||||
.reg .u64 %rd<13>;
|
||||
.reg .f32 %f<6>;
|
||||
.reg .f64 %fd<5>;
|
||||
.reg .pred %p<3>;
|
||||
.loc 16 21 0
|
||||
$LDWbegin_kernel_cast_x:
|
||||
cvt.s32.u32 %r1, %ctaid.x;
|
||||
cvt.s32.u32 %r2, %ntid.x;
|
||||
mul24.lo.s32 %r3, %r1, %r2;
|
||||
mov.u32 %r4, %tid.x;
|
||||
add.u32 %r5, %r3, %r4;
|
||||
ld.param.s32 %r6, [__cudaparm_kernel_cast_x_nall];
|
||||
setp.le.s32 %p1, %r6, %r5;
|
||||
@%p1 bra $Lt_0_1026;
|
||||
.loc 16 26 0
|
||||
cvt.s64.s32 %rd1, %r5;
|
||||
ld.param.u64 %rd2, [__cudaparm_kernel_cast_x_type];
|
||||
mul.wide.s32 %rd3, %r5, 4;
|
||||
add.u64 %rd4, %rd2, %rd3;
|
||||
ld.global.s32 %r7, [%rd4+0];
|
||||
cvt.rn.f32.s32 %f1, %r7;
|
||||
.loc 16 29 0
|
||||
ld.param.u64 %rd5, [__cudaparm_kernel_cast_x_x];
|
||||
mul.lo.s32 %r8, %r5, 3;
|
||||
cvt.s64.s32 %rd6, %r8;
|
||||
mul.wide.s32 %rd7, %r8, 8;
|
||||
add.u64 %rd8, %rd5, %rd7;
|
||||
ld.global.f64 %fd1, [%rd8+8];
|
||||
cvt.rn.ftz.f32.f64 %f2, %fd1;
|
||||
.loc 16 30 0
|
||||
ld.global.f64 %fd2, [%rd8+16];
|
||||
cvt.rn.ftz.f32.f64 %f3, %fd2;
|
||||
.loc 16 31 0
|
||||
ld.param.u64 %rd9, [__cudaparm_kernel_cast_x_x_type];
|
||||
mul.wide.s32 %rd10, %r5, 16;
|
||||
add.u64 %rd11, %rd9, %rd10;
|
||||
ld.global.f64 %fd3, [%rd8+0];
|
||||
cvt.rn.ftz.f32.f64 %f4, %fd3;
|
||||
st.global.v4.f32 [%rd11+0], {%f4,%f2,%f3,%f1};
|
||||
$Lt_0_1026:
|
||||
.loc 16 33 0
|
||||
exit;
|
||||
$LDWend_kernel_cast_x:
|
||||
} // kernel_cast_x
|
||||
|
||||
56
lib/gpu/atom_ptx.h
Normal file
56
lib/gpu/atom_ptx.h
Normal file
@ -0,0 +1,56 @@
|
||||
const char * atom =
|
||||
" .version 2.3\n"
|
||||
" .target sm_20\n"
|
||||
" .address_size 64\n"
|
||||
" .entry kernel_cast_x (\n"
|
||||
" .param .u64 __cudaparm_kernel_cast_x_x_type,\n"
|
||||
" .param .u64 __cudaparm_kernel_cast_x_x,\n"
|
||||
" .param .u64 __cudaparm_kernel_cast_x_type,\n"
|
||||
" .param .s32 __cudaparm_kernel_cast_x_nall)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<10>;\n"
|
||||
" .reg .u64 %rd<13>;\n"
|
||||
" .reg .f32 %f<6>;\n"
|
||||
" .reg .f64 %fd<5>;\n"
|
||||
" .reg .pred %p<3>;\n"
|
||||
" .loc 16 21 0\n"
|
||||
"$LDWbegin_kernel_cast_x:\n"
|
||||
" cvt.s32.u32 %r1, %ctaid.x;\n"
|
||||
" cvt.s32.u32 %r2, %ntid.x;\n"
|
||||
" mul24.lo.s32 %r3, %r1, %r2;\n"
|
||||
" mov.u32 %r4, %tid.x;\n"
|
||||
" add.u32 %r5, %r3, %r4;\n"
|
||||
" ld.param.s32 %r6, [__cudaparm_kernel_cast_x_nall];\n"
|
||||
" setp.le.s32 %p1, %r6, %r5;\n"
|
||||
" @%p1 bra $Lt_0_1026;\n"
|
||||
" .loc 16 26 0\n"
|
||||
" cvt.s64.s32 %rd1, %r5;\n"
|
||||
" ld.param.u64 %rd2, [__cudaparm_kernel_cast_x_type];\n"
|
||||
" mul.wide.s32 %rd3, %r5, 4;\n"
|
||||
" add.u64 %rd4, %rd2, %rd3;\n"
|
||||
" ld.global.s32 %r7, [%rd4+0];\n"
|
||||
" cvt.rn.f32.s32 %f1, %r7;\n"
|
||||
" .loc 16 29 0\n"
|
||||
" ld.param.u64 %rd5, [__cudaparm_kernel_cast_x_x];\n"
|
||||
" mul.lo.s32 %r8, %r5, 3;\n"
|
||||
" cvt.s64.s32 %rd6, %r8;\n"
|
||||
" mul.wide.s32 %rd7, %r8, 8;\n"
|
||||
" add.u64 %rd8, %rd5, %rd7;\n"
|
||||
" ld.global.f64 %fd1, [%rd8+8];\n"
|
||||
" cvt.rn.ftz.f32.f64 %f2, %fd1;\n"
|
||||
" .loc 16 30 0\n"
|
||||
" ld.global.f64 %fd2, [%rd8+16];\n"
|
||||
" cvt.rn.ftz.f32.f64 %f3, %fd2;\n"
|
||||
" .loc 16 31 0\n"
|
||||
" ld.param.u64 %rd9, [__cudaparm_kernel_cast_x_x_type];\n"
|
||||
" mul.wide.s32 %rd10, %r5, 16;\n"
|
||||
" add.u64 %rd11, %rd9, %rd10;\n"
|
||||
" ld.global.f64 %fd3, [%rd8+0];\n"
|
||||
" cvt.rn.ftz.f32.f64 %f4, %fd3;\n"
|
||||
" st.global.v4.f32 [%rd11+0], {%f4,%f2,%f3,%f1};\n"
|
||||
"$Lt_0_1026:\n"
|
||||
" .loc 16 33 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_cast_x:\n"
|
||||
" }\n"
|
||||
;
|
||||
958
lib/gpu/cg_cmm.ptx
Normal file
958
lib/gpu/cg_cmm.ptx
Normal file
@ -0,0 +1,958 @@
|
||||
.version 2.3
|
||||
.target sm_20
|
||||
.address_size 64
|
||||
// compiled with /usr/local/cuda/open64/lib//be
|
||||
// nvopencc 4.0 built on 2011-05-12
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Compiling /tmp/tmpxft_00009eb0_00000000-9_lal_cg_cmm.cpp3.i (/home/sjplimp/ccBI#.oK8Qzh)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Options:
|
||||
//-----------------------------------------------------------
|
||||
// Target:ptx, ISA:sm_20, Endian:little, Pointer Size:64
|
||||
// -O3 (Optimization level)
|
||||
// -g0 (Debug level)
|
||||
// -m2 (Report advisories)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
.file 1 "<command-line>"
|
||||
.file 2 "/tmp/tmpxft_00009eb0_00000000-8_lal_cg_cmm.cudafe2.gpu"
|
||||
.file 3 "/usr/lib/gcc/x86_64-redhat-linux/4.4.5/include/stddef.h"
|
||||
.file 4 "/usr/local/cuda/include/crt/device_runtime.h"
|
||||
.file 5 "/usr/local/cuda/include/host_defines.h"
|
||||
.file 6 "/usr/local/cuda/include/builtin_types.h"
|
||||
.file 7 "/usr/local/cuda/include/device_types.h"
|
||||
.file 8 "/usr/local/cuda/include/driver_types.h"
|
||||
.file 9 "/usr/local/cuda/include/surface_types.h"
|
||||
.file 10 "/usr/local/cuda/include/texture_types.h"
|
||||
.file 11 "/usr/local/cuda/include/vector_types.h"
|
||||
.file 12 "/usr/local/cuda/include/device_launch_parameters.h"
|
||||
.file 13 "/usr/local/cuda/include/crt/storage_class.h"
|
||||
.file 14 "/usr/include/bits/types.h"
|
||||
.file 15 "/usr/include/time.h"
|
||||
.file 16 "lal_cg_cmm.cu"
|
||||
.file 17 "/usr/local/cuda/include/common_functions.h"
|
||||
.file 18 "/usr/local/cuda/include/math_functions.h"
|
||||
.file 19 "/usr/local/cuda/include/math_constants.h"
|
||||
.file 20 "/usr/local/cuda/include/device_functions.h"
|
||||
.file 21 "/usr/local/cuda/include/sm_11_atomic_functions.h"
|
||||
.file 22 "/usr/local/cuda/include/sm_12_atomic_functions.h"
|
||||
.file 23 "/usr/local/cuda/include/sm_13_double_functions.h"
|
||||
.file 24 "/usr/local/cuda/include/sm_20_atomic_functions.h"
|
||||
.file 25 "/usr/local/cuda/include/sm_20_intrinsics.h"
|
||||
.file 26 "/usr/local/cuda/include/surface_functions.h"
|
||||
.file 27 "/usr/local/cuda/include/texture_fetch_functions.h"
|
||||
.file 28 "/usr/local/cuda/include/math_functions_dbl_ptx3.h"
|
||||
|
||||
.global .texref pos_tex;
|
||||
|
||||
.entry kernel_pair (
|
||||
.param .u64 __cudaparm_kernel_pair_x_,
|
||||
.param .u64 __cudaparm_kernel_pair_lj1,
|
||||
.param .u64 __cudaparm_kernel_pair_lj3,
|
||||
.param .s32 __cudaparm_kernel_pair_lj_types,
|
||||
.param .u64 __cudaparm_kernel_pair_sp_lj_in,
|
||||
.param .u64 __cudaparm_kernel_pair_dev_nbor,
|
||||
.param .u64 __cudaparm_kernel_pair_dev_packed,
|
||||
.param .u64 __cudaparm_kernel_pair_ans,
|
||||
.param .u64 __cudaparm_kernel_pair___val_paramengv,
|
||||
.param .s32 __cudaparm_kernel_pair_eflag,
|
||||
.param .s32 __cudaparm_kernel_pair_vflag,
|
||||
.param .s32 __cudaparm_kernel_pair_inum,
|
||||
.param .s32 __cudaparm_kernel_pair_nbor_pitch,
|
||||
.param .s32 __cudaparm_kernel_pair_t_per_atom)
|
||||
{
|
||||
.reg .u32 %r<72>;
|
||||
.reg .u64 %rd<63>;
|
||||
.reg .f32 %f<111>;
|
||||
.reg .pred %p<21>;
|
||||
.shared .align 16 .b8 __cuda___cuda_local_var_32536_33_non_const_sp_lj92[16];
|
||||
.shared .align 4 .b8 __cuda___cuda_local_var_32608_55_non_const_red_acc108[3072];
|
||||
// __cuda_local_var_32543_10_non_const_f = 48
|
||||
// __cuda_local_var_32545_9_non_const_virial = 16
|
||||
.loc 16 31 0
|
||||
$LDWbegin_kernel_pair:
|
||||
.loc 16 36 0
|
||||
ld.param.u64 %rd1, [__cudaparm_kernel_pair_sp_lj_in];
|
||||
ldu.global.f32 %f1, [%rd1+0];
|
||||
.loc 16 37 0
|
||||
ld.global.f32 %f2, [%rd1+4];
|
||||
.loc 16 38 0
|
||||
ld.global.f32 %f3, [%rd1+8];
|
||||
.loc 16 39 0
|
||||
ld.global.f32 %f4, [%rd1+12];
|
||||
st.shared.v4.f32 [__cuda___cuda_local_var_32536_33_non_const_sp_lj92+0], {%f1,%f2,%f3,%f4};
|
||||
.loc 16 46 0
|
||||
mov.f32 %f5, 0f00000000; // 0
|
||||
mov.f32 %f6, %f5;
|
||||
mov.f32 %f7, 0f00000000; // 0
|
||||
mov.f32 %f8, %f7;
|
||||
mov.f32 %f9, 0f00000000; // 0
|
||||
mov.f32 %f10, %f9;
|
||||
mov.f32 %f11, 0f00000000; // 0
|
||||
mov.f32 %f12, %f11;
|
||||
mov.f32 %f13, 0f00000000; // 0
|
||||
mov.f32 %f14, %f13;
|
||||
mov.f32 %f15, 0f00000000; // 0
|
||||
mov.f32 %f16, %f15;
|
||||
ld.param.s32 %r1, [__cudaparm_kernel_pair_t_per_atom];
|
||||
cvt.s32.u32 %r2, %tid.x;
|
||||
div.s32 %r3, %r2, %r1;
|
||||
cvt.s32.u32 %r4, %ntid.x;
|
||||
div.s32 %r5, %r4, %r1;
|
||||
cvt.s32.u32 %r6, %ctaid.x;
|
||||
mul.lo.s32 %r7, %r6, %r5;
|
||||
add.s32 %r8, %r3, %r7;
|
||||
ld.param.s32 %r9, [__cudaparm_kernel_pair_inum];
|
||||
setp.ge.s32 %p1, %r8, %r9;
|
||||
@%p1 bra $Lt_0_28930;
|
||||
.loc 16 51 0
|
||||
ld.param.s32 %r10, [__cudaparm_kernel_pair_nbor_pitch];
|
||||
cvt.s64.s32 %rd2, %r10;
|
||||
mul.wide.s32 %rd3, %r10, 4;
|
||||
cvt.s64.s32 %rd4, %r8;
|
||||
mul.wide.s32 %rd5, %r8, 4;
|
||||
ld.param.u64 %rd6, [__cudaparm_kernel_pair_dev_nbor];
|
||||
add.u64 %rd7, %rd5, %rd6;
|
||||
add.u64 %rd8, %rd3, %rd7;
|
||||
ld.global.s32 %r11, [%rd8+0];
|
||||
sub.s32 %r12, %r1, 1;
|
||||
and.b32 %r13, %r12, %r2;
|
||||
cvt.s64.s32 %rd9, %r13;
|
||||
mul.wide.s32 %rd10, %r13, 4;
|
||||
ld.param.u64 %rd11, [__cudaparm_kernel_pair_dev_packed];
|
||||
setp.ne.u64 %p2, %rd11, %rd6;
|
||||
@%p2 bra $Lt_0_20994;
|
||||
cvt.s32.s64 %r14, %rd2;
|
||||
mul.lo.s32 %r15, %r14, %r1;
|
||||
mov.s32 %r16, %r15;
|
||||
mul.lo.s32 %r17, %r12, %r8;
|
||||
add.s32 %r18, %r14, %r17;
|
||||
cvt.s64.s32 %rd12, %r18;
|
||||
mul.wide.s32 %rd13, %r18, 4;
|
||||
add.u64 %rd14, %rd8, %rd13;
|
||||
and.b32 %r19, %r12, %r11;
|
||||
cvt.s64.s32 %rd15, %r19;
|
||||
div.s32 %r20, %r11, %r1;
|
||||
mul.lo.s32 %r21, %r15, %r20;
|
||||
cvt.s64.s32 %rd16, %r21;
|
||||
add.u64 %rd17, %rd15, %rd16;
|
||||
mul.lo.u64 %rd18, %rd17, 4;
|
||||
add.u64 %rd19, %rd14, %rd18;
|
||||
add.u64 %rd20, %rd10, %rd14;
|
||||
bra.uni $Lt_0_20738;
|
||||
$Lt_0_20994:
|
||||
add.u64 %rd21, %rd3, %rd8;
|
||||
ld.global.s32 %r22, [%rd21+0];
|
||||
cvt.s64.s32 %rd22, %r22;
|
||||
mul.wide.s32 %rd23, %r22, 4;
|
||||
add.u64 %rd24, %rd11, %rd23;
|
||||
cvt.s64.s32 %rd25, %r11;
|
||||
mul.wide.s32 %rd26, %r11, 4;
|
||||
add.u64 %rd19, %rd24, %rd26;
|
||||
mov.s32 %r16, %r1;
|
||||
add.u64 %rd20, %rd10, %rd24;
|
||||
$Lt_0_20738:
|
||||
.loc 16 54 0
|
||||
ld.global.s32 %r23, [%rd7+0];
|
||||
mov.u32 %r24, %r23;
|
||||
mov.s32 %r25, 0;
|
||||
mov.u32 %r26, %r25;
|
||||
mov.s32 %r27, 0;
|
||||
mov.u32 %r28, %r27;
|
||||
mov.s32 %r29, 0;
|
||||
mov.u32 %r30, %r29;
|
||||
tex.1d.v4.f32.s32 {%f17,%f18,%f19,%f20},[pos_tex,{%r24,%r26,%r28,%r30}];
|
||||
mov.f32 %f21, %f17;
|
||||
mov.f32 %f22, %f18;
|
||||
mov.f32 %f23, %f19;
|
||||
mov.f32 %f24, %f20;
|
||||
setp.ge.u64 %p3, %rd20, %rd19;
|
||||
@%p3 bra $Lt_0_30466;
|
||||
cvt.rzi.ftz.s32.f32 %r31, %f24;
|
||||
cvt.s64.s32 %rd27, %r16;
|
||||
ld.param.s32 %r32, [__cudaparm_kernel_pair_lj_types];
|
||||
mul.lo.s32 %r33, %r32, %r31;
|
||||
ld.param.u64 %rd28, [__cudaparm_kernel_pair_lj1];
|
||||
mov.f32 %f25, 0f00000000; // 0
|
||||
mov.f32 %f26, 0f00000000; // 0
|
||||
mov.f32 %f27, 0f00000000; // 0
|
||||
mov.f32 %f28, 0f00000000; // 0
|
||||
mov.u64 %rd29, __cuda___cuda_local_var_32536_33_non_const_sp_lj92;
|
||||
$Lt_0_21762:
|
||||
//<loop> Loop body line 54, nesting depth: 1, estimated iterations: unknown
|
||||
.loc 16 60 0
|
||||
ld.global.s32 %r34, [%rd20+0];
|
||||
.loc 16 61 0
|
||||
shr.s32 %r35, %r34, 30;
|
||||
and.b32 %r36, %r35, 3;
|
||||
cvt.s64.s32 %rd30, %r36;
|
||||
mul.wide.s32 %rd31, %r36, 4;
|
||||
add.u64 %rd32, %rd29, %rd31;
|
||||
ld.shared.f32 %f29, [%rd32+0];
|
||||
.loc 16 64 0
|
||||
and.b32 %r37, %r34, 1073741823;
|
||||
mov.u32 %r38, %r37;
|
||||
mov.s32 %r39, 0;
|
||||
mov.u32 %r40, %r39;
|
||||
mov.s32 %r41, 0;
|
||||
mov.u32 %r42, %r41;
|
||||
mov.s32 %r43, 0;
|
||||
mov.u32 %r44, %r43;
|
||||
tex.1d.v4.f32.s32 {%f30,%f31,%f32,%f33},[pos_tex,{%r38,%r40,%r42,%r44}];
|
||||
mov.f32 %f34, %f30;
|
||||
mov.f32 %f35, %f31;
|
||||
mov.f32 %f36, %f32;
|
||||
mov.f32 %f37, %f33;
|
||||
cvt.rzi.ftz.s32.f32 %r45, %f37;
|
||||
sub.ftz.f32 %f38, %f22, %f35;
|
||||
sub.ftz.f32 %f39, %f21, %f34;
|
||||
sub.ftz.f32 %f40, %f23, %f36;
|
||||
mul.ftz.f32 %f41, %f38, %f38;
|
||||
fma.rn.ftz.f32 %f42, %f39, %f39, %f41;
|
||||
fma.rn.ftz.f32 %f43, %f40, %f40, %f42;
|
||||
add.s32 %r46, %r45, %r33;
|
||||
cvt.s64.s32 %rd33, %r46;
|
||||
mul.wide.s32 %rd34, %r46, 16;
|
||||
add.u64 %rd35, %rd34, %rd28;
|
||||
ld.global.f32 %f44, [%rd35+0];
|
||||
setp.gt.ftz.f32 %p4, %f44, %f43;
|
||||
@!%p4 bra $Lt_0_24066;
|
||||
rcp.approx.ftz.f32 %f45, %f43;
|
||||
ld.global.f32 %f46, [%rd35+4];
|
||||
mov.f32 %f47, 0f40000000; // 2
|
||||
setp.eq.ftz.f32 %p5, %f46, %f47;
|
||||
@!%p5 bra $Lt_0_22786;
|
||||
.loc 16 79 0
|
||||
mul.ftz.f32 %f48, %f45, %f45;
|
||||
mov.f32 %f49, %f48;
|
||||
.loc 16 80 0
|
||||
mul.ftz.f32 %f50, %f48, %f48;
|
||||
bra.uni $Lt_0_23042;
|
||||
$Lt_0_22786:
|
||||
mov.f32 %f51, 0f3f800000; // 1
|
||||
setp.eq.ftz.f32 %p6, %f46, %f51;
|
||||
@!%p6 bra $Lt_0_23298;
|
||||
.loc 16 82 0
|
||||
sqrt.approx.ftz.f32 %f52, %f45;
|
||||
mul.ftz.f32 %f53, %f45, %f52;
|
||||
mov.f32 %f50, %f53;
|
||||
.loc 16 83 0
|
||||
mul.ftz.f32 %f49, %f53, %f53;
|
||||
bra.uni $Lt_0_23042;
|
||||
$Lt_0_23298:
|
||||
.loc 16 85 0
|
||||
mul.ftz.f32 %f54, %f45, %f45;
|
||||
mul.ftz.f32 %f55, %f45, %f54;
|
||||
mov.f32 %f49, %f55;
|
||||
.loc 16 86 0
|
||||
mov.f32 %f50, %f55;
|
||||
$Lt_0_23042:
|
||||
$Lt_0_22530:
|
||||
.loc 16 88 0
|
||||
mul.ftz.f32 %f56, %f45, %f29;
|
||||
mul.ftz.f32 %f57, %f49, %f56;
|
||||
ld.global.v2.f32 {%f58,%f59}, [%rd35+8];
|
||||
mul.ftz.f32 %f60, %f58, %f50;
|
||||
sub.ftz.f32 %f61, %f60, %f59;
|
||||
mul.ftz.f32 %f62, %f57, %f61;
|
||||
.loc 16 90 0
|
||||
fma.rn.ftz.f32 %f27, %f39, %f62, %f27;
|
||||
.loc 16 91 0
|
||||
fma.rn.ftz.f32 %f26, %f38, %f62, %f26;
|
||||
.loc 16 92 0
|
||||
fma.rn.ftz.f32 %f25, %f40, %f62, %f25;
|
||||
ld.param.s32 %r47, [__cudaparm_kernel_pair_eflag];
|
||||
mov.u32 %r48, 0;
|
||||
setp.le.s32 %p7, %r47, %r48;
|
||||
@%p7 bra $Lt_0_23554;
|
||||
.loc 16 94 0
|
||||
ld.param.u64 %rd36, [__cudaparm_kernel_pair_lj3];
|
||||
add.u64 %rd37, %rd36, %rd34;
|
||||
ld.global.v4.f32 {%f63,%f64,%f65,_}, [%rd37+0];
|
||||
mul.ftz.f32 %f66, %f29, %f49;
|
||||
mul.ftz.f32 %f67, %f63, %f50;
|
||||
sub.ftz.f32 %f68, %f67, %f64;
|
||||
mul.ftz.f32 %f69, %f66, %f68;
|
||||
sub.ftz.f32 %f70, %f69, %f65;
|
||||
add.ftz.f32 %f28, %f28, %f70;
|
||||
$Lt_0_23554:
|
||||
ld.param.s32 %r49, [__cudaparm_kernel_pair_vflag];
|
||||
mov.u32 %r50, 0;
|
||||
setp.le.s32 %p8, %r49, %r50;
|
||||
@%p8 bra $Lt_0_24066;
|
||||
.loc 16 97 0
|
||||
mov.f32 %f71, %f6;
|
||||
mul.ftz.f32 %f72, %f39, %f39;
|
||||
fma.rn.ftz.f32 %f73, %f62, %f72, %f71;
|
||||
mov.f32 %f6, %f73;
|
||||
.loc 16 98 0
|
||||
mov.f32 %f74, %f8;
|
||||
fma.rn.ftz.f32 %f75, %f62, %f41, %f74;
|
||||
mov.f32 %f8, %f75;
|
||||
.loc 16 99 0
|
||||
mov.f32 %f76, %f10;
|
||||
mul.ftz.f32 %f77, %f40, %f40;
|
||||
fma.rn.ftz.f32 %f78, %f62, %f77, %f76;
|
||||
mov.f32 %f10, %f78;
|
||||
.loc 16 100 0
|
||||
mov.f32 %f79, %f12;
|
||||
mul.ftz.f32 %f80, %f38, %f39;
|
||||
fma.rn.ftz.f32 %f81, %f62, %f80, %f79;
|
||||
mov.f32 %f12, %f81;
|
||||
.loc 16 101 0
|
||||
mov.f32 %f82, %f14;
|
||||
mul.ftz.f32 %f83, %f39, %f40;
|
||||
fma.rn.ftz.f32 %f84, %f62, %f83, %f82;
|
||||
mov.f32 %f14, %f84;
|
||||
.loc 16 102 0
|
||||
mul.ftz.f32 %f85, %f38, %f40;
|
||||
fma.rn.ftz.f32 %f15, %f62, %f85, %f15;
|
||||
mov.f32 %f16, %f15;
|
||||
$Lt_0_24066:
|
||||
$Lt_0_22018:
|
||||
.loc 16 58 0
|
||||
mul.lo.u64 %rd38, %rd27, 4;
|
||||
add.u64 %rd20, %rd20, %rd38;
|
||||
setp.lt.u64 %p9, %rd20, %rd19;
|
||||
@%p9 bra $Lt_0_21762;
|
||||
bra.uni $Lt_0_21250;
|
||||
$Lt_0_30466:
|
||||
mov.f32 %f25, 0f00000000; // 0
|
||||
mov.f32 %f26, 0f00000000; // 0
|
||||
mov.f32 %f27, 0f00000000; // 0
|
||||
mov.f32 %f28, 0f00000000; // 0
|
||||
$Lt_0_21250:
|
||||
mov.u32 %r51, 1;
|
||||
setp.le.s32 %p10, %r1, %r51;
|
||||
@%p10 bra $Lt_0_26882;
|
||||
.loc 16 107 0
|
||||
mov.u64 %rd39, __cuda___cuda_local_var_32608_55_non_const_red_acc108;
|
||||
cvt.s64.s32 %rd40, %r2;
|
||||
mul.wide.s32 %rd41, %r2, 4;
|
||||
add.u64 %rd42, %rd39, %rd41;
|
||||
mov.f32 %f86, %f27;
|
||||
st.shared.f32 [%rd42+0], %f86;
|
||||
mov.f32 %f87, %f26;
|
||||
st.shared.f32 [%rd42+512], %f87;
|
||||
mov.f32 %f88, %f25;
|
||||
st.shared.f32 [%rd42+1024], %f88;
|
||||
mov.f32 %f89, %f28;
|
||||
st.shared.f32 [%rd42+1536], %f89;
|
||||
shr.s32 %r52, %r1, 31;
|
||||
mov.s32 %r53, 1;
|
||||
and.b32 %r54, %r52, %r53;
|
||||
add.s32 %r55, %r54, %r1;
|
||||
shr.s32 %r56, %r55, 1;
|
||||
mov.s32 %r57, %r56;
|
||||
mov.u32 %r58, 0;
|
||||
setp.ne.u32 %p11, %r56, %r58;
|
||||
@!%p11 bra $Lt_0_25346;
|
||||
$Lt_0_25858:
|
||||
setp.ge.u32 %p12, %r13, %r57;
|
||||
@%p12 bra $Lt_0_26114;
|
||||
add.u32 %r59, %r2, %r57;
|
||||
cvt.u64.u32 %rd43, %r59;
|
||||
mul.wide.u32 %rd44, %r59, 4;
|
||||
add.u64 %rd45, %rd39, %rd44;
|
||||
ld.shared.f32 %f90, [%rd45+0];
|
||||
add.ftz.f32 %f86, %f90, %f86;
|
||||
st.shared.f32 [%rd42+0], %f86;
|
||||
ld.shared.f32 %f91, [%rd45+512];
|
||||
add.ftz.f32 %f87, %f91, %f87;
|
||||
st.shared.f32 [%rd42+512], %f87;
|
||||
ld.shared.f32 %f92, [%rd45+1024];
|
||||
add.ftz.f32 %f88, %f92, %f88;
|
||||
st.shared.f32 [%rd42+1024], %f88;
|
||||
ld.shared.f32 %f93, [%rd45+1536];
|
||||
add.ftz.f32 %f89, %f93, %f89;
|
||||
st.shared.f32 [%rd42+1536], %f89;
|
||||
$Lt_0_26114:
|
||||
shr.u32 %r57, %r57, 1;
|
||||
mov.u32 %r60, 0;
|
||||
setp.ne.u32 %p13, %r57, %r60;
|
||||
@%p13 bra $Lt_0_25858;
|
||||
$Lt_0_25346:
|
||||
mov.f32 %f27, %f86;
|
||||
mov.f32 %f26, %f87;
|
||||
mov.f32 %f25, %f88;
|
||||
mov.f32 %f28, %f89;
|
||||
ld.param.s32 %r61, [__cudaparm_kernel_pair_vflag];
|
||||
mov.u32 %r62, 0;
|
||||
setp.le.s32 %p14, %r61, %r62;
|
||||
@%p14 bra $Lt_0_26882;
|
||||
mov.f32 %f86, %f6;
|
||||
st.shared.f32 [%rd42+0], %f86;
|
||||
mov.f32 %f87, %f8;
|
||||
st.shared.f32 [%rd42+512], %f87;
|
||||
mov.f32 %f88, %f10;
|
||||
st.shared.f32 [%rd42+1024], %f88;
|
||||
mov.f32 %f89, %f12;
|
||||
st.shared.f32 [%rd42+1536], %f89;
|
||||
mov.f32 %f94, %f14;
|
||||
st.shared.f32 [%rd42+2048], %f94;
|
||||
mov.f32 %f95, %f15;
|
||||
st.shared.f32 [%rd42+2560], %f95;
|
||||
mov.s32 %r63, %r56;
|
||||
@!%p11 bra $Lt_0_27394;
|
||||
$Lt_0_27906:
|
||||
setp.ge.u32 %p15, %r13, %r63;
|
||||
@%p15 bra $Lt_0_28162;
|
||||
add.u32 %r64, %r2, %r63;
|
||||
cvt.u64.u32 %rd46, %r64;
|
||||
mul.wide.u32 %rd47, %r64, 4;
|
||||
add.u64 %rd48, %rd39, %rd47;
|
||||
ld.shared.f32 %f96, [%rd48+0];
|
||||
add.ftz.f32 %f86, %f96, %f86;
|
||||
st.shared.f32 [%rd42+0], %f86;
|
||||
ld.shared.f32 %f97, [%rd48+512];
|
||||
add.ftz.f32 %f87, %f97, %f87;
|
||||
st.shared.f32 [%rd42+512], %f87;
|
||||
ld.shared.f32 %f98, [%rd48+1024];
|
||||
add.ftz.f32 %f88, %f98, %f88;
|
||||
st.shared.f32 [%rd42+1024], %f88;
|
||||
ld.shared.f32 %f99, [%rd48+1536];
|
||||
add.ftz.f32 %f89, %f99, %f89;
|
||||
st.shared.f32 [%rd42+1536], %f89;
|
||||
ld.shared.f32 %f100, [%rd48+2048];
|
||||
add.ftz.f32 %f94, %f100, %f94;
|
||||
st.shared.f32 [%rd42+2048], %f94;
|
||||
ld.shared.f32 %f101, [%rd48+2560];
|
||||
add.ftz.f32 %f95, %f101, %f95;
|
||||
st.shared.f32 [%rd42+2560], %f95;
|
||||
$Lt_0_28162:
|
||||
shr.u32 %r63, %r63, 1;
|
||||
mov.u32 %r65, 0;
|
||||
setp.ne.u32 %p16, %r63, %r65;
|
||||
@%p16 bra $Lt_0_27906;
|
||||
$Lt_0_27394:
|
||||
mov.f32 %f6, %f86;
|
||||
mov.f32 %f8, %f87;
|
||||
mov.f32 %f10, %f88;
|
||||
mov.f32 %f12, %f89;
|
||||
mov.f32 %f14, %f94;
|
||||
mov.f32 %f16, %f95;
|
||||
$Lt_0_26882:
|
||||
$Lt_0_24834:
|
||||
mov.u32 %r66, 0;
|
||||
setp.ne.s32 %p17, %r13, %r66;
|
||||
@%p17 bra $Lt_0_28930;
|
||||
ld.param.u64 %rd49, [__cudaparm_kernel_pair___val_paramengv];
|
||||
add.u64 %rd50, %rd49, %rd5;
|
||||
ld.param.s32 %r67, [__cudaparm_kernel_pair_eflag];
|
||||
mov.u32 %r68, 0;
|
||||
setp.le.s32 %p18, %r67, %r68;
|
||||
@%p18 bra $Lt_0_29442;
|
||||
st.global.f32 [%rd50+0], %f28;
|
||||
cvt.s64.s32 %rd51, %r9;
|
||||
mul.wide.s32 %rd52, %r9, 4;
|
||||
add.u64 %rd50, %rd50, %rd52;
|
||||
$Lt_0_29442:
|
||||
ld.param.s32 %r69, [__cudaparm_kernel_pair_vflag];
|
||||
mov.u32 %r70, 0;
|
||||
setp.le.s32 %p19, %r69, %r70;
|
||||
@%p19 bra $Lt_0_29954;
|
||||
mov.f32 %f102, %f6;
|
||||
st.global.f32 [%rd50+0], %f102;
|
||||
cvt.s64.s32 %rd53, %r9;
|
||||
mul.wide.s32 %rd54, %r9, 4;
|
||||
add.u64 %rd55, %rd54, %rd50;
|
||||
mov.f32 %f103, %f8;
|
||||
st.global.f32 [%rd55+0], %f103;
|
||||
add.u64 %rd56, %rd54, %rd55;
|
||||
mov.f32 %f104, %f10;
|
||||
st.global.f32 [%rd56+0], %f104;
|
||||
add.u64 %rd57, %rd54, %rd56;
|
||||
mov.f32 %f105, %f12;
|
||||
st.global.f32 [%rd57+0], %f105;
|
||||
add.u64 %rd50, %rd54, %rd57;
|
||||
mov.f32 %f106, %f14;
|
||||
st.global.f32 [%rd50+0], %f106;
|
||||
mov.f32 %f107, %f16;
|
||||
add.u64 %rd58, %rd54, %rd50;
|
||||
st.global.f32 [%rd58+0], %f107;
|
||||
$Lt_0_29954:
|
||||
ld.param.u64 %rd59, [__cudaparm_kernel_pair_ans];
|
||||
mul.lo.u64 %rd60, %rd4, 16;
|
||||
add.u64 %rd61, %rd59, %rd60;
|
||||
mov.f32 %f108, %f109;
|
||||
st.global.v4.f32 [%rd61+0], {%f27,%f26,%f25,%f108};
|
||||
$Lt_0_28930:
|
||||
$Lt_0_20226:
|
||||
.loc 16 110 0
|
||||
exit;
|
||||
$LDWend_kernel_pair:
|
||||
} // kernel_pair
|
||||
|
||||
.entry kernel_pair_fast (
|
||||
.param .u64 __cudaparm_kernel_pair_fast_x_,
|
||||
.param .u64 __cudaparm_kernel_pair_fast_lj1_in,
|
||||
.param .u64 __cudaparm_kernel_pair_fast_lj3_in,
|
||||
.param .u64 __cudaparm_kernel_pair_fast_sp_lj_in,
|
||||
.param .u64 __cudaparm_kernel_pair_fast_dev_nbor,
|
||||
.param .u64 __cudaparm_kernel_pair_fast_dev_packed,
|
||||
.param .u64 __cudaparm_kernel_pair_fast_ans,
|
||||
.param .u64 __cudaparm_kernel_pair_fast___val_paramengv,
|
||||
.param .s32 __cudaparm_kernel_pair_fast_eflag,
|
||||
.param .s32 __cudaparm_kernel_pair_fast_vflag,
|
||||
.param .s32 __cudaparm_kernel_pair_fast_inum,
|
||||
.param .s32 __cudaparm_kernel_pair_fast_nbor_pitch,
|
||||
.param .s32 __cudaparm_kernel_pair_fast_t_per_atom)
|
||||
{
|
||||
.reg .u32 %r<74>;
|
||||
.reg .u64 %rd<75>;
|
||||
.reg .f32 %f<118>;
|
||||
.reg .pred %p<24>;
|
||||
.shared .align 4 .b8 __cuda___cuda_local_var_32625_33_non_const_sp_lj3268[16];
|
||||
.shared .align 16 .b8 __cuda___cuda_local_var_32623_34_non_const_lj13296[1936];
|
||||
.shared .align 16 .b8 __cuda___cuda_local_var_32624_34_non_const_lj35232[1936];
|
||||
.shared .align 4 .b8 __cuda___cuda_local_var_32702_55_non_const_red_acc7168[3072];
|
||||
// __cuda_local_var_32635_10_non_const_f = 48
|
||||
// __cuda_local_var_32637_9_non_const_virial = 16
|
||||
.loc 16 118 0
|
||||
$LDWbegin_kernel_pair_fast:
|
||||
cvt.s32.u32 %r1, %tid.x;
|
||||
mov.u32 %r2, 3;
|
||||
setp.gt.s32 %p1, %r1, %r2;
|
||||
@%p1 bra $Lt_1_22530;
|
||||
.loc 16 126 0
|
||||
mov.u64 %rd1, __cuda___cuda_local_var_32625_33_non_const_sp_lj3268;
|
||||
cvt.s64.s32 %rd2, %r1;
|
||||
mul.wide.s32 %rd3, %r1, 4;
|
||||
ld.param.u64 %rd4, [__cudaparm_kernel_pair_fast_sp_lj_in];
|
||||
add.u64 %rd5, %rd4, %rd3;
|
||||
ld.global.f32 %f1, [%rd5+0];
|
||||
add.u64 %rd6, %rd3, %rd1;
|
||||
st.shared.f32 [%rd6+0], %f1;
|
||||
$Lt_1_22530:
|
||||
mov.u64 %rd1, __cuda___cuda_local_var_32625_33_non_const_sp_lj3268;
|
||||
mov.u32 %r3, 120;
|
||||
setp.gt.s32 %p2, %r1, %r3;
|
||||
@%p2 bra $Lt_1_23042;
|
||||
.loc 16 128 0
|
||||
mov.u64 %rd7, __cuda___cuda_local_var_32623_34_non_const_lj13296;
|
||||
cvt.s64.s32 %rd8, %r1;
|
||||
mul.wide.s32 %rd9, %r1, 16;
|
||||
ld.param.u64 %rd10, [__cudaparm_kernel_pair_fast_lj1_in];
|
||||
add.u64 %rd11, %rd10, %rd9;
|
||||
add.u64 %rd12, %rd9, %rd7;
|
||||
ld.global.v4.f32 {%f2,%f3,%f4,%f5}, [%rd11+0];
|
||||
st.shared.v4.f32 [%rd12+0], {%f2,%f3,%f4,%f5};
|
||||
ld.param.s32 %r4, [__cudaparm_kernel_pair_fast_eflag];
|
||||
mov.u32 %r5, 0;
|
||||
setp.le.s32 %p3, %r4, %r5;
|
||||
@%p3 bra $Lt_1_23554;
|
||||
.loc 16 130 0
|
||||
mov.u64 %rd13, __cuda___cuda_local_var_32624_34_non_const_lj35232;
|
||||
ld.param.u64 %rd14, [__cudaparm_kernel_pair_fast_lj3_in];
|
||||
add.u64 %rd15, %rd14, %rd9;
|
||||
add.u64 %rd16, %rd9, %rd13;
|
||||
ld.global.v4.f32 {%f6,%f7,%f8,%f9}, [%rd15+0];
|
||||
st.shared.v4.f32 [%rd16+0], {%f6,%f7,%f8,%f9};
|
||||
$Lt_1_23554:
|
||||
mov.u64 %rd13, __cuda___cuda_local_var_32624_34_non_const_lj35232;
|
||||
$Lt_1_23042:
|
||||
mov.u64 %rd13, __cuda___cuda_local_var_32624_34_non_const_lj35232;
|
||||
mov.u64 %rd7, __cuda___cuda_local_var_32623_34_non_const_lj13296;
|
||||
.loc 16 138 0
|
||||
mov.f32 %f10, 0f00000000; // 0
|
||||
mov.f32 %f11, %f10;
|
||||
mov.f32 %f12, 0f00000000; // 0
|
||||
mov.f32 %f13, %f12;
|
||||
mov.f32 %f14, 0f00000000; // 0
|
||||
mov.f32 %f15, %f14;
|
||||
mov.f32 %f16, 0f00000000; // 0
|
||||
mov.f32 %f17, %f16;
|
||||
mov.f32 %f18, 0f00000000; // 0
|
||||
mov.f32 %f19, %f18;
|
||||
mov.f32 %f20, 0f00000000; // 0
|
||||
mov.f32 %f21, %f20;
|
||||
.loc 16 140 0
|
||||
bar.sync 0;
|
||||
ld.param.s32 %r6, [__cudaparm_kernel_pair_fast_t_per_atom];
|
||||
div.s32 %r7, %r1, %r6;
|
||||
cvt.s32.u32 %r8, %ntid.x;
|
||||
div.s32 %r9, %r8, %r6;
|
||||
cvt.s32.u32 %r10, %ctaid.x;
|
||||
mul.lo.s32 %r11, %r10, %r9;
|
||||
add.s32 %r12, %r7, %r11;
|
||||
ld.param.s32 %r13, [__cudaparm_kernel_pair_fast_inum];
|
||||
setp.ge.s32 %p4, %r12, %r13;
|
||||
@%p4 bra $Lt_1_32770;
|
||||
.loc 16 145 0
|
||||
ld.param.s32 %r14, [__cudaparm_kernel_pair_fast_nbor_pitch];
|
||||
cvt.s64.s32 %rd17, %r14;
|
||||
mul.wide.s32 %rd18, %r14, 4;
|
||||
cvt.s64.s32 %rd19, %r12;
|
||||
mul.wide.s32 %rd20, %r12, 4;
|
||||
ld.param.u64 %rd21, [__cudaparm_kernel_pair_fast_dev_nbor];
|
||||
add.u64 %rd22, %rd20, %rd21;
|
||||
add.u64 %rd23, %rd18, %rd22;
|
||||
ld.global.s32 %r15, [%rd23+0];
|
||||
sub.s32 %r16, %r6, 1;
|
||||
and.b32 %r17, %r16, %r1;
|
||||
cvt.s64.s32 %rd24, %r17;
|
||||
mul.wide.s32 %rd25, %r17, 4;
|
||||
ld.param.u64 %rd26, [__cudaparm_kernel_pair_fast_dev_packed];
|
||||
setp.ne.u64 %p5, %rd26, %rd21;
|
||||
@%p5 bra $Lt_1_24834;
|
||||
cvt.s32.s64 %r18, %rd17;
|
||||
mul.lo.s32 %r19, %r18, %r6;
|
||||
mov.s32 %r20, %r19;
|
||||
mul.lo.s32 %r21, %r16, %r12;
|
||||
add.s32 %r22, %r18, %r21;
|
||||
cvt.s64.s32 %rd27, %r22;
|
||||
mul.wide.s32 %rd28, %r22, 4;
|
||||
add.u64 %rd29, %rd23, %rd28;
|
||||
and.b32 %r23, %r16, %r15;
|
||||
cvt.s64.s32 %rd30, %r23;
|
||||
div.s32 %r24, %r15, %r6;
|
||||
mul.lo.s32 %r25, %r19, %r24;
|
||||
cvt.s64.s32 %rd31, %r25;
|
||||
add.u64 %rd32, %rd30, %rd31;
|
||||
mul.lo.u64 %rd33, %rd32, 4;
|
||||
add.u64 %rd34, %rd29, %rd33;
|
||||
add.u64 %rd35, %rd25, %rd29;
|
||||
bra.uni $Lt_1_24578;
|
||||
$Lt_1_24834:
|
||||
add.u64 %rd36, %rd18, %rd23;
|
||||
ld.global.s32 %r26, [%rd36+0];
|
||||
cvt.s64.s32 %rd37, %r26;
|
||||
mul.wide.s32 %rd38, %r26, 4;
|
||||
add.u64 %rd39, %rd26, %rd38;
|
||||
cvt.s64.s32 %rd40, %r15;
|
||||
mul.wide.s32 %rd41, %r15, 4;
|
||||
add.u64 %rd34, %rd39, %rd41;
|
||||
mov.s32 %r20, %r6;
|
||||
add.u64 %rd35, %rd25, %rd39;
|
||||
$Lt_1_24578:
|
||||
.loc 16 148 0
|
||||
ld.global.s32 %r27, [%rd22+0];
|
||||
mov.u32 %r28, %r27;
|
||||
mov.s32 %r29, 0;
|
||||
mov.u32 %r30, %r29;
|
||||
mov.s32 %r31, 0;
|
||||
mov.u32 %r32, %r31;
|
||||
mov.s32 %r33, 0;
|
||||
mov.u32 %r34, %r33;
|
||||
tex.1d.v4.f32.s32 {%f22,%f23,%f24,%f25},[pos_tex,{%r28,%r30,%r32,%r34}];
|
||||
mov.f32 %f26, %f22;
|
||||
mov.f32 %f27, %f23;
|
||||
mov.f32 %f28, %f24;
|
||||
mov.f32 %f29, %f25;
|
||||
setp.ge.u64 %p6, %rd35, %rd34;
|
||||
@%p6 bra $Lt_1_34306;
|
||||
cvt.rzi.ftz.s32.f32 %r35, %f29;
|
||||
cvt.s64.s32 %rd42, %r20;
|
||||
mul.lo.s32 %r36, %r35, 11;
|
||||
cvt.rn.f32.s32 %f30, %r36;
|
||||
mov.f32 %f31, 0f00000000; // 0
|
||||
mov.f32 %f32, 0f00000000; // 0
|
||||
mov.f32 %f33, 0f00000000; // 0
|
||||
mov.f32 %f34, 0f00000000; // 0
|
||||
$Lt_1_25602:
|
||||
//<loop> Loop body line 148, nesting depth: 1, estimated iterations: unknown
|
||||
.loc 16 155 0
|
||||
ld.global.s32 %r37, [%rd35+0];
|
||||
.loc 16 156 0
|
||||
shr.s32 %r38, %r37, 30;
|
||||
and.b32 %r39, %r38, 3;
|
||||
cvt.s64.s32 %rd43, %r39;
|
||||
mul.wide.s32 %rd44, %r39, 4;
|
||||
add.u64 %rd45, %rd1, %rd44;
|
||||
ld.shared.f32 %f35, [%rd45+0];
|
||||
.loc 16 159 0
|
||||
and.b32 %r40, %r37, 1073741823;
|
||||
mov.u32 %r41, %r40;
|
||||
mov.s32 %r42, 0;
|
||||
mov.u32 %r43, %r42;
|
||||
mov.s32 %r44, 0;
|
||||
mov.u32 %r45, %r44;
|
||||
mov.s32 %r46, 0;
|
||||
mov.u32 %r47, %r46;
|
||||
tex.1d.v4.f32.s32 {%f36,%f37,%f38,%f39},[pos_tex,{%r41,%r43,%r45,%r47}];
|
||||
mov.f32 %f40, %f36;
|
||||
mov.f32 %f41, %f37;
|
||||
mov.f32 %f42, %f38;
|
||||
mov.f32 %f43, %f39;
|
||||
sub.ftz.f32 %f44, %f27, %f41;
|
||||
sub.ftz.f32 %f45, %f26, %f40;
|
||||
sub.ftz.f32 %f46, %f28, %f42;
|
||||
mul.ftz.f32 %f47, %f44, %f44;
|
||||
fma.rn.ftz.f32 %f48, %f45, %f45, %f47;
|
||||
fma.rn.ftz.f32 %f49, %f46, %f46, %f48;
|
||||
add.ftz.f32 %f50, %f30, %f43;
|
||||
cvt.rzi.ftz.s32.f32 %r48, %f50;
|
||||
cvt.s64.s32 %rd46, %r48;
|
||||
mul.wide.s32 %rd47, %r48, 16;
|
||||
add.u64 %rd48, %rd47, %rd7;
|
||||
ld.shared.f32 %f51, [%rd48+0];
|
||||
setp.gt.ftz.f32 %p7, %f51, %f49;
|
||||
@!%p7 bra $Lt_1_27906;
|
||||
rcp.approx.ftz.f32 %f52, %f49;
|
||||
ld.shared.f32 %f53, [%rd48+4];
|
||||
mov.f32 %f54, 0f40000000; // 2
|
||||
setp.eq.ftz.f32 %p8, %f53, %f54;
|
||||
@!%p8 bra $Lt_1_26626;
|
||||
.loc 16 173 0
|
||||
mul.ftz.f32 %f55, %f52, %f52;
|
||||
mov.f32 %f56, %f55;
|
||||
.loc 16 174 0
|
||||
mul.ftz.f32 %f57, %f55, %f55;
|
||||
bra.uni $Lt_1_26882;
|
||||
$Lt_1_26626:
|
||||
mov.f32 %f58, 0f3f800000; // 1
|
||||
setp.eq.ftz.f32 %p9, %f53, %f58;
|
||||
@!%p9 bra $Lt_1_27138;
|
||||
.loc 16 176 0
|
||||
sqrt.approx.ftz.f32 %f59, %f52;
|
||||
mul.ftz.f32 %f60, %f52, %f59;
|
||||
mov.f32 %f57, %f60;
|
||||
.loc 16 177 0
|
||||
mul.ftz.f32 %f56, %f60, %f60;
|
||||
bra.uni $Lt_1_26882;
|
||||
$Lt_1_27138:
|
||||
.loc 16 179 0
|
||||
mul.ftz.f32 %f61, %f52, %f52;
|
||||
mul.ftz.f32 %f62, %f52, %f61;
|
||||
mov.f32 %f56, %f62;
|
||||
.loc 16 180 0
|
||||
mov.f32 %f57, %f62;
|
||||
$Lt_1_26882:
|
||||
$Lt_1_26370:
|
||||
.loc 16 182 0
|
||||
mul.ftz.f32 %f63, %f52, %f35;
|
||||
mul.ftz.f32 %f64, %f56, %f63;
|
||||
ld.shared.v2.f32 {%f65,%f66}, [%rd48+8];
|
||||
mul.ftz.f32 %f67, %f65, %f57;
|
||||
sub.ftz.f32 %f68, %f67, %f66;
|
||||
mul.ftz.f32 %f69, %f64, %f68;
|
||||
.loc 16 184 0
|
||||
fma.rn.ftz.f32 %f33, %f45, %f69, %f33;
|
||||
.loc 16 185 0
|
||||
fma.rn.ftz.f32 %f32, %f44, %f69, %f32;
|
||||
.loc 16 186 0
|
||||
fma.rn.ftz.f32 %f31, %f46, %f69, %f31;
|
||||
ld.param.s32 %r49, [__cudaparm_kernel_pair_fast_eflag];
|
||||
mov.u32 %r50, 0;
|
||||
setp.le.s32 %p10, %r49, %r50;
|
||||
@%p10 bra $Lt_1_27394;
|
||||
.loc 16 188 0
|
||||
add.u64 %rd49, %rd47, %rd13;
|
||||
ld.shared.v4.f32 {%f70,%f71,%f72,_}, [%rd49+0];
|
||||
mul.ftz.f32 %f73, %f35, %f56;
|
||||
mul.ftz.f32 %f74, %f70, %f57;
|
||||
sub.ftz.f32 %f75, %f74, %f71;
|
||||
mul.ftz.f32 %f76, %f73, %f75;
|
||||
sub.ftz.f32 %f77, %f76, %f72;
|
||||
add.ftz.f32 %f34, %f34, %f77;
|
||||
$Lt_1_27394:
|
||||
ld.param.s32 %r51, [__cudaparm_kernel_pair_fast_vflag];
|
||||
mov.u32 %r52, 0;
|
||||
setp.le.s32 %p11, %r51, %r52;
|
||||
@%p11 bra $Lt_1_27906;
|
||||
.loc 16 191 0
|
||||
mov.f32 %f78, %f11;
|
||||
mul.ftz.f32 %f79, %f45, %f45;
|
||||
fma.rn.ftz.f32 %f80, %f69, %f79, %f78;
|
||||
mov.f32 %f11, %f80;
|
||||
.loc 16 192 0
|
||||
mov.f32 %f81, %f13;
|
||||
fma.rn.ftz.f32 %f82, %f69, %f47, %f81;
|
||||
mov.f32 %f13, %f82;
|
||||
.loc 16 193 0
|
||||
mov.f32 %f83, %f15;
|
||||
mul.ftz.f32 %f84, %f46, %f46;
|
||||
fma.rn.ftz.f32 %f85, %f69, %f84, %f83;
|
||||
mov.f32 %f15, %f85;
|
||||
.loc 16 194 0
|
||||
mov.f32 %f86, %f17;
|
||||
mul.ftz.f32 %f87, %f44, %f45;
|
||||
fma.rn.ftz.f32 %f88, %f69, %f87, %f86;
|
||||
mov.f32 %f17, %f88;
|
||||
.loc 16 195 0
|
||||
mov.f32 %f89, %f19;
|
||||
mul.ftz.f32 %f90, %f45, %f46;
|
||||
fma.rn.ftz.f32 %f91, %f69, %f90, %f89;
|
||||
mov.f32 %f19, %f91;
|
||||
.loc 16 196 0
|
||||
mul.ftz.f32 %f92, %f44, %f46;
|
||||
fma.rn.ftz.f32 %f20, %f69, %f92, %f20;
|
||||
mov.f32 %f21, %f20;
|
||||
$Lt_1_27906:
|
||||
$Lt_1_25858:
|
||||
.loc 16 153 0
|
||||
mul.lo.u64 %rd50, %rd42, 4;
|
||||
add.u64 %rd35, %rd35, %rd50;
|
||||
setp.lt.u64 %p12, %rd35, %rd34;
|
||||
@%p12 bra $Lt_1_25602;
|
||||
bra.uni $Lt_1_25090;
|
||||
$Lt_1_34306:
|
||||
mov.f32 %f31, 0f00000000; // 0
|
||||
mov.f32 %f32, 0f00000000; // 0
|
||||
mov.f32 %f33, 0f00000000; // 0
|
||||
mov.f32 %f34, 0f00000000; // 0
|
||||
$Lt_1_25090:
|
||||
mov.u32 %r53, 1;
|
||||
setp.le.s32 %p13, %r6, %r53;
|
||||
@%p13 bra $Lt_1_30722;
|
||||
.loc 16 201 0
|
||||
mov.u64 %rd51, __cuda___cuda_local_var_32702_55_non_const_red_acc7168;
|
||||
cvt.s64.s32 %rd52, %r1;
|
||||
mul.wide.s32 %rd53, %r1, 4;
|
||||
add.u64 %rd54, %rd51, %rd53;
|
||||
mov.f32 %f93, %f33;
|
||||
st.shared.f32 [%rd54+0], %f93;
|
||||
mov.f32 %f94, %f32;
|
||||
st.shared.f32 [%rd54+512], %f94;
|
||||
mov.f32 %f95, %f31;
|
||||
st.shared.f32 [%rd54+1024], %f95;
|
||||
mov.f32 %f96, %f34;
|
||||
st.shared.f32 [%rd54+1536], %f96;
|
||||
shr.s32 %r54, %r6, 31;
|
||||
mov.s32 %r55, 1;
|
||||
and.b32 %r56, %r54, %r55;
|
||||
add.s32 %r57, %r56, %r6;
|
||||
shr.s32 %r58, %r57, 1;
|
||||
mov.s32 %r59, %r58;
|
||||
mov.u32 %r60, 0;
|
||||
setp.ne.u32 %p14, %r58, %r60;
|
||||
@!%p14 bra $Lt_1_29186;
|
||||
$Lt_1_29698:
|
||||
setp.ge.u32 %p15, %r17, %r59;
|
||||
@%p15 bra $Lt_1_29954;
|
||||
add.u32 %r61, %r1, %r59;
|
||||
cvt.u64.u32 %rd55, %r61;
|
||||
mul.wide.u32 %rd56, %r61, 4;
|
||||
add.u64 %rd57, %rd51, %rd56;
|
||||
ld.shared.f32 %f97, [%rd57+0];
|
||||
add.ftz.f32 %f93, %f97, %f93;
|
||||
st.shared.f32 [%rd54+0], %f93;
|
||||
ld.shared.f32 %f98, [%rd57+512];
|
||||
add.ftz.f32 %f94, %f98, %f94;
|
||||
st.shared.f32 [%rd54+512], %f94;
|
||||
ld.shared.f32 %f99, [%rd57+1024];
|
||||
add.ftz.f32 %f95, %f99, %f95;
|
||||
st.shared.f32 [%rd54+1024], %f95;
|
||||
ld.shared.f32 %f100, [%rd57+1536];
|
||||
add.ftz.f32 %f96, %f100, %f96;
|
||||
st.shared.f32 [%rd54+1536], %f96;
|
||||
$Lt_1_29954:
|
||||
shr.u32 %r59, %r59, 1;
|
||||
mov.u32 %r62, 0;
|
||||
setp.ne.u32 %p16, %r59, %r62;
|
||||
@%p16 bra $Lt_1_29698;
|
||||
$Lt_1_29186:
|
||||
mov.f32 %f33, %f93;
|
||||
mov.f32 %f32, %f94;
|
||||
mov.f32 %f31, %f95;
|
||||
mov.f32 %f34, %f96;
|
||||
ld.param.s32 %r63, [__cudaparm_kernel_pair_fast_vflag];
|
||||
mov.u32 %r64, 0;
|
||||
setp.le.s32 %p17, %r63, %r64;
|
||||
@%p17 bra $Lt_1_30722;
|
||||
mov.f32 %f93, %f11;
|
||||
st.shared.f32 [%rd54+0], %f93;
|
||||
mov.f32 %f94, %f13;
|
||||
st.shared.f32 [%rd54+512], %f94;
|
||||
mov.f32 %f95, %f15;
|
||||
st.shared.f32 [%rd54+1024], %f95;
|
||||
mov.f32 %f96, %f17;
|
||||
st.shared.f32 [%rd54+1536], %f96;
|
||||
mov.f32 %f101, %f19;
|
||||
st.shared.f32 [%rd54+2048], %f101;
|
||||
mov.f32 %f102, %f20;
|
||||
st.shared.f32 [%rd54+2560], %f102;
|
||||
mov.s32 %r65, %r58;
|
||||
@!%p14 bra $Lt_1_31234;
|
||||
$Lt_1_31746:
|
||||
setp.ge.u32 %p18, %r17, %r65;
|
||||
@%p18 bra $Lt_1_32002;
|
||||
add.u32 %r66, %r1, %r65;
|
||||
cvt.u64.u32 %rd58, %r66;
|
||||
mul.wide.u32 %rd59, %r66, 4;
|
||||
add.u64 %rd60, %rd51, %rd59;
|
||||
ld.shared.f32 %f103, [%rd60+0];
|
||||
add.ftz.f32 %f93, %f103, %f93;
|
||||
st.shared.f32 [%rd54+0], %f93;
|
||||
ld.shared.f32 %f104, [%rd60+512];
|
||||
add.ftz.f32 %f94, %f104, %f94;
|
||||
st.shared.f32 [%rd54+512], %f94;
|
||||
ld.shared.f32 %f105, [%rd60+1024];
|
||||
add.ftz.f32 %f95, %f105, %f95;
|
||||
st.shared.f32 [%rd54+1024], %f95;
|
||||
ld.shared.f32 %f106, [%rd60+1536];
|
||||
add.ftz.f32 %f96, %f106, %f96;
|
||||
st.shared.f32 [%rd54+1536], %f96;
|
||||
ld.shared.f32 %f107, [%rd60+2048];
|
||||
add.ftz.f32 %f101, %f107, %f101;
|
||||
st.shared.f32 [%rd54+2048], %f101;
|
||||
ld.shared.f32 %f108, [%rd60+2560];
|
||||
add.ftz.f32 %f102, %f108, %f102;
|
||||
st.shared.f32 [%rd54+2560], %f102;
|
||||
$Lt_1_32002:
|
||||
shr.u32 %r65, %r65, 1;
|
||||
mov.u32 %r67, 0;
|
||||
setp.ne.u32 %p19, %r65, %r67;
|
||||
@%p19 bra $Lt_1_31746;
|
||||
$Lt_1_31234:
|
||||
mov.f32 %f11, %f93;
|
||||
mov.f32 %f13, %f94;
|
||||
mov.f32 %f15, %f95;
|
||||
mov.f32 %f17, %f96;
|
||||
mov.f32 %f19, %f101;
|
||||
mov.f32 %f21, %f102;
|
||||
$Lt_1_30722:
|
||||
$Lt_1_28674:
|
||||
mov.u32 %r68, 0;
|
||||
setp.ne.s32 %p20, %r17, %r68;
|
||||
@%p20 bra $Lt_1_32770;
|
||||
ld.param.u64 %rd61, [__cudaparm_kernel_pair_fast___val_paramengv];
|
||||
add.u64 %rd62, %rd61, %rd20;
|
||||
ld.param.s32 %r69, [__cudaparm_kernel_pair_fast_eflag];
|
||||
mov.u32 %r70, 0;
|
||||
setp.le.s32 %p21, %r69, %r70;
|
||||
@%p21 bra $Lt_1_33282;
|
||||
st.global.f32 [%rd62+0], %f34;
|
||||
cvt.s64.s32 %rd63, %r13;
|
||||
mul.wide.s32 %rd64, %r13, 4;
|
||||
add.u64 %rd62, %rd62, %rd64;
|
||||
$Lt_1_33282:
|
||||
ld.param.s32 %r71, [__cudaparm_kernel_pair_fast_vflag];
|
||||
mov.u32 %r72, 0;
|
||||
setp.le.s32 %p22, %r71, %r72;
|
||||
@%p22 bra $Lt_1_33794;
|
||||
mov.f32 %f109, %f11;
|
||||
st.global.f32 [%rd62+0], %f109;
|
||||
cvt.s64.s32 %rd65, %r13;
|
||||
mul.wide.s32 %rd66, %r13, 4;
|
||||
add.u64 %rd67, %rd66, %rd62;
|
||||
mov.f32 %f110, %f13;
|
||||
st.global.f32 [%rd67+0], %f110;
|
||||
add.u64 %rd68, %rd66, %rd67;
|
||||
mov.f32 %f111, %f15;
|
||||
st.global.f32 [%rd68+0], %f111;
|
||||
add.u64 %rd69, %rd66, %rd68;
|
||||
mov.f32 %f112, %f17;
|
||||
st.global.f32 [%rd69+0], %f112;
|
||||
add.u64 %rd62, %rd66, %rd69;
|
||||
mov.f32 %f113, %f19;
|
||||
st.global.f32 [%rd62+0], %f113;
|
||||
mov.f32 %f114, %f21;
|
||||
add.u64 %rd70, %rd66, %rd62;
|
||||
st.global.f32 [%rd70+0], %f114;
|
||||
$Lt_1_33794:
|
||||
ld.param.u64 %rd71, [__cudaparm_kernel_pair_fast_ans];
|
||||
mul.lo.u64 %rd72, %rd19, 16;
|
||||
add.u64 %rd73, %rd71, %rd72;
|
||||
mov.f32 %f115, %f116;
|
||||
st.global.v4.f32 [%rd73+0], {%f33,%f32,%f31,%f115};
|
||||
$Lt_1_32770:
|
||||
$Lt_1_24066:
|
||||
.loc 16 204 0
|
||||
exit;
|
||||
$LDWend_kernel_pair_fast:
|
||||
} // kernel_pair_fast
|
||||
|
||||
1189
lib/gpu/cg_cmm_long.ptx
Normal file
1189
lib/gpu/cg_cmm_long.ptx
Normal file
File diff suppressed because it is too large
Load Diff
1129
lib/gpu/cg_cmm_long_ptx.h
Normal file
1129
lib/gpu/cg_cmm_long_ptx.h
Normal file
File diff suppressed because it is too large
Load Diff
906
lib/gpu/cg_cmm_ptx.h
Normal file
906
lib/gpu/cg_cmm_ptx.h
Normal file
@ -0,0 +1,906 @@
|
||||
const char * cg_cmm =
|
||||
" .version 2.3\n"
|
||||
" .target sm_20\n"
|
||||
" .address_size 64\n"
|
||||
" .global .texref pos_tex;\n"
|
||||
" .entry kernel_pair (\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_x_,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_lj1,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_lj3,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_lj_types,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_sp_lj_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_dev_nbor,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_dev_packed,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_ans,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair___val_paramengv,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_eflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_vflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_inum,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_nbor_pitch,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_t_per_atom)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<72>;\n"
|
||||
" .reg .u64 %rd<63>;\n"
|
||||
" .reg .f32 %f<111>;\n"
|
||||
" .reg .pred %p<21>;\n"
|
||||
" .shared .align 16 .b8 __cuda___cuda_local_var_32536_33_non_const_sp_lj92[16];\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32608_55_non_const_red_acc108[3072];\n"
|
||||
" .loc 16 31 0\n"
|
||||
"$LDWbegin_kernel_pair:\n"
|
||||
" .loc 16 36 0\n"
|
||||
" ld.param.u64 %rd1, [__cudaparm_kernel_pair_sp_lj_in];\n"
|
||||
" ldu.global.f32 %f1, [%rd1+0];\n"
|
||||
" .loc 16 37 0\n"
|
||||
" ld.global.f32 %f2, [%rd1+4];\n"
|
||||
" .loc 16 38 0\n"
|
||||
" ld.global.f32 %f3, [%rd1+8];\n"
|
||||
" .loc 16 39 0\n"
|
||||
" ld.global.f32 %f4, [%rd1+12];\n"
|
||||
" st.shared.v4.f32 [__cuda___cuda_local_var_32536_33_non_const_sp_lj92+0], {%f1,%f2,%f3,%f4};\n"
|
||||
" .loc 16 46 0\n"
|
||||
" mov.f32 %f5, 0f00000000; \n"
|
||||
" mov.f32 %f6, %f5;\n"
|
||||
" mov.f32 %f7, 0f00000000; \n"
|
||||
" mov.f32 %f8, %f7;\n"
|
||||
" mov.f32 %f9, 0f00000000; \n"
|
||||
" mov.f32 %f10, %f9;\n"
|
||||
" mov.f32 %f11, 0f00000000; \n"
|
||||
" mov.f32 %f12, %f11;\n"
|
||||
" mov.f32 %f13, 0f00000000; \n"
|
||||
" mov.f32 %f14, %f13;\n"
|
||||
" mov.f32 %f15, 0f00000000; \n"
|
||||
" mov.f32 %f16, %f15;\n"
|
||||
" ld.param.s32 %r1, [__cudaparm_kernel_pair_t_per_atom];\n"
|
||||
" cvt.s32.u32 %r2, %tid.x;\n"
|
||||
" div.s32 %r3, %r2, %r1;\n"
|
||||
" cvt.s32.u32 %r4, %ntid.x;\n"
|
||||
" div.s32 %r5, %r4, %r1;\n"
|
||||
" cvt.s32.u32 %r6, %ctaid.x;\n"
|
||||
" mul.lo.s32 %r7, %r6, %r5;\n"
|
||||
" add.s32 %r8, %r3, %r7;\n"
|
||||
" ld.param.s32 %r9, [__cudaparm_kernel_pair_inum];\n"
|
||||
" setp.ge.s32 %p1, %r8, %r9;\n"
|
||||
" @%p1 bra $Lt_0_28930;\n"
|
||||
" .loc 16 51 0\n"
|
||||
" ld.param.s32 %r10, [__cudaparm_kernel_pair_nbor_pitch];\n"
|
||||
" cvt.s64.s32 %rd2, %r10;\n"
|
||||
" mul.wide.s32 %rd3, %r10, 4;\n"
|
||||
" cvt.s64.s32 %rd4, %r8;\n"
|
||||
" mul.wide.s32 %rd5, %r8, 4;\n"
|
||||
" ld.param.u64 %rd6, [__cudaparm_kernel_pair_dev_nbor];\n"
|
||||
" add.u64 %rd7, %rd5, %rd6;\n"
|
||||
" add.u64 %rd8, %rd3, %rd7;\n"
|
||||
" ld.global.s32 %r11, [%rd8+0];\n"
|
||||
" sub.s32 %r12, %r1, 1;\n"
|
||||
" and.b32 %r13, %r12, %r2;\n"
|
||||
" cvt.s64.s32 %rd9, %r13;\n"
|
||||
" mul.wide.s32 %rd10, %r13, 4;\n"
|
||||
" ld.param.u64 %rd11, [__cudaparm_kernel_pair_dev_packed];\n"
|
||||
" setp.ne.u64 %p2, %rd11, %rd6;\n"
|
||||
" @%p2 bra $Lt_0_20994;\n"
|
||||
" cvt.s32.s64 %r14, %rd2;\n"
|
||||
" mul.lo.s32 %r15, %r14, %r1;\n"
|
||||
" mov.s32 %r16, %r15;\n"
|
||||
" mul.lo.s32 %r17, %r12, %r8;\n"
|
||||
" add.s32 %r18, %r14, %r17;\n"
|
||||
" cvt.s64.s32 %rd12, %r18;\n"
|
||||
" mul.wide.s32 %rd13, %r18, 4;\n"
|
||||
" add.u64 %rd14, %rd8, %rd13;\n"
|
||||
" and.b32 %r19, %r12, %r11;\n"
|
||||
" cvt.s64.s32 %rd15, %r19;\n"
|
||||
" div.s32 %r20, %r11, %r1;\n"
|
||||
" mul.lo.s32 %r21, %r15, %r20;\n"
|
||||
" cvt.s64.s32 %rd16, %r21;\n"
|
||||
" add.u64 %rd17, %rd15, %rd16;\n"
|
||||
" mul.lo.u64 %rd18, %rd17, 4;\n"
|
||||
" add.u64 %rd19, %rd14, %rd18;\n"
|
||||
" add.u64 %rd20, %rd10, %rd14;\n"
|
||||
" bra.uni $Lt_0_20738;\n"
|
||||
"$Lt_0_20994:\n"
|
||||
" add.u64 %rd21, %rd3, %rd8;\n"
|
||||
" ld.global.s32 %r22, [%rd21+0];\n"
|
||||
" cvt.s64.s32 %rd22, %r22;\n"
|
||||
" mul.wide.s32 %rd23, %r22, 4;\n"
|
||||
" add.u64 %rd24, %rd11, %rd23;\n"
|
||||
" cvt.s64.s32 %rd25, %r11;\n"
|
||||
" mul.wide.s32 %rd26, %r11, 4;\n"
|
||||
" add.u64 %rd19, %rd24, %rd26;\n"
|
||||
" mov.s32 %r16, %r1;\n"
|
||||
" add.u64 %rd20, %rd10, %rd24;\n"
|
||||
"$Lt_0_20738:\n"
|
||||
" .loc 16 54 0\n"
|
||||
" ld.global.s32 %r23, [%rd7+0];\n"
|
||||
" mov.u32 %r24, %r23;\n"
|
||||
" mov.s32 %r25, 0;\n"
|
||||
" mov.u32 %r26, %r25;\n"
|
||||
" mov.s32 %r27, 0;\n"
|
||||
" mov.u32 %r28, %r27;\n"
|
||||
" mov.s32 %r29, 0;\n"
|
||||
" mov.u32 %r30, %r29;\n"
|
||||
" tex.1d.v4.f32.s32 {%f17,%f18,%f19,%f20},[pos_tex,{%r24,%r26,%r28,%r30}];\n"
|
||||
" mov.f32 %f21, %f17;\n"
|
||||
" mov.f32 %f22, %f18;\n"
|
||||
" mov.f32 %f23, %f19;\n"
|
||||
" mov.f32 %f24, %f20;\n"
|
||||
" setp.ge.u64 %p3, %rd20, %rd19;\n"
|
||||
" @%p3 bra $Lt_0_30466;\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r31, %f24;\n"
|
||||
" cvt.s64.s32 %rd27, %r16;\n"
|
||||
" ld.param.s32 %r32, [__cudaparm_kernel_pair_lj_types];\n"
|
||||
" mul.lo.s32 %r33, %r32, %r31;\n"
|
||||
" ld.param.u64 %rd28, [__cudaparm_kernel_pair_lj1];\n"
|
||||
" mov.f32 %f25, 0f00000000; \n"
|
||||
" mov.f32 %f26, 0f00000000; \n"
|
||||
" mov.f32 %f27, 0f00000000; \n"
|
||||
" mov.f32 %f28, 0f00000000; \n"
|
||||
" mov.u64 %rd29, __cuda___cuda_local_var_32536_33_non_const_sp_lj92;\n"
|
||||
"$Lt_0_21762:\n"
|
||||
" .loc 16 60 0\n"
|
||||
" ld.global.s32 %r34, [%rd20+0];\n"
|
||||
" .loc 16 61 0\n"
|
||||
" shr.s32 %r35, %r34, 30;\n"
|
||||
" and.b32 %r36, %r35, 3;\n"
|
||||
" cvt.s64.s32 %rd30, %r36;\n"
|
||||
" mul.wide.s32 %rd31, %r36, 4;\n"
|
||||
" add.u64 %rd32, %rd29, %rd31;\n"
|
||||
" ld.shared.f32 %f29, [%rd32+0];\n"
|
||||
" .loc 16 64 0\n"
|
||||
" and.b32 %r37, %r34, 1073741823;\n"
|
||||
" mov.u32 %r38, %r37;\n"
|
||||
" mov.s32 %r39, 0;\n"
|
||||
" mov.u32 %r40, %r39;\n"
|
||||
" mov.s32 %r41, 0;\n"
|
||||
" mov.u32 %r42, %r41;\n"
|
||||
" mov.s32 %r43, 0;\n"
|
||||
" mov.u32 %r44, %r43;\n"
|
||||
" tex.1d.v4.f32.s32 {%f30,%f31,%f32,%f33},[pos_tex,{%r38,%r40,%r42,%r44}];\n"
|
||||
" mov.f32 %f34, %f30;\n"
|
||||
" mov.f32 %f35, %f31;\n"
|
||||
" mov.f32 %f36, %f32;\n"
|
||||
" mov.f32 %f37, %f33;\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r45, %f37;\n"
|
||||
" sub.ftz.f32 %f38, %f22, %f35;\n"
|
||||
" sub.ftz.f32 %f39, %f21, %f34;\n"
|
||||
" sub.ftz.f32 %f40, %f23, %f36;\n"
|
||||
" mul.ftz.f32 %f41, %f38, %f38;\n"
|
||||
" fma.rn.ftz.f32 %f42, %f39, %f39, %f41;\n"
|
||||
" fma.rn.ftz.f32 %f43, %f40, %f40, %f42;\n"
|
||||
" add.s32 %r46, %r45, %r33;\n"
|
||||
" cvt.s64.s32 %rd33, %r46;\n"
|
||||
" mul.wide.s32 %rd34, %r46, 16;\n"
|
||||
" add.u64 %rd35, %rd34, %rd28;\n"
|
||||
" ld.global.f32 %f44, [%rd35+0];\n"
|
||||
" setp.gt.ftz.f32 %p4, %f44, %f43;\n"
|
||||
" @!%p4 bra $Lt_0_24066;\n"
|
||||
" rcp.approx.ftz.f32 %f45, %f43;\n"
|
||||
" ld.global.f32 %f46, [%rd35+4];\n"
|
||||
" mov.f32 %f47, 0f40000000; \n"
|
||||
" setp.eq.ftz.f32 %p5, %f46, %f47;\n"
|
||||
" @!%p5 bra $Lt_0_22786;\n"
|
||||
" .loc 16 79 0\n"
|
||||
" mul.ftz.f32 %f48, %f45, %f45;\n"
|
||||
" mov.f32 %f49, %f48;\n"
|
||||
" .loc 16 80 0\n"
|
||||
" mul.ftz.f32 %f50, %f48, %f48;\n"
|
||||
" bra.uni $Lt_0_23042;\n"
|
||||
"$Lt_0_22786:\n"
|
||||
" mov.f32 %f51, 0f3f800000; \n"
|
||||
" setp.eq.ftz.f32 %p6, %f46, %f51;\n"
|
||||
" @!%p6 bra $Lt_0_23298;\n"
|
||||
" .loc 16 82 0\n"
|
||||
" sqrt.approx.ftz.f32 %f52, %f45;\n"
|
||||
" mul.ftz.f32 %f53, %f45, %f52;\n"
|
||||
" mov.f32 %f50, %f53;\n"
|
||||
" .loc 16 83 0\n"
|
||||
" mul.ftz.f32 %f49, %f53, %f53;\n"
|
||||
" bra.uni $Lt_0_23042;\n"
|
||||
"$Lt_0_23298:\n"
|
||||
" .loc 16 85 0\n"
|
||||
" mul.ftz.f32 %f54, %f45, %f45;\n"
|
||||
" mul.ftz.f32 %f55, %f45, %f54;\n"
|
||||
" mov.f32 %f49, %f55;\n"
|
||||
" .loc 16 86 0\n"
|
||||
" mov.f32 %f50, %f55;\n"
|
||||
"$Lt_0_23042:\n"
|
||||
"$Lt_0_22530:\n"
|
||||
" .loc 16 88 0\n"
|
||||
" mul.ftz.f32 %f56, %f45, %f29;\n"
|
||||
" mul.ftz.f32 %f57, %f49, %f56;\n"
|
||||
" ld.global.v2.f32 {%f58,%f59}, [%rd35+8];\n"
|
||||
" mul.ftz.f32 %f60, %f58, %f50;\n"
|
||||
" sub.ftz.f32 %f61, %f60, %f59;\n"
|
||||
" mul.ftz.f32 %f62, %f57, %f61;\n"
|
||||
" .loc 16 90 0\n"
|
||||
" fma.rn.ftz.f32 %f27, %f39, %f62, %f27;\n"
|
||||
" .loc 16 91 0\n"
|
||||
" fma.rn.ftz.f32 %f26, %f38, %f62, %f26;\n"
|
||||
" .loc 16 92 0\n"
|
||||
" fma.rn.ftz.f32 %f25, %f40, %f62, %f25;\n"
|
||||
" ld.param.s32 %r47, [__cudaparm_kernel_pair_eflag];\n"
|
||||
" mov.u32 %r48, 0;\n"
|
||||
" setp.le.s32 %p7, %r47, %r48;\n"
|
||||
" @%p7 bra $Lt_0_23554;\n"
|
||||
" .loc 16 94 0\n"
|
||||
" ld.param.u64 %rd36, [__cudaparm_kernel_pair_lj3];\n"
|
||||
" add.u64 %rd37, %rd36, %rd34;\n"
|
||||
" ld.global.v4.f32 {%f63,%f64,%f65,_}, [%rd37+0];\n"
|
||||
" mul.ftz.f32 %f66, %f29, %f49;\n"
|
||||
" mul.ftz.f32 %f67, %f63, %f50;\n"
|
||||
" sub.ftz.f32 %f68, %f67, %f64;\n"
|
||||
" mul.ftz.f32 %f69, %f66, %f68;\n"
|
||||
" sub.ftz.f32 %f70, %f69, %f65;\n"
|
||||
" add.ftz.f32 %f28, %f28, %f70;\n"
|
||||
"$Lt_0_23554:\n"
|
||||
" ld.param.s32 %r49, [__cudaparm_kernel_pair_vflag];\n"
|
||||
" mov.u32 %r50, 0;\n"
|
||||
" setp.le.s32 %p8, %r49, %r50;\n"
|
||||
" @%p8 bra $Lt_0_24066;\n"
|
||||
" .loc 16 97 0\n"
|
||||
" mov.f32 %f71, %f6;\n"
|
||||
" mul.ftz.f32 %f72, %f39, %f39;\n"
|
||||
" fma.rn.ftz.f32 %f73, %f62, %f72, %f71;\n"
|
||||
" mov.f32 %f6, %f73;\n"
|
||||
" .loc 16 98 0\n"
|
||||
" mov.f32 %f74, %f8;\n"
|
||||
" fma.rn.ftz.f32 %f75, %f62, %f41, %f74;\n"
|
||||
" mov.f32 %f8, %f75;\n"
|
||||
" .loc 16 99 0\n"
|
||||
" mov.f32 %f76, %f10;\n"
|
||||
" mul.ftz.f32 %f77, %f40, %f40;\n"
|
||||
" fma.rn.ftz.f32 %f78, %f62, %f77, %f76;\n"
|
||||
" mov.f32 %f10, %f78;\n"
|
||||
" .loc 16 100 0\n"
|
||||
" mov.f32 %f79, %f12;\n"
|
||||
" mul.ftz.f32 %f80, %f38, %f39;\n"
|
||||
" fma.rn.ftz.f32 %f81, %f62, %f80, %f79;\n"
|
||||
" mov.f32 %f12, %f81;\n"
|
||||
" .loc 16 101 0\n"
|
||||
" mov.f32 %f82, %f14;\n"
|
||||
" mul.ftz.f32 %f83, %f39, %f40;\n"
|
||||
" fma.rn.ftz.f32 %f84, %f62, %f83, %f82;\n"
|
||||
" mov.f32 %f14, %f84;\n"
|
||||
" .loc 16 102 0\n"
|
||||
" mul.ftz.f32 %f85, %f38, %f40;\n"
|
||||
" fma.rn.ftz.f32 %f15, %f62, %f85, %f15;\n"
|
||||
" mov.f32 %f16, %f15;\n"
|
||||
"$Lt_0_24066:\n"
|
||||
"$Lt_0_22018:\n"
|
||||
" .loc 16 58 0\n"
|
||||
" mul.lo.u64 %rd38, %rd27, 4;\n"
|
||||
" add.u64 %rd20, %rd20, %rd38;\n"
|
||||
" setp.lt.u64 %p9, %rd20, %rd19;\n"
|
||||
" @%p9 bra $Lt_0_21762;\n"
|
||||
" bra.uni $Lt_0_21250;\n"
|
||||
"$Lt_0_30466:\n"
|
||||
" mov.f32 %f25, 0f00000000; \n"
|
||||
" mov.f32 %f26, 0f00000000; \n"
|
||||
" mov.f32 %f27, 0f00000000; \n"
|
||||
" mov.f32 %f28, 0f00000000; \n"
|
||||
"$Lt_0_21250:\n"
|
||||
" mov.u32 %r51, 1;\n"
|
||||
" setp.le.s32 %p10, %r1, %r51;\n"
|
||||
" @%p10 bra $Lt_0_26882;\n"
|
||||
" .loc 16 107 0\n"
|
||||
" mov.u64 %rd39, __cuda___cuda_local_var_32608_55_non_const_red_acc108;\n"
|
||||
" cvt.s64.s32 %rd40, %r2;\n"
|
||||
" mul.wide.s32 %rd41, %r2, 4;\n"
|
||||
" add.u64 %rd42, %rd39, %rd41;\n"
|
||||
" mov.f32 %f86, %f27;\n"
|
||||
" st.shared.f32 [%rd42+0], %f86;\n"
|
||||
" mov.f32 %f87, %f26;\n"
|
||||
" st.shared.f32 [%rd42+512], %f87;\n"
|
||||
" mov.f32 %f88, %f25;\n"
|
||||
" st.shared.f32 [%rd42+1024], %f88;\n"
|
||||
" mov.f32 %f89, %f28;\n"
|
||||
" st.shared.f32 [%rd42+1536], %f89;\n"
|
||||
" shr.s32 %r52, %r1, 31;\n"
|
||||
" mov.s32 %r53, 1;\n"
|
||||
" and.b32 %r54, %r52, %r53;\n"
|
||||
" add.s32 %r55, %r54, %r1;\n"
|
||||
" shr.s32 %r56, %r55, 1;\n"
|
||||
" mov.s32 %r57, %r56;\n"
|
||||
" mov.u32 %r58, 0;\n"
|
||||
" setp.ne.u32 %p11, %r56, %r58;\n"
|
||||
" @!%p11 bra $Lt_0_25346;\n"
|
||||
"$Lt_0_25858:\n"
|
||||
" setp.ge.u32 %p12, %r13, %r57;\n"
|
||||
" @%p12 bra $Lt_0_26114;\n"
|
||||
" add.u32 %r59, %r2, %r57;\n"
|
||||
" cvt.u64.u32 %rd43, %r59;\n"
|
||||
" mul.wide.u32 %rd44, %r59, 4;\n"
|
||||
" add.u64 %rd45, %rd39, %rd44;\n"
|
||||
" ld.shared.f32 %f90, [%rd45+0];\n"
|
||||
" add.ftz.f32 %f86, %f90, %f86;\n"
|
||||
" st.shared.f32 [%rd42+0], %f86;\n"
|
||||
" ld.shared.f32 %f91, [%rd45+512];\n"
|
||||
" add.ftz.f32 %f87, %f91, %f87;\n"
|
||||
" st.shared.f32 [%rd42+512], %f87;\n"
|
||||
" ld.shared.f32 %f92, [%rd45+1024];\n"
|
||||
" add.ftz.f32 %f88, %f92, %f88;\n"
|
||||
" st.shared.f32 [%rd42+1024], %f88;\n"
|
||||
" ld.shared.f32 %f93, [%rd45+1536];\n"
|
||||
" add.ftz.f32 %f89, %f93, %f89;\n"
|
||||
" st.shared.f32 [%rd42+1536], %f89;\n"
|
||||
"$Lt_0_26114:\n"
|
||||
" shr.u32 %r57, %r57, 1;\n"
|
||||
" mov.u32 %r60, 0;\n"
|
||||
" setp.ne.u32 %p13, %r57, %r60;\n"
|
||||
" @%p13 bra $Lt_0_25858;\n"
|
||||
"$Lt_0_25346:\n"
|
||||
" mov.f32 %f27, %f86;\n"
|
||||
" mov.f32 %f26, %f87;\n"
|
||||
" mov.f32 %f25, %f88;\n"
|
||||
" mov.f32 %f28, %f89;\n"
|
||||
" ld.param.s32 %r61, [__cudaparm_kernel_pair_vflag];\n"
|
||||
" mov.u32 %r62, 0;\n"
|
||||
" setp.le.s32 %p14, %r61, %r62;\n"
|
||||
" @%p14 bra $Lt_0_26882;\n"
|
||||
" mov.f32 %f86, %f6;\n"
|
||||
" st.shared.f32 [%rd42+0], %f86;\n"
|
||||
" mov.f32 %f87, %f8;\n"
|
||||
" st.shared.f32 [%rd42+512], %f87;\n"
|
||||
" mov.f32 %f88, %f10;\n"
|
||||
" st.shared.f32 [%rd42+1024], %f88;\n"
|
||||
" mov.f32 %f89, %f12;\n"
|
||||
" st.shared.f32 [%rd42+1536], %f89;\n"
|
||||
" mov.f32 %f94, %f14;\n"
|
||||
" st.shared.f32 [%rd42+2048], %f94;\n"
|
||||
" mov.f32 %f95, %f15;\n"
|
||||
" st.shared.f32 [%rd42+2560], %f95;\n"
|
||||
" mov.s32 %r63, %r56;\n"
|
||||
" @!%p11 bra $Lt_0_27394;\n"
|
||||
"$Lt_0_27906:\n"
|
||||
" setp.ge.u32 %p15, %r13, %r63;\n"
|
||||
" @%p15 bra $Lt_0_28162;\n"
|
||||
" add.u32 %r64, %r2, %r63;\n"
|
||||
" cvt.u64.u32 %rd46, %r64;\n"
|
||||
" mul.wide.u32 %rd47, %r64, 4;\n"
|
||||
" add.u64 %rd48, %rd39, %rd47;\n"
|
||||
" ld.shared.f32 %f96, [%rd48+0];\n"
|
||||
" add.ftz.f32 %f86, %f96, %f86;\n"
|
||||
" st.shared.f32 [%rd42+0], %f86;\n"
|
||||
" ld.shared.f32 %f97, [%rd48+512];\n"
|
||||
" add.ftz.f32 %f87, %f97, %f87;\n"
|
||||
" st.shared.f32 [%rd42+512], %f87;\n"
|
||||
" ld.shared.f32 %f98, [%rd48+1024];\n"
|
||||
" add.ftz.f32 %f88, %f98, %f88;\n"
|
||||
" st.shared.f32 [%rd42+1024], %f88;\n"
|
||||
" ld.shared.f32 %f99, [%rd48+1536];\n"
|
||||
" add.ftz.f32 %f89, %f99, %f89;\n"
|
||||
" st.shared.f32 [%rd42+1536], %f89;\n"
|
||||
" ld.shared.f32 %f100, [%rd48+2048];\n"
|
||||
" add.ftz.f32 %f94, %f100, %f94;\n"
|
||||
" st.shared.f32 [%rd42+2048], %f94;\n"
|
||||
" ld.shared.f32 %f101, [%rd48+2560];\n"
|
||||
" add.ftz.f32 %f95, %f101, %f95;\n"
|
||||
" st.shared.f32 [%rd42+2560], %f95;\n"
|
||||
"$Lt_0_28162:\n"
|
||||
" shr.u32 %r63, %r63, 1;\n"
|
||||
" mov.u32 %r65, 0;\n"
|
||||
" setp.ne.u32 %p16, %r63, %r65;\n"
|
||||
" @%p16 bra $Lt_0_27906;\n"
|
||||
"$Lt_0_27394:\n"
|
||||
" mov.f32 %f6, %f86;\n"
|
||||
" mov.f32 %f8, %f87;\n"
|
||||
" mov.f32 %f10, %f88;\n"
|
||||
" mov.f32 %f12, %f89;\n"
|
||||
" mov.f32 %f14, %f94;\n"
|
||||
" mov.f32 %f16, %f95;\n"
|
||||
"$Lt_0_26882:\n"
|
||||
"$Lt_0_24834:\n"
|
||||
" mov.u32 %r66, 0;\n"
|
||||
" setp.ne.s32 %p17, %r13, %r66;\n"
|
||||
" @%p17 bra $Lt_0_28930;\n"
|
||||
" ld.param.u64 %rd49, [__cudaparm_kernel_pair___val_paramengv];\n"
|
||||
" add.u64 %rd50, %rd49, %rd5;\n"
|
||||
" ld.param.s32 %r67, [__cudaparm_kernel_pair_eflag];\n"
|
||||
" mov.u32 %r68, 0;\n"
|
||||
" setp.le.s32 %p18, %r67, %r68;\n"
|
||||
" @%p18 bra $Lt_0_29442;\n"
|
||||
" st.global.f32 [%rd50+0], %f28;\n"
|
||||
" cvt.s64.s32 %rd51, %r9;\n"
|
||||
" mul.wide.s32 %rd52, %r9, 4;\n"
|
||||
" add.u64 %rd50, %rd50, %rd52;\n"
|
||||
"$Lt_0_29442:\n"
|
||||
" ld.param.s32 %r69, [__cudaparm_kernel_pair_vflag];\n"
|
||||
" mov.u32 %r70, 0;\n"
|
||||
" setp.le.s32 %p19, %r69, %r70;\n"
|
||||
" @%p19 bra $Lt_0_29954;\n"
|
||||
" mov.f32 %f102, %f6;\n"
|
||||
" st.global.f32 [%rd50+0], %f102;\n"
|
||||
" cvt.s64.s32 %rd53, %r9;\n"
|
||||
" mul.wide.s32 %rd54, %r9, 4;\n"
|
||||
" add.u64 %rd55, %rd54, %rd50;\n"
|
||||
" mov.f32 %f103, %f8;\n"
|
||||
" st.global.f32 [%rd55+0], %f103;\n"
|
||||
" add.u64 %rd56, %rd54, %rd55;\n"
|
||||
" mov.f32 %f104, %f10;\n"
|
||||
" st.global.f32 [%rd56+0], %f104;\n"
|
||||
" add.u64 %rd57, %rd54, %rd56;\n"
|
||||
" mov.f32 %f105, %f12;\n"
|
||||
" st.global.f32 [%rd57+0], %f105;\n"
|
||||
" add.u64 %rd50, %rd54, %rd57;\n"
|
||||
" mov.f32 %f106, %f14;\n"
|
||||
" st.global.f32 [%rd50+0], %f106;\n"
|
||||
" mov.f32 %f107, %f16;\n"
|
||||
" add.u64 %rd58, %rd54, %rd50;\n"
|
||||
" st.global.f32 [%rd58+0], %f107;\n"
|
||||
"$Lt_0_29954:\n"
|
||||
" ld.param.u64 %rd59, [__cudaparm_kernel_pair_ans];\n"
|
||||
" mul.lo.u64 %rd60, %rd4, 16;\n"
|
||||
" add.u64 %rd61, %rd59, %rd60;\n"
|
||||
" mov.f32 %f108, %f109;\n"
|
||||
" st.global.v4.f32 [%rd61+0], {%f27,%f26,%f25,%f108};\n"
|
||||
"$Lt_0_28930:\n"
|
||||
"$Lt_0_20226:\n"
|
||||
" .loc 16 110 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_pair:\n"
|
||||
" }\n"
|
||||
" .entry kernel_pair_fast (\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_x_,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_lj1_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_lj3_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_sp_lj_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_dev_nbor,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_dev_packed,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_ans,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast___val_paramengv,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_eflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_vflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_inum,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_nbor_pitch,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_t_per_atom)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<74>;\n"
|
||||
" .reg .u64 %rd<75>;\n"
|
||||
" .reg .f32 %f<118>;\n"
|
||||
" .reg .pred %p<24>;\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32625_33_non_const_sp_lj3268[16];\n"
|
||||
" .shared .align 16 .b8 __cuda___cuda_local_var_32623_34_non_const_lj13296[1936];\n"
|
||||
" .shared .align 16 .b8 __cuda___cuda_local_var_32624_34_non_const_lj35232[1936];\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32702_55_non_const_red_acc7168[3072];\n"
|
||||
" .loc 16 118 0\n"
|
||||
"$LDWbegin_kernel_pair_fast:\n"
|
||||
" cvt.s32.u32 %r1, %tid.x;\n"
|
||||
" mov.u32 %r2, 3;\n"
|
||||
" setp.gt.s32 %p1, %r1, %r2;\n"
|
||||
" @%p1 bra $Lt_1_22530;\n"
|
||||
" .loc 16 126 0\n"
|
||||
" mov.u64 %rd1, __cuda___cuda_local_var_32625_33_non_const_sp_lj3268;\n"
|
||||
" cvt.s64.s32 %rd2, %r1;\n"
|
||||
" mul.wide.s32 %rd3, %r1, 4;\n"
|
||||
" ld.param.u64 %rd4, [__cudaparm_kernel_pair_fast_sp_lj_in];\n"
|
||||
" add.u64 %rd5, %rd4, %rd3;\n"
|
||||
" ld.global.f32 %f1, [%rd5+0];\n"
|
||||
" add.u64 %rd6, %rd3, %rd1;\n"
|
||||
" st.shared.f32 [%rd6+0], %f1;\n"
|
||||
"$Lt_1_22530:\n"
|
||||
" mov.u64 %rd1, __cuda___cuda_local_var_32625_33_non_const_sp_lj3268;\n"
|
||||
" mov.u32 %r3, 120;\n"
|
||||
" setp.gt.s32 %p2, %r1, %r3;\n"
|
||||
" @%p2 bra $Lt_1_23042;\n"
|
||||
" .loc 16 128 0\n"
|
||||
" mov.u64 %rd7, __cuda___cuda_local_var_32623_34_non_const_lj13296;\n"
|
||||
" cvt.s64.s32 %rd8, %r1;\n"
|
||||
" mul.wide.s32 %rd9, %r1, 16;\n"
|
||||
" ld.param.u64 %rd10, [__cudaparm_kernel_pair_fast_lj1_in];\n"
|
||||
" add.u64 %rd11, %rd10, %rd9;\n"
|
||||
" add.u64 %rd12, %rd9, %rd7;\n"
|
||||
" ld.global.v4.f32 {%f2,%f3,%f4,%f5}, [%rd11+0];\n"
|
||||
" st.shared.v4.f32 [%rd12+0], {%f2,%f3,%f4,%f5};\n"
|
||||
" ld.param.s32 %r4, [__cudaparm_kernel_pair_fast_eflag];\n"
|
||||
" mov.u32 %r5, 0;\n"
|
||||
" setp.le.s32 %p3, %r4, %r5;\n"
|
||||
" @%p3 bra $Lt_1_23554;\n"
|
||||
" .loc 16 130 0\n"
|
||||
" mov.u64 %rd13, __cuda___cuda_local_var_32624_34_non_const_lj35232;\n"
|
||||
" ld.param.u64 %rd14, [__cudaparm_kernel_pair_fast_lj3_in];\n"
|
||||
" add.u64 %rd15, %rd14, %rd9;\n"
|
||||
" add.u64 %rd16, %rd9, %rd13;\n"
|
||||
" ld.global.v4.f32 {%f6,%f7,%f8,%f9}, [%rd15+0];\n"
|
||||
" st.shared.v4.f32 [%rd16+0], {%f6,%f7,%f8,%f9};\n"
|
||||
"$Lt_1_23554:\n"
|
||||
" mov.u64 %rd13, __cuda___cuda_local_var_32624_34_non_const_lj35232;\n"
|
||||
"$Lt_1_23042:\n"
|
||||
" mov.u64 %rd13, __cuda___cuda_local_var_32624_34_non_const_lj35232;\n"
|
||||
" mov.u64 %rd7, __cuda___cuda_local_var_32623_34_non_const_lj13296;\n"
|
||||
" .loc 16 138 0\n"
|
||||
" mov.f32 %f10, 0f00000000; \n"
|
||||
" mov.f32 %f11, %f10;\n"
|
||||
" mov.f32 %f12, 0f00000000; \n"
|
||||
" mov.f32 %f13, %f12;\n"
|
||||
" mov.f32 %f14, 0f00000000; \n"
|
||||
" mov.f32 %f15, %f14;\n"
|
||||
" mov.f32 %f16, 0f00000000; \n"
|
||||
" mov.f32 %f17, %f16;\n"
|
||||
" mov.f32 %f18, 0f00000000; \n"
|
||||
" mov.f32 %f19, %f18;\n"
|
||||
" mov.f32 %f20, 0f00000000; \n"
|
||||
" mov.f32 %f21, %f20;\n"
|
||||
" .loc 16 140 0\n"
|
||||
" bar.sync 0;\n"
|
||||
" ld.param.s32 %r6, [__cudaparm_kernel_pair_fast_t_per_atom];\n"
|
||||
" div.s32 %r7, %r1, %r6;\n"
|
||||
" cvt.s32.u32 %r8, %ntid.x;\n"
|
||||
" div.s32 %r9, %r8, %r6;\n"
|
||||
" cvt.s32.u32 %r10, %ctaid.x;\n"
|
||||
" mul.lo.s32 %r11, %r10, %r9;\n"
|
||||
" add.s32 %r12, %r7, %r11;\n"
|
||||
" ld.param.s32 %r13, [__cudaparm_kernel_pair_fast_inum];\n"
|
||||
" setp.ge.s32 %p4, %r12, %r13;\n"
|
||||
" @%p4 bra $Lt_1_32770;\n"
|
||||
" .loc 16 145 0\n"
|
||||
" ld.param.s32 %r14, [__cudaparm_kernel_pair_fast_nbor_pitch];\n"
|
||||
" cvt.s64.s32 %rd17, %r14;\n"
|
||||
" mul.wide.s32 %rd18, %r14, 4;\n"
|
||||
" cvt.s64.s32 %rd19, %r12;\n"
|
||||
" mul.wide.s32 %rd20, %r12, 4;\n"
|
||||
" ld.param.u64 %rd21, [__cudaparm_kernel_pair_fast_dev_nbor];\n"
|
||||
" add.u64 %rd22, %rd20, %rd21;\n"
|
||||
" add.u64 %rd23, %rd18, %rd22;\n"
|
||||
" ld.global.s32 %r15, [%rd23+0];\n"
|
||||
" sub.s32 %r16, %r6, 1;\n"
|
||||
" and.b32 %r17, %r16, %r1;\n"
|
||||
" cvt.s64.s32 %rd24, %r17;\n"
|
||||
" mul.wide.s32 %rd25, %r17, 4;\n"
|
||||
" ld.param.u64 %rd26, [__cudaparm_kernel_pair_fast_dev_packed];\n"
|
||||
" setp.ne.u64 %p5, %rd26, %rd21;\n"
|
||||
" @%p5 bra $Lt_1_24834;\n"
|
||||
" cvt.s32.s64 %r18, %rd17;\n"
|
||||
" mul.lo.s32 %r19, %r18, %r6;\n"
|
||||
" mov.s32 %r20, %r19;\n"
|
||||
" mul.lo.s32 %r21, %r16, %r12;\n"
|
||||
" add.s32 %r22, %r18, %r21;\n"
|
||||
" cvt.s64.s32 %rd27, %r22;\n"
|
||||
" mul.wide.s32 %rd28, %r22, 4;\n"
|
||||
" add.u64 %rd29, %rd23, %rd28;\n"
|
||||
" and.b32 %r23, %r16, %r15;\n"
|
||||
" cvt.s64.s32 %rd30, %r23;\n"
|
||||
" div.s32 %r24, %r15, %r6;\n"
|
||||
" mul.lo.s32 %r25, %r19, %r24;\n"
|
||||
" cvt.s64.s32 %rd31, %r25;\n"
|
||||
" add.u64 %rd32, %rd30, %rd31;\n"
|
||||
" mul.lo.u64 %rd33, %rd32, 4;\n"
|
||||
" add.u64 %rd34, %rd29, %rd33;\n"
|
||||
" add.u64 %rd35, %rd25, %rd29;\n"
|
||||
" bra.uni $Lt_1_24578;\n"
|
||||
"$Lt_1_24834:\n"
|
||||
" add.u64 %rd36, %rd18, %rd23;\n"
|
||||
" ld.global.s32 %r26, [%rd36+0];\n"
|
||||
" cvt.s64.s32 %rd37, %r26;\n"
|
||||
" mul.wide.s32 %rd38, %r26, 4;\n"
|
||||
" add.u64 %rd39, %rd26, %rd38;\n"
|
||||
" cvt.s64.s32 %rd40, %r15;\n"
|
||||
" mul.wide.s32 %rd41, %r15, 4;\n"
|
||||
" add.u64 %rd34, %rd39, %rd41;\n"
|
||||
" mov.s32 %r20, %r6;\n"
|
||||
" add.u64 %rd35, %rd25, %rd39;\n"
|
||||
"$Lt_1_24578:\n"
|
||||
" .loc 16 148 0\n"
|
||||
" ld.global.s32 %r27, [%rd22+0];\n"
|
||||
" mov.u32 %r28, %r27;\n"
|
||||
" mov.s32 %r29, 0;\n"
|
||||
" mov.u32 %r30, %r29;\n"
|
||||
" mov.s32 %r31, 0;\n"
|
||||
" mov.u32 %r32, %r31;\n"
|
||||
" mov.s32 %r33, 0;\n"
|
||||
" mov.u32 %r34, %r33;\n"
|
||||
" tex.1d.v4.f32.s32 {%f22,%f23,%f24,%f25},[pos_tex,{%r28,%r30,%r32,%r34}];\n"
|
||||
" mov.f32 %f26, %f22;\n"
|
||||
" mov.f32 %f27, %f23;\n"
|
||||
" mov.f32 %f28, %f24;\n"
|
||||
" mov.f32 %f29, %f25;\n"
|
||||
" setp.ge.u64 %p6, %rd35, %rd34;\n"
|
||||
" @%p6 bra $Lt_1_34306;\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r35, %f29;\n"
|
||||
" cvt.s64.s32 %rd42, %r20;\n"
|
||||
" mul.lo.s32 %r36, %r35, 11;\n"
|
||||
" cvt.rn.f32.s32 %f30, %r36;\n"
|
||||
" mov.f32 %f31, 0f00000000; \n"
|
||||
" mov.f32 %f32, 0f00000000; \n"
|
||||
" mov.f32 %f33, 0f00000000; \n"
|
||||
" mov.f32 %f34, 0f00000000; \n"
|
||||
"$Lt_1_25602:\n"
|
||||
" .loc 16 155 0\n"
|
||||
" ld.global.s32 %r37, [%rd35+0];\n"
|
||||
" .loc 16 156 0\n"
|
||||
" shr.s32 %r38, %r37, 30;\n"
|
||||
" and.b32 %r39, %r38, 3;\n"
|
||||
" cvt.s64.s32 %rd43, %r39;\n"
|
||||
" mul.wide.s32 %rd44, %r39, 4;\n"
|
||||
" add.u64 %rd45, %rd1, %rd44;\n"
|
||||
" ld.shared.f32 %f35, [%rd45+0];\n"
|
||||
" .loc 16 159 0\n"
|
||||
" and.b32 %r40, %r37, 1073741823;\n"
|
||||
" mov.u32 %r41, %r40;\n"
|
||||
" mov.s32 %r42, 0;\n"
|
||||
" mov.u32 %r43, %r42;\n"
|
||||
" mov.s32 %r44, 0;\n"
|
||||
" mov.u32 %r45, %r44;\n"
|
||||
" mov.s32 %r46, 0;\n"
|
||||
" mov.u32 %r47, %r46;\n"
|
||||
" tex.1d.v4.f32.s32 {%f36,%f37,%f38,%f39},[pos_tex,{%r41,%r43,%r45,%r47}];\n"
|
||||
" mov.f32 %f40, %f36;\n"
|
||||
" mov.f32 %f41, %f37;\n"
|
||||
" mov.f32 %f42, %f38;\n"
|
||||
" mov.f32 %f43, %f39;\n"
|
||||
" sub.ftz.f32 %f44, %f27, %f41;\n"
|
||||
" sub.ftz.f32 %f45, %f26, %f40;\n"
|
||||
" sub.ftz.f32 %f46, %f28, %f42;\n"
|
||||
" mul.ftz.f32 %f47, %f44, %f44;\n"
|
||||
" fma.rn.ftz.f32 %f48, %f45, %f45, %f47;\n"
|
||||
" fma.rn.ftz.f32 %f49, %f46, %f46, %f48;\n"
|
||||
" add.ftz.f32 %f50, %f30, %f43;\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r48, %f50;\n"
|
||||
" cvt.s64.s32 %rd46, %r48;\n"
|
||||
" mul.wide.s32 %rd47, %r48, 16;\n"
|
||||
" add.u64 %rd48, %rd47, %rd7;\n"
|
||||
" ld.shared.f32 %f51, [%rd48+0];\n"
|
||||
" setp.gt.ftz.f32 %p7, %f51, %f49;\n"
|
||||
" @!%p7 bra $Lt_1_27906;\n"
|
||||
" rcp.approx.ftz.f32 %f52, %f49;\n"
|
||||
" ld.shared.f32 %f53, [%rd48+4];\n"
|
||||
" mov.f32 %f54, 0f40000000; \n"
|
||||
" setp.eq.ftz.f32 %p8, %f53, %f54;\n"
|
||||
" @!%p8 bra $Lt_1_26626;\n"
|
||||
" .loc 16 173 0\n"
|
||||
" mul.ftz.f32 %f55, %f52, %f52;\n"
|
||||
" mov.f32 %f56, %f55;\n"
|
||||
" .loc 16 174 0\n"
|
||||
" mul.ftz.f32 %f57, %f55, %f55;\n"
|
||||
" bra.uni $Lt_1_26882;\n"
|
||||
"$Lt_1_26626:\n"
|
||||
" mov.f32 %f58, 0f3f800000; \n"
|
||||
" setp.eq.ftz.f32 %p9, %f53, %f58;\n"
|
||||
" @!%p9 bra $Lt_1_27138;\n"
|
||||
" .loc 16 176 0\n"
|
||||
" sqrt.approx.ftz.f32 %f59, %f52;\n"
|
||||
" mul.ftz.f32 %f60, %f52, %f59;\n"
|
||||
" mov.f32 %f57, %f60;\n"
|
||||
" .loc 16 177 0\n"
|
||||
" mul.ftz.f32 %f56, %f60, %f60;\n"
|
||||
" bra.uni $Lt_1_26882;\n"
|
||||
"$Lt_1_27138:\n"
|
||||
" .loc 16 179 0\n"
|
||||
" mul.ftz.f32 %f61, %f52, %f52;\n"
|
||||
" mul.ftz.f32 %f62, %f52, %f61;\n"
|
||||
" mov.f32 %f56, %f62;\n"
|
||||
" .loc 16 180 0\n"
|
||||
" mov.f32 %f57, %f62;\n"
|
||||
"$Lt_1_26882:\n"
|
||||
"$Lt_1_26370:\n"
|
||||
" .loc 16 182 0\n"
|
||||
" mul.ftz.f32 %f63, %f52, %f35;\n"
|
||||
" mul.ftz.f32 %f64, %f56, %f63;\n"
|
||||
" ld.shared.v2.f32 {%f65,%f66}, [%rd48+8];\n"
|
||||
" mul.ftz.f32 %f67, %f65, %f57;\n"
|
||||
" sub.ftz.f32 %f68, %f67, %f66;\n"
|
||||
" mul.ftz.f32 %f69, %f64, %f68;\n"
|
||||
" .loc 16 184 0\n"
|
||||
" fma.rn.ftz.f32 %f33, %f45, %f69, %f33;\n"
|
||||
" .loc 16 185 0\n"
|
||||
" fma.rn.ftz.f32 %f32, %f44, %f69, %f32;\n"
|
||||
" .loc 16 186 0\n"
|
||||
" fma.rn.ftz.f32 %f31, %f46, %f69, %f31;\n"
|
||||
" ld.param.s32 %r49, [__cudaparm_kernel_pair_fast_eflag];\n"
|
||||
" mov.u32 %r50, 0;\n"
|
||||
" setp.le.s32 %p10, %r49, %r50;\n"
|
||||
" @%p10 bra $Lt_1_27394;\n"
|
||||
" .loc 16 188 0\n"
|
||||
" add.u64 %rd49, %rd47, %rd13;\n"
|
||||
" ld.shared.v4.f32 {%f70,%f71,%f72,_}, [%rd49+0];\n"
|
||||
" mul.ftz.f32 %f73, %f35, %f56;\n"
|
||||
" mul.ftz.f32 %f74, %f70, %f57;\n"
|
||||
" sub.ftz.f32 %f75, %f74, %f71;\n"
|
||||
" mul.ftz.f32 %f76, %f73, %f75;\n"
|
||||
" sub.ftz.f32 %f77, %f76, %f72;\n"
|
||||
" add.ftz.f32 %f34, %f34, %f77;\n"
|
||||
"$Lt_1_27394:\n"
|
||||
" ld.param.s32 %r51, [__cudaparm_kernel_pair_fast_vflag];\n"
|
||||
" mov.u32 %r52, 0;\n"
|
||||
" setp.le.s32 %p11, %r51, %r52;\n"
|
||||
" @%p11 bra $Lt_1_27906;\n"
|
||||
" .loc 16 191 0\n"
|
||||
" mov.f32 %f78, %f11;\n"
|
||||
" mul.ftz.f32 %f79, %f45, %f45;\n"
|
||||
" fma.rn.ftz.f32 %f80, %f69, %f79, %f78;\n"
|
||||
" mov.f32 %f11, %f80;\n"
|
||||
" .loc 16 192 0\n"
|
||||
" mov.f32 %f81, %f13;\n"
|
||||
" fma.rn.ftz.f32 %f82, %f69, %f47, %f81;\n"
|
||||
" mov.f32 %f13, %f82;\n"
|
||||
" .loc 16 193 0\n"
|
||||
" mov.f32 %f83, %f15;\n"
|
||||
" mul.ftz.f32 %f84, %f46, %f46;\n"
|
||||
" fma.rn.ftz.f32 %f85, %f69, %f84, %f83;\n"
|
||||
" mov.f32 %f15, %f85;\n"
|
||||
" .loc 16 194 0\n"
|
||||
" mov.f32 %f86, %f17;\n"
|
||||
" mul.ftz.f32 %f87, %f44, %f45;\n"
|
||||
" fma.rn.ftz.f32 %f88, %f69, %f87, %f86;\n"
|
||||
" mov.f32 %f17, %f88;\n"
|
||||
" .loc 16 195 0\n"
|
||||
" mov.f32 %f89, %f19;\n"
|
||||
" mul.ftz.f32 %f90, %f45, %f46;\n"
|
||||
" fma.rn.ftz.f32 %f91, %f69, %f90, %f89;\n"
|
||||
" mov.f32 %f19, %f91;\n"
|
||||
" .loc 16 196 0\n"
|
||||
" mul.ftz.f32 %f92, %f44, %f46;\n"
|
||||
" fma.rn.ftz.f32 %f20, %f69, %f92, %f20;\n"
|
||||
" mov.f32 %f21, %f20;\n"
|
||||
"$Lt_1_27906:\n"
|
||||
"$Lt_1_25858:\n"
|
||||
" .loc 16 153 0\n"
|
||||
" mul.lo.u64 %rd50, %rd42, 4;\n"
|
||||
" add.u64 %rd35, %rd35, %rd50;\n"
|
||||
" setp.lt.u64 %p12, %rd35, %rd34;\n"
|
||||
" @%p12 bra $Lt_1_25602;\n"
|
||||
" bra.uni $Lt_1_25090;\n"
|
||||
"$Lt_1_34306:\n"
|
||||
" mov.f32 %f31, 0f00000000; \n"
|
||||
" mov.f32 %f32, 0f00000000; \n"
|
||||
" mov.f32 %f33, 0f00000000; \n"
|
||||
" mov.f32 %f34, 0f00000000; \n"
|
||||
"$Lt_1_25090:\n"
|
||||
" mov.u32 %r53, 1;\n"
|
||||
" setp.le.s32 %p13, %r6, %r53;\n"
|
||||
" @%p13 bra $Lt_1_30722;\n"
|
||||
" .loc 16 201 0\n"
|
||||
" mov.u64 %rd51, __cuda___cuda_local_var_32702_55_non_const_red_acc7168;\n"
|
||||
" cvt.s64.s32 %rd52, %r1;\n"
|
||||
" mul.wide.s32 %rd53, %r1, 4;\n"
|
||||
" add.u64 %rd54, %rd51, %rd53;\n"
|
||||
" mov.f32 %f93, %f33;\n"
|
||||
" st.shared.f32 [%rd54+0], %f93;\n"
|
||||
" mov.f32 %f94, %f32;\n"
|
||||
" st.shared.f32 [%rd54+512], %f94;\n"
|
||||
" mov.f32 %f95, %f31;\n"
|
||||
" st.shared.f32 [%rd54+1024], %f95;\n"
|
||||
" mov.f32 %f96, %f34;\n"
|
||||
" st.shared.f32 [%rd54+1536], %f96;\n"
|
||||
" shr.s32 %r54, %r6, 31;\n"
|
||||
" mov.s32 %r55, 1;\n"
|
||||
" and.b32 %r56, %r54, %r55;\n"
|
||||
" add.s32 %r57, %r56, %r6;\n"
|
||||
" shr.s32 %r58, %r57, 1;\n"
|
||||
" mov.s32 %r59, %r58;\n"
|
||||
" mov.u32 %r60, 0;\n"
|
||||
" setp.ne.u32 %p14, %r58, %r60;\n"
|
||||
" @!%p14 bra $Lt_1_29186;\n"
|
||||
"$Lt_1_29698:\n"
|
||||
" setp.ge.u32 %p15, %r17, %r59;\n"
|
||||
" @%p15 bra $Lt_1_29954;\n"
|
||||
" add.u32 %r61, %r1, %r59;\n"
|
||||
" cvt.u64.u32 %rd55, %r61;\n"
|
||||
" mul.wide.u32 %rd56, %r61, 4;\n"
|
||||
" add.u64 %rd57, %rd51, %rd56;\n"
|
||||
" ld.shared.f32 %f97, [%rd57+0];\n"
|
||||
" add.ftz.f32 %f93, %f97, %f93;\n"
|
||||
" st.shared.f32 [%rd54+0], %f93;\n"
|
||||
" ld.shared.f32 %f98, [%rd57+512];\n"
|
||||
" add.ftz.f32 %f94, %f98, %f94;\n"
|
||||
" st.shared.f32 [%rd54+512], %f94;\n"
|
||||
" ld.shared.f32 %f99, [%rd57+1024];\n"
|
||||
" add.ftz.f32 %f95, %f99, %f95;\n"
|
||||
" st.shared.f32 [%rd54+1024], %f95;\n"
|
||||
" ld.shared.f32 %f100, [%rd57+1536];\n"
|
||||
" add.ftz.f32 %f96, %f100, %f96;\n"
|
||||
" st.shared.f32 [%rd54+1536], %f96;\n"
|
||||
"$Lt_1_29954:\n"
|
||||
" shr.u32 %r59, %r59, 1;\n"
|
||||
" mov.u32 %r62, 0;\n"
|
||||
" setp.ne.u32 %p16, %r59, %r62;\n"
|
||||
" @%p16 bra $Lt_1_29698;\n"
|
||||
"$Lt_1_29186:\n"
|
||||
" mov.f32 %f33, %f93;\n"
|
||||
" mov.f32 %f32, %f94;\n"
|
||||
" mov.f32 %f31, %f95;\n"
|
||||
" mov.f32 %f34, %f96;\n"
|
||||
" ld.param.s32 %r63, [__cudaparm_kernel_pair_fast_vflag];\n"
|
||||
" mov.u32 %r64, 0;\n"
|
||||
" setp.le.s32 %p17, %r63, %r64;\n"
|
||||
" @%p17 bra $Lt_1_30722;\n"
|
||||
" mov.f32 %f93, %f11;\n"
|
||||
" st.shared.f32 [%rd54+0], %f93;\n"
|
||||
" mov.f32 %f94, %f13;\n"
|
||||
" st.shared.f32 [%rd54+512], %f94;\n"
|
||||
" mov.f32 %f95, %f15;\n"
|
||||
" st.shared.f32 [%rd54+1024], %f95;\n"
|
||||
" mov.f32 %f96, %f17;\n"
|
||||
" st.shared.f32 [%rd54+1536], %f96;\n"
|
||||
" mov.f32 %f101, %f19;\n"
|
||||
" st.shared.f32 [%rd54+2048], %f101;\n"
|
||||
" mov.f32 %f102, %f20;\n"
|
||||
" st.shared.f32 [%rd54+2560], %f102;\n"
|
||||
" mov.s32 %r65, %r58;\n"
|
||||
" @!%p14 bra $Lt_1_31234;\n"
|
||||
"$Lt_1_31746:\n"
|
||||
" setp.ge.u32 %p18, %r17, %r65;\n"
|
||||
" @%p18 bra $Lt_1_32002;\n"
|
||||
" add.u32 %r66, %r1, %r65;\n"
|
||||
" cvt.u64.u32 %rd58, %r66;\n"
|
||||
" mul.wide.u32 %rd59, %r66, 4;\n"
|
||||
" add.u64 %rd60, %rd51, %rd59;\n"
|
||||
" ld.shared.f32 %f103, [%rd60+0];\n"
|
||||
" add.ftz.f32 %f93, %f103, %f93;\n"
|
||||
" st.shared.f32 [%rd54+0], %f93;\n"
|
||||
" ld.shared.f32 %f104, [%rd60+512];\n"
|
||||
" add.ftz.f32 %f94, %f104, %f94;\n"
|
||||
" st.shared.f32 [%rd54+512], %f94;\n"
|
||||
" ld.shared.f32 %f105, [%rd60+1024];\n"
|
||||
" add.ftz.f32 %f95, %f105, %f95;\n"
|
||||
" st.shared.f32 [%rd54+1024], %f95;\n"
|
||||
" ld.shared.f32 %f106, [%rd60+1536];\n"
|
||||
" add.ftz.f32 %f96, %f106, %f96;\n"
|
||||
" st.shared.f32 [%rd54+1536], %f96;\n"
|
||||
" ld.shared.f32 %f107, [%rd60+2048];\n"
|
||||
" add.ftz.f32 %f101, %f107, %f101;\n"
|
||||
" st.shared.f32 [%rd54+2048], %f101;\n"
|
||||
" ld.shared.f32 %f108, [%rd60+2560];\n"
|
||||
" add.ftz.f32 %f102, %f108, %f102;\n"
|
||||
" st.shared.f32 [%rd54+2560], %f102;\n"
|
||||
"$Lt_1_32002:\n"
|
||||
" shr.u32 %r65, %r65, 1;\n"
|
||||
" mov.u32 %r67, 0;\n"
|
||||
" setp.ne.u32 %p19, %r65, %r67;\n"
|
||||
" @%p19 bra $Lt_1_31746;\n"
|
||||
"$Lt_1_31234:\n"
|
||||
" mov.f32 %f11, %f93;\n"
|
||||
" mov.f32 %f13, %f94;\n"
|
||||
" mov.f32 %f15, %f95;\n"
|
||||
" mov.f32 %f17, %f96;\n"
|
||||
" mov.f32 %f19, %f101;\n"
|
||||
" mov.f32 %f21, %f102;\n"
|
||||
"$Lt_1_30722:\n"
|
||||
"$Lt_1_28674:\n"
|
||||
" mov.u32 %r68, 0;\n"
|
||||
" setp.ne.s32 %p20, %r17, %r68;\n"
|
||||
" @%p20 bra $Lt_1_32770;\n"
|
||||
" ld.param.u64 %rd61, [__cudaparm_kernel_pair_fast___val_paramengv];\n"
|
||||
" add.u64 %rd62, %rd61, %rd20;\n"
|
||||
" ld.param.s32 %r69, [__cudaparm_kernel_pair_fast_eflag];\n"
|
||||
" mov.u32 %r70, 0;\n"
|
||||
" setp.le.s32 %p21, %r69, %r70;\n"
|
||||
" @%p21 bra $Lt_1_33282;\n"
|
||||
" st.global.f32 [%rd62+0], %f34;\n"
|
||||
" cvt.s64.s32 %rd63, %r13;\n"
|
||||
" mul.wide.s32 %rd64, %r13, 4;\n"
|
||||
" add.u64 %rd62, %rd62, %rd64;\n"
|
||||
"$Lt_1_33282:\n"
|
||||
" ld.param.s32 %r71, [__cudaparm_kernel_pair_fast_vflag];\n"
|
||||
" mov.u32 %r72, 0;\n"
|
||||
" setp.le.s32 %p22, %r71, %r72;\n"
|
||||
" @%p22 bra $Lt_1_33794;\n"
|
||||
" mov.f32 %f109, %f11;\n"
|
||||
" st.global.f32 [%rd62+0], %f109;\n"
|
||||
" cvt.s64.s32 %rd65, %r13;\n"
|
||||
" mul.wide.s32 %rd66, %r13, 4;\n"
|
||||
" add.u64 %rd67, %rd66, %rd62;\n"
|
||||
" mov.f32 %f110, %f13;\n"
|
||||
" st.global.f32 [%rd67+0], %f110;\n"
|
||||
" add.u64 %rd68, %rd66, %rd67;\n"
|
||||
" mov.f32 %f111, %f15;\n"
|
||||
" st.global.f32 [%rd68+0], %f111;\n"
|
||||
" add.u64 %rd69, %rd66, %rd68;\n"
|
||||
" mov.f32 %f112, %f17;\n"
|
||||
" st.global.f32 [%rd69+0], %f112;\n"
|
||||
" add.u64 %rd62, %rd66, %rd69;\n"
|
||||
" mov.f32 %f113, %f19;\n"
|
||||
" st.global.f32 [%rd62+0], %f113;\n"
|
||||
" mov.f32 %f114, %f21;\n"
|
||||
" add.u64 %rd70, %rd66, %rd62;\n"
|
||||
" st.global.f32 [%rd70+0], %f114;\n"
|
||||
"$Lt_1_33794:\n"
|
||||
" ld.param.u64 %rd71, [__cudaparm_kernel_pair_fast_ans];\n"
|
||||
" mul.lo.u64 %rd72, %rd19, 16;\n"
|
||||
" add.u64 %rd73, %rd71, %rd72;\n"
|
||||
" mov.f32 %f115, %f116;\n"
|
||||
" st.global.v4.f32 [%rd73+0], {%f33,%f32,%f31,%f115};\n"
|
||||
"$Lt_1_32770:\n"
|
||||
"$Lt_1_24066:\n"
|
||||
" .loc 16 204 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_pair_fast:\n"
|
||||
" }\n"
|
||||
;
|
||||
1200
lib/gpu/charmm_long.ptx
Normal file
1200
lib/gpu/charmm_long.ptx
Normal file
File diff suppressed because it is too large
Load Diff
1139
lib/gpu/charmm_long_ptx.h
Normal file
1139
lib/gpu/charmm_long_ptx.h
Normal file
File diff suppressed because it is too large
Load Diff
1009
lib/gpu/coul_long.ptx
Normal file
1009
lib/gpu/coul_long.ptx
Normal file
File diff suppressed because it is too large
Load Diff
957
lib/gpu/coul_long_ptx.h
Normal file
957
lib/gpu/coul_long_ptx.h
Normal file
@ -0,0 +1,957 @@
|
||||
const char * coul_long =
|
||||
" .version 2.3\n"
|
||||
" .target sm_20\n"
|
||||
" .address_size 64\n"
|
||||
" .global .texref pos_tex;\n"
|
||||
" .global .texref q_tex;\n"
|
||||
" .entry kernel_pair (\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_x_,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_lj1,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_lj3,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_lj_types,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_sp_cl_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_dev_nbor,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_dev_packed,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_ans,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_engv,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_eflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_vflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_inum,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_nbor_pitch,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_q_,\n"
|
||||
" .param .f32 __cudaparm_kernel_pair_cut_coulsq,\n"
|
||||
" .param .f32 __cudaparm_kernel_pair_qqrd2e,\n"
|
||||
" .param .f32 __cudaparm_kernel_pair_g_ewald,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_t_per_atom)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<81>;\n"
|
||||
" .reg .u64 %rd<58>;\n"
|
||||
" .reg .f32 %f<132>;\n"
|
||||
" .reg .pred %p<19>;\n"
|
||||
" .shared .align 16 .b8 __cuda___cuda_local_var_32541_33_non_const_sp_cl112[16];\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32611_37_non_const_red_acc128[3072];\n"
|
||||
" .loc 16 36 0\n"
|
||||
"$LDWbegin_kernel_pair:\n"
|
||||
" .loc 16 41 0\n"
|
||||
" ld.param.u64 %rd1, [__cudaparm_kernel_pair_sp_cl_in];\n"
|
||||
" ldu.global.f32 %f1, [%rd1+0];\n"
|
||||
" .loc 16 42 0\n"
|
||||
" ld.global.f32 %f2, [%rd1+4];\n"
|
||||
" .loc 16 43 0\n"
|
||||
" ld.global.f32 %f3, [%rd1+8];\n"
|
||||
" .loc 16 44 0\n"
|
||||
" ld.global.f32 %f4, [%rd1+12];\n"
|
||||
" st.shared.v4.f32 [__cuda___cuda_local_var_32541_33_non_const_sp_cl112+0], {%f1,%f2,%f3,%f4};\n"
|
||||
" .loc 16 51 0\n"
|
||||
" mov.f32 %f5, 0f00000000; \n"
|
||||
" mov.f32 %f6, %f5;\n"
|
||||
" mov.f32 %f7, 0f00000000; \n"
|
||||
" mov.f32 %f8, %f7;\n"
|
||||
" mov.f32 %f9, 0f00000000; \n"
|
||||
" mov.f32 %f10, %f9;\n"
|
||||
" mov.f32 %f11, 0f00000000; \n"
|
||||
" mov.f32 %f12, %f11;\n"
|
||||
" mov.f32 %f13, 0f00000000; \n"
|
||||
" mov.f32 %f14, %f13;\n"
|
||||
" mov.f32 %f15, 0f00000000; \n"
|
||||
" mov.f32 %f16, %f15;\n"
|
||||
" ld.param.s32 %r1, [__cudaparm_kernel_pair_t_per_atom];\n"
|
||||
" cvt.s32.u32 %r2, %tid.x;\n"
|
||||
" div.s32 %r3, %r2, %r1;\n"
|
||||
" cvt.s32.u32 %r4, %ntid.x;\n"
|
||||
" div.s32 %r5, %r4, %r1;\n"
|
||||
" cvt.s32.u32 %r6, %ctaid.x;\n"
|
||||
" mul.lo.s32 %r7, %r6, %r5;\n"
|
||||
" add.s32 %r8, %r3, %r7;\n"
|
||||
" ld.param.s32 %r9, [__cudaparm_kernel_pair_inum];\n"
|
||||
" setp.ge.s32 %p1, %r8, %r9;\n"
|
||||
" @%p1 bra $Lt_0_25858;\n"
|
||||
" .loc 16 56 0\n"
|
||||
" cvt.s64.s32 %rd2, %r8;\n"
|
||||
" mul.wide.s32 %rd3, %r8, 4;\n"
|
||||
" ld.param.u64 %rd4, [__cudaparm_kernel_pair_dev_nbor];\n"
|
||||
" add.u64 %rd5, %rd3, %rd4;\n"
|
||||
" ld.global.s32 %r10, [%rd5+0];\n"
|
||||
" ld.param.s32 %r11, [__cudaparm_kernel_pair_nbor_pitch];\n"
|
||||
" cvt.s64.s32 %rd6, %r11;\n"
|
||||
" mul.wide.s32 %rd7, %r11, 4;\n"
|
||||
" add.u64 %rd8, %rd7, %rd5;\n"
|
||||
" ld.global.s32 %r12, [%rd8+0];\n"
|
||||
" sub.s32 %r13, %r1, 1;\n"
|
||||
" and.b32 %r14, %r13, %r2;\n"
|
||||
" cvt.s64.s32 %rd9, %r14;\n"
|
||||
" mul.wide.s32 %rd10, %r14, 4;\n"
|
||||
" ld.param.u64 %rd11, [__cudaparm_kernel_pair_dev_packed];\n"
|
||||
" setp.ne.u64 %p2, %rd11, %rd4;\n"
|
||||
" @%p2 bra $Lt_0_19458;\n"
|
||||
" cvt.s32.s64 %r15, %rd6;\n"
|
||||
" mul.lo.s32 %r16, %r15, %r1;\n"
|
||||
" mov.s32 %r17, %r16;\n"
|
||||
" mul.lo.s32 %r18, %r13, %r8;\n"
|
||||
" add.s32 %r19, %r15, %r18;\n"
|
||||
" cvt.s64.s32 %rd12, %r19;\n"
|
||||
" mul.wide.s32 %rd13, %r19, 4;\n"
|
||||
" add.u64 %rd14, %rd8, %rd13;\n"
|
||||
" and.b32 %r20, %r13, %r12;\n"
|
||||
" cvt.s64.s32 %rd15, %r20;\n"
|
||||
" div.s32 %r21, %r12, %r1;\n"
|
||||
" mul.lo.s32 %r22, %r16, %r21;\n"
|
||||
" cvt.s64.s32 %rd16, %r22;\n"
|
||||
" add.u64 %rd17, %rd15, %rd16;\n"
|
||||
" mul.lo.u64 %rd18, %rd17, 4;\n"
|
||||
" add.u64 %rd19, %rd14, %rd18;\n"
|
||||
" add.u64 %rd20, %rd10, %rd14;\n"
|
||||
" bra.uni $Lt_0_19202;\n"
|
||||
"$Lt_0_19458:\n"
|
||||
" add.u64 %rd21, %rd7, %rd8;\n"
|
||||
" ld.global.s32 %r23, [%rd21+0];\n"
|
||||
" cvt.s64.s32 %rd22, %r23;\n"
|
||||
" mul.wide.s32 %rd23, %r23, 4;\n"
|
||||
" add.u64 %rd24, %rd11, %rd23;\n"
|
||||
" cvt.s64.s32 %rd25, %r12;\n"
|
||||
" mul.wide.s32 %rd26, %r12, 4;\n"
|
||||
" add.u64 %rd19, %rd24, %rd26;\n"
|
||||
" mov.s32 %r17, %r1;\n"
|
||||
" add.u64 %rd20, %rd10, %rd24;\n"
|
||||
"$Lt_0_19202:\n"
|
||||
" .loc 16 59 0\n"
|
||||
" mov.u32 %r24, %r10;\n"
|
||||
" mov.s32 %r25, 0;\n"
|
||||
" mov.u32 %r26, %r25;\n"
|
||||
" mov.s32 %r27, 0;\n"
|
||||
" mov.u32 %r28, %r27;\n"
|
||||
" mov.s32 %r29, 0;\n"
|
||||
" mov.u32 %r30, %r29;\n"
|
||||
" tex.1d.v4.f32.s32 {%f17,%f18,%f19,%f20},[pos_tex,{%r24,%r26,%r28,%r30}];\n"
|
||||
" mov.f32 %f21, %f17;\n"
|
||||
" mov.f32 %f22, %f18;\n"
|
||||
" mov.f32 %f23, %f19;\n"
|
||||
" .loc 16 60 0\n"
|
||||
" mov.u32 %r31, %r10;\n"
|
||||
" mov.s32 %r32, 0;\n"
|
||||
" mov.u32 %r33, %r32;\n"
|
||||
" mov.s32 %r34, 0;\n"
|
||||
" mov.u32 %r35, %r34;\n"
|
||||
" mov.s32 %r36, 0;\n"
|
||||
" mov.u32 %r37, %r36;\n"
|
||||
" tex.1d.v4.f32.s32 {%f24,%f25,%f26,%f27},[q_tex,{%r31,%r33,%r35,%r37}];\n"
|
||||
" mov.f32 %f28, %f24;\n"
|
||||
" setp.ge.u64 %p3, %rd20, %rd19;\n"
|
||||
" @%p3 bra $Lt_0_27394;\n"
|
||||
" cvt.s64.s32 %rd27, %r17;\n"
|
||||
" ld.param.f32 %f29, [__cudaparm_kernel_pair_cut_coulsq];\n"
|
||||
" mov.f32 %f30, 0f00000000; \n"
|
||||
" mov.f32 %f31, 0f00000000; \n"
|
||||
" mov.f32 %f32, 0f00000000; \n"
|
||||
" mov.f32 %f33, 0f00000000; \n"
|
||||
" mov.u64 %rd28, __cuda___cuda_local_var_32541_33_non_const_sp_cl112;\n"
|
||||
"$Lt_0_20226:\n"
|
||||
" .loc 16 63 0\n"
|
||||
" ld.global.s32 %r38, [%rd20+0];\n"
|
||||
" .loc 16 66 0\n"
|
||||
" mov.f32 %f34, 0f3f800000; \n"
|
||||
" shr.s32 %r39, %r38, 30;\n"
|
||||
" and.b32 %r40, %r39, 3;\n"
|
||||
" cvt.s64.s32 %rd29, %r40;\n"
|
||||
" mul.wide.s32 %rd30, %r40, 4;\n"
|
||||
" add.u64 %rd31, %rd28, %rd30;\n"
|
||||
" ld.shared.f32 %f35, [%rd31+0];\n"
|
||||
" sub.ftz.f32 %f36, %f34, %f35;\n"
|
||||
" .loc 16 69 0\n"
|
||||
" and.b32 %r41, %r38, 1073741823;\n"
|
||||
" mov.u32 %r42, %r41;\n"
|
||||
" mov.s32 %r43, 0;\n"
|
||||
" mov.u32 %r44, %r43;\n"
|
||||
" mov.s32 %r45, 0;\n"
|
||||
" mov.u32 %r46, %r45;\n"
|
||||
" mov.s32 %r47, 0;\n"
|
||||
" mov.u32 %r48, %r47;\n"
|
||||
" tex.1d.v4.f32.s32 {%f37,%f38,%f39,%f40},[pos_tex,{%r42,%r44,%r46,%r48}];\n"
|
||||
" mov.f32 %f41, %f37;\n"
|
||||
" mov.f32 %f42, %f38;\n"
|
||||
" mov.f32 %f43, %f39;\n"
|
||||
" sub.ftz.f32 %f44, %f22, %f42;\n"
|
||||
" sub.ftz.f32 %f45, %f21, %f41;\n"
|
||||
" sub.ftz.f32 %f46, %f23, %f43;\n"
|
||||
" mul.ftz.f32 %f47, %f44, %f44;\n"
|
||||
" fma.rn.ftz.f32 %f48, %f45, %f45, %f47;\n"
|
||||
" fma.rn.ftz.f32 %f49, %f46, %f46, %f48;\n"
|
||||
" setp.lt.ftz.f32 %p4, %f49, %f29;\n"
|
||||
" @!%p4 bra $Lt_0_20994;\n"
|
||||
" .loc 20 518 0\n"
|
||||
" rcp.approx.ftz.f32 %f50, %f49;\n"
|
||||
" rsqrt.approx.ftz.f32 %f51, %f50;\n"
|
||||
" ld.param.f32 %f52, [__cudaparm_kernel_pair_g_ewald];\n"
|
||||
" mul.ftz.f32 %f53, %f52, %f51;\n"
|
||||
" mul.ftz.f32 %f54, %f53, %f53;\n"
|
||||
" neg.ftz.f32 %f55, %f54;\n"
|
||||
" mov.f32 %f56, 0f3fb8aa3b; \n"
|
||||
" mul.ftz.f32 %f57, %f55, %f56;\n"
|
||||
" ex2.approx.ftz.f32 %f58, %f57;\n"
|
||||
" .loc 16 85 0\n"
|
||||
" mov.f32 %f59, 0f3f800000; \n"
|
||||
" mov.f32 %f60, 0f3ea7ba05; \n"
|
||||
" fma.rn.ftz.f32 %f61, %f60, %f53, %f59;\n"
|
||||
" rcp.approx.ftz.f32 %f62, %f61;\n"
|
||||
" mov.f32 %f63, 0f3e827906; \n"
|
||||
" mov.f32 %f64, 0fbe91a98e; \n"
|
||||
" mov.f32 %f65, 0f3fb5f0e3; \n"
|
||||
" mov.f32 %f66, 0fbfba00e3; \n"
|
||||
" mov.f32 %f67, 0f3f87dc22; \n"
|
||||
" fma.rn.ftz.f32 %f68, %f67, %f62, %f66;\n"
|
||||
" fma.rn.ftz.f32 %f69, %f62, %f68, %f65;\n"
|
||||
" fma.rn.ftz.f32 %f70, %f62, %f69, %f64;\n"
|
||||
" fma.rn.ftz.f32 %f71, %f62, %f70, %f63;\n"
|
||||
" mul.ftz.f32 %f72, %f62, %f71;\n"
|
||||
" mul.ftz.f32 %f73, %f58, %f72;\n"
|
||||
" .loc 16 86 0\n"
|
||||
" mov.u32 %r49, %r41;\n"
|
||||
" mov.s32 %r50, 0;\n"
|
||||
" mov.u32 %r51, %r50;\n"
|
||||
" mov.s32 %r52, 0;\n"
|
||||
" mov.u32 %r53, %r52;\n"
|
||||
" mov.s32 %r54, 0;\n"
|
||||
" mov.u32 %r55, %r54;\n"
|
||||
" tex.1d.v4.f32.s32 {%f74,%f75,%f76,%f77},[q_tex,{%r49,%r51,%r53,%r55}];\n"
|
||||
" mov.f32 %f78, %f74;\n"
|
||||
" .loc 16 87 0\n"
|
||||
" ld.param.f32 %f79, [__cudaparm_kernel_pair_qqrd2e];\n"
|
||||
" mul.ftz.f32 %f80, %f79, %f28;\n"
|
||||
" mul.ftz.f32 %f81, %f80, %f78;\n"
|
||||
" div.approx.ftz.f32 %f82, %f81, %f51;\n"
|
||||
" mov.f32 %f83, 0f3f906ebb; \n"
|
||||
" mul.ftz.f32 %f84, %f53, %f83;\n"
|
||||
" fma.rn.ftz.f32 %f85, %f58, %f84, %f73;\n"
|
||||
" sub.ftz.f32 %f86, %f85, %f36;\n"
|
||||
" mul.ftz.f32 %f87, %f82, %f86;\n"
|
||||
" mul.ftz.f32 %f88, %f50, %f87;\n"
|
||||
" .loc 16 89 0\n"
|
||||
" fma.rn.ftz.f32 %f32, %f45, %f88, %f32;\n"
|
||||
" .loc 16 90 0\n"
|
||||
" fma.rn.ftz.f32 %f31, %f44, %f88, %f31;\n"
|
||||
" .loc 16 91 0\n"
|
||||
" fma.rn.ftz.f32 %f30, %f46, %f88, %f30;\n"
|
||||
" .loc 16 78 0\n"
|
||||
" sub.ftz.f32 %f89, %f73, %f36;\n"
|
||||
" fma.rn.ftz.f32 %f90, %f82, %f89, %f33;\n"
|
||||
" ld.param.s32 %r56, [__cudaparm_kernel_pair_eflag];\n"
|
||||
" mov.s32 %r57, 0;\n"
|
||||
" setp.gt.s32 %p5, %r56, %r57;\n"
|
||||
" selp.f32 %f33, %f90, %f33, %p5;\n"
|
||||
" ld.param.s32 %r58, [__cudaparm_kernel_pair_vflag];\n"
|
||||
" mov.u32 %r59, 0;\n"
|
||||
" setp.le.s32 %p6, %r58, %r59;\n"
|
||||
" @%p6 bra $Lt_0_20994;\n"
|
||||
" .loc 16 97 0\n"
|
||||
" mov.f32 %f91, %f6;\n"
|
||||
" mul.ftz.f32 %f92, %f45, %f45;\n"
|
||||
" fma.rn.ftz.f32 %f93, %f88, %f92, %f91;\n"
|
||||
" mov.f32 %f6, %f93;\n"
|
||||
" .loc 16 98 0\n"
|
||||
" mov.f32 %f94, %f8;\n"
|
||||
" fma.rn.ftz.f32 %f95, %f88, %f47, %f94;\n"
|
||||
" mov.f32 %f8, %f95;\n"
|
||||
" .loc 16 99 0\n"
|
||||
" mov.f32 %f96, %f10;\n"
|
||||
" mul.ftz.f32 %f97, %f46, %f46;\n"
|
||||
" fma.rn.ftz.f32 %f98, %f88, %f97, %f96;\n"
|
||||
" mov.f32 %f10, %f98;\n"
|
||||
" .loc 16 100 0\n"
|
||||
" mov.f32 %f99, %f12;\n"
|
||||
" mul.ftz.f32 %f100, %f44, %f45;\n"
|
||||
" fma.rn.ftz.f32 %f101, %f88, %f100, %f99;\n"
|
||||
" mov.f32 %f12, %f101;\n"
|
||||
" .loc 16 101 0\n"
|
||||
" mov.f32 %f102, %f14;\n"
|
||||
" mul.ftz.f32 %f103, %f45, %f46;\n"
|
||||
" fma.rn.ftz.f32 %f104, %f88, %f103, %f102;\n"
|
||||
" mov.f32 %f14, %f104;\n"
|
||||
" .loc 16 102 0\n"
|
||||
" mul.ftz.f32 %f105, %f44, %f46;\n"
|
||||
" fma.rn.ftz.f32 %f15, %f88, %f105, %f15;\n"
|
||||
" mov.f32 %f16, %f15;\n"
|
||||
"$Lt_0_20994:\n"
|
||||
"$Lt_0_20482:\n"
|
||||
" .loc 16 62 0\n"
|
||||
" mul.lo.u64 %rd32, %rd27, 4;\n"
|
||||
" add.u64 %rd20, %rd20, %rd32;\n"
|
||||
" setp.lt.u64 %p7, %rd20, %rd19;\n"
|
||||
" @%p7 bra $Lt_0_20226;\n"
|
||||
" bra.uni $Lt_0_19714;\n"
|
||||
"$Lt_0_27394:\n"
|
||||
" mov.f32 %f30, 0f00000000; \n"
|
||||
" mov.f32 %f31, 0f00000000; \n"
|
||||
" mov.f32 %f32, 0f00000000; \n"
|
||||
" mov.f32 %f33, 0f00000000; \n"
|
||||
"$Lt_0_19714:\n"
|
||||
" mov.u32 %r60, 1;\n"
|
||||
" setp.le.s32 %p8, %r1, %r60;\n"
|
||||
" @%p8 bra $Lt_0_23810;\n"
|
||||
" .loc 16 112 0\n"
|
||||
" mov.u64 %rd33, __cuda___cuda_local_var_32611_37_non_const_red_acc128;\n"
|
||||
" cvt.s64.s32 %rd34, %r2;\n"
|
||||
" mul.wide.s32 %rd35, %r2, 4;\n"
|
||||
" add.u64 %rd36, %rd33, %rd35;\n"
|
||||
" mov.f32 %f106, %f32;\n"
|
||||
" st.shared.f32 [%rd36+0], %f106;\n"
|
||||
" .loc 16 113 0\n"
|
||||
" mov.f32 %f107, %f31;\n"
|
||||
" st.shared.f32 [%rd36+512], %f107;\n"
|
||||
" .loc 16 114 0\n"
|
||||
" mov.f32 %f108, %f30;\n"
|
||||
" st.shared.f32 [%rd36+1024], %f108;\n"
|
||||
" .loc 16 115 0\n"
|
||||
" mov.f32 %f109, %f33;\n"
|
||||
" st.shared.f32 [%rd36+1536], %f109;\n"
|
||||
" .loc 16 117 0\n"
|
||||
" shr.s32 %r61, %r1, 31;\n"
|
||||
" mov.s32 %r62, 1;\n"
|
||||
" and.b32 %r63, %r61, %r62;\n"
|
||||
" add.s32 %r64, %r63, %r1;\n"
|
||||
" shr.s32 %r65, %r64, 1;\n"
|
||||
" mov.s32 %r66, %r65;\n"
|
||||
" mov.u32 %r67, 0;\n"
|
||||
" setp.ne.u32 %p9, %r65, %r67;\n"
|
||||
" @!%p9 bra $Lt_0_22274;\n"
|
||||
"$Lt_0_22786:\n"
|
||||
" setp.ge.u32 %p10, %r14, %r66;\n"
|
||||
" @%p10 bra $Lt_0_23042;\n"
|
||||
" .loc 16 120 0\n"
|
||||
" add.u32 %r68, %r2, %r66;\n"
|
||||
" cvt.u64.u32 %rd37, %r68;\n"
|
||||
" mul.wide.u32 %rd38, %r68, 4;\n"
|
||||
" add.u64 %rd39, %rd33, %rd38;\n"
|
||||
" ld.shared.f32 %f110, [%rd39+0];\n"
|
||||
" add.ftz.f32 %f106, %f110, %f106;\n"
|
||||
" st.shared.f32 [%rd36+0], %f106;\n"
|
||||
" ld.shared.f32 %f111, [%rd39+512];\n"
|
||||
" add.ftz.f32 %f107, %f111, %f107;\n"
|
||||
" st.shared.f32 [%rd36+512], %f107;\n"
|
||||
" ld.shared.f32 %f112, [%rd39+1024];\n"
|
||||
" add.ftz.f32 %f108, %f112, %f108;\n"
|
||||
" st.shared.f32 [%rd36+1024], %f108;\n"
|
||||
" ld.shared.f32 %f113, [%rd39+1536];\n"
|
||||
" add.ftz.f32 %f109, %f113, %f109;\n"
|
||||
" st.shared.f32 [%rd36+1536], %f109;\n"
|
||||
"$Lt_0_23042:\n"
|
||||
" .loc 16 117 0\n"
|
||||
" shr.u32 %r66, %r66, 1;\n"
|
||||
" mov.u32 %r69, 0;\n"
|
||||
" setp.ne.u32 %p11, %r66, %r69;\n"
|
||||
" @%p11 bra $Lt_0_22786;\n"
|
||||
"$Lt_0_22274:\n"
|
||||
" .loc 16 124 0\n"
|
||||
" mov.f32 %f32, %f106;\n"
|
||||
" .loc 16 125 0\n"
|
||||
" mov.f32 %f31, %f107;\n"
|
||||
" .loc 16 126 0\n"
|
||||
" mov.f32 %f30, %f108;\n"
|
||||
" .loc 16 127 0\n"
|
||||
" mov.f32 %f33, %f109;\n"
|
||||
" ld.param.s32 %r70, [__cudaparm_kernel_pair_vflag];\n"
|
||||
" mov.u32 %r71, 0;\n"
|
||||
" setp.le.s32 %p12, %r70, %r71;\n"
|
||||
" @%p12 bra $Lt_0_23810;\n"
|
||||
" .loc 16 131 0\n"
|
||||
" mov.f32 %f106, %f6;\n"
|
||||
" st.shared.f32 [%rd36+0], %f106;\n"
|
||||
" mov.f32 %f107, %f8;\n"
|
||||
" st.shared.f32 [%rd36+512], %f107;\n"
|
||||
" mov.f32 %f108, %f10;\n"
|
||||
" st.shared.f32 [%rd36+1024], %f108;\n"
|
||||
" mov.f32 %f109, %f12;\n"
|
||||
" st.shared.f32 [%rd36+1536], %f109;\n"
|
||||
" mov.f32 %f114, %f14;\n"
|
||||
" st.shared.f32 [%rd36+2048], %f114;\n"
|
||||
" mov.f32 %f115, %f15;\n"
|
||||
" st.shared.f32 [%rd36+2560], %f115;\n"
|
||||
" .loc 16 133 0\n"
|
||||
" mov.s32 %r72, %r65;\n"
|
||||
" @!%p9 bra $Lt_0_24322;\n"
|
||||
"$Lt_0_24834:\n"
|
||||
" setp.ge.u32 %p13, %r14, %r72;\n"
|
||||
" @%p13 bra $Lt_0_25090;\n"
|
||||
" .loc 16 136 0\n"
|
||||
" add.u32 %r73, %r2, %r72;\n"
|
||||
" cvt.u64.u32 %rd40, %r73;\n"
|
||||
" mul.wide.u32 %rd41, %r73, 4;\n"
|
||||
" add.u64 %rd42, %rd33, %rd41;\n"
|
||||
" ld.shared.f32 %f116, [%rd42+0];\n"
|
||||
" add.ftz.f32 %f106, %f116, %f106;\n"
|
||||
" st.shared.f32 [%rd36+0], %f106;\n"
|
||||
" ld.shared.f32 %f117, [%rd42+512];\n"
|
||||
" add.ftz.f32 %f107, %f117, %f107;\n"
|
||||
" st.shared.f32 [%rd36+512], %f107;\n"
|
||||
" ld.shared.f32 %f118, [%rd42+1024];\n"
|
||||
" add.ftz.f32 %f108, %f118, %f108;\n"
|
||||
" st.shared.f32 [%rd36+1024], %f108;\n"
|
||||
" ld.shared.f32 %f119, [%rd42+1536];\n"
|
||||
" add.ftz.f32 %f109, %f119, %f109;\n"
|
||||
" st.shared.f32 [%rd36+1536], %f109;\n"
|
||||
" ld.shared.f32 %f120, [%rd42+2048];\n"
|
||||
" add.ftz.f32 %f114, %f120, %f114;\n"
|
||||
" st.shared.f32 [%rd36+2048], %f114;\n"
|
||||
" ld.shared.f32 %f121, [%rd42+2560];\n"
|
||||
" add.ftz.f32 %f115, %f121, %f115;\n"
|
||||
" st.shared.f32 [%rd36+2560], %f115;\n"
|
||||
"$Lt_0_25090:\n"
|
||||
" .loc 16 133 0\n"
|
||||
" shr.u32 %r72, %r72, 1;\n"
|
||||
" mov.u32 %r74, 0;\n"
|
||||
" setp.ne.u32 %p14, %r72, %r74;\n"
|
||||
" @%p14 bra $Lt_0_24834;\n"
|
||||
"$Lt_0_24322:\n"
|
||||
" .loc 16 141 0\n"
|
||||
" mov.f32 %f6, %f106;\n"
|
||||
" mov.f32 %f8, %f107;\n"
|
||||
" mov.f32 %f10, %f108;\n"
|
||||
" mov.f32 %f12, %f109;\n"
|
||||
" mov.f32 %f14, %f114;\n"
|
||||
" mov.f32 %f16, %f115;\n"
|
||||
"$Lt_0_23810:\n"
|
||||
"$Lt_0_21762:\n"
|
||||
" mov.u32 %r75, 0;\n"
|
||||
" setp.ne.s32 %p15, %r14, %r75;\n"
|
||||
" @%p15 bra $Lt_0_25858;\n"
|
||||
" .loc 16 147 0\n"
|
||||
" ld.param.u64 %rd43, [__cudaparm_kernel_pair_engv];\n"
|
||||
" add.u64 %rd44, %rd43, %rd3;\n"
|
||||
" ld.param.s32 %r76, [__cudaparm_kernel_pair_eflag];\n"
|
||||
" mov.u32 %r77, 0;\n"
|
||||
" setp.le.s32 %p16, %r76, %r77;\n"
|
||||
" @%p16 bra $Lt_0_26370;\n"
|
||||
" .loc 16 149 0\n"
|
||||
" mov.f32 %f122, 0f00000000; \n"
|
||||
" st.global.f32 [%rd44+0], %f122;\n"
|
||||
" .loc 16 150 0\n"
|
||||
" cvt.s64.s32 %rd45, %r9;\n"
|
||||
" mul.wide.s32 %rd46, %r9, 4;\n"
|
||||
" add.u64 %rd47, %rd46, %rd44;\n"
|
||||
" .loc 16 151 0\n"
|
||||
" st.global.f32 [%rd47+0], %f33;\n"
|
||||
" .loc 16 152 0\n"
|
||||
" add.u64 %rd44, %rd46, %rd47;\n"
|
||||
"$Lt_0_26370:\n"
|
||||
" ld.param.s32 %r78, [__cudaparm_kernel_pair_vflag];\n"
|
||||
" mov.u32 %r79, 0;\n"
|
||||
" setp.le.s32 %p17, %r78, %r79;\n"
|
||||
" @%p17 bra $Lt_0_26882;\n"
|
||||
" .loc 16 156 0\n"
|
||||
" mov.f32 %f123, %f6;\n"
|
||||
" st.global.f32 [%rd44+0], %f123;\n"
|
||||
" .loc 16 157 0\n"
|
||||
" cvt.s64.s32 %rd48, %r9;\n"
|
||||
" mul.wide.s32 %rd49, %r9, 4;\n"
|
||||
" add.u64 %rd50, %rd49, %rd44;\n"
|
||||
" .loc 16 156 0\n"
|
||||
" mov.f32 %f124, %f8;\n"
|
||||
" st.global.f32 [%rd50+0], %f124;\n"
|
||||
" .loc 16 157 0\n"
|
||||
" add.u64 %rd51, %rd49, %rd50;\n"
|
||||
" .loc 16 156 0\n"
|
||||
" mov.f32 %f125, %f10;\n"
|
||||
" st.global.f32 [%rd51+0], %f125;\n"
|
||||
" .loc 16 157 0\n"
|
||||
" add.u64 %rd52, %rd49, %rd51;\n"
|
||||
" .loc 16 156 0\n"
|
||||
" mov.f32 %f126, %f12;\n"
|
||||
" st.global.f32 [%rd52+0], %f126;\n"
|
||||
" .loc 16 157 0\n"
|
||||
" add.u64 %rd44, %rd49, %rd52;\n"
|
||||
" .loc 16 156 0\n"
|
||||
" mov.f32 %f127, %f14;\n"
|
||||
" st.global.f32 [%rd44+0], %f127;\n"
|
||||
" mov.f32 %f128, %f16;\n"
|
||||
" add.u64 %rd53, %rd49, %rd44;\n"
|
||||
" st.global.f32 [%rd53+0], %f128;\n"
|
||||
"$Lt_0_26882:\n"
|
||||
" .loc 16 160 0\n"
|
||||
" ld.param.u64 %rd54, [__cudaparm_kernel_pair_ans];\n"
|
||||
" mul.lo.u64 %rd55, %rd2, 16;\n"
|
||||
" add.u64 %rd56, %rd54, %rd55;\n"
|
||||
" mov.f32 %f129, %f130;\n"
|
||||
" st.global.v4.f32 [%rd56+0], {%f32,%f31,%f30,%f129};\n"
|
||||
"$Lt_0_25858:\n"
|
||||
"$Lt_0_18690:\n"
|
||||
" .loc 16 163 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_pair:\n"
|
||||
" }\n"
|
||||
" .entry kernel_pair_fast (\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_x_,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_lj1_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_lj3_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_sp_cl_in,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_dev_nbor,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_dev_packed,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_ans,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_engv,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_eflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_vflag,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_inum,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_nbor_pitch,\n"
|
||||
" .param .u64 __cudaparm_kernel_pair_fast_q_,\n"
|
||||
" .param .f32 __cudaparm_kernel_pair_fast_cut_coulsq,\n"
|
||||
" .param .f32 __cudaparm_kernel_pair_fast_qqrd2e,\n"
|
||||
" .param .f32 __cudaparm_kernel_pair_fast_g_ewald,\n"
|
||||
" .param .s32 __cudaparm_kernel_pair_fast_t_per_atom)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<82>;\n"
|
||||
" .reg .u64 %rd<62>;\n"
|
||||
" .reg .f32 %f<129>;\n"
|
||||
" .reg .pred %p<20>;\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32678_33_non_const_sp_cl3304[16];\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32748_37_non_const_red_acc3320[3072];\n"
|
||||
" .loc 16 173 0\n"
|
||||
"$LDWbegin_kernel_pair_fast:\n"
|
||||
" cvt.s32.u32 %r1, %tid.x;\n"
|
||||
" mov.u32 %r2, 3;\n"
|
||||
" setp.gt.s32 %p1, %r1, %r2;\n"
|
||||
" @%p1 bra $Lt_1_19458;\n"
|
||||
" .loc 16 179 0\n"
|
||||
" mov.u64 %rd1, __cuda___cuda_local_var_32678_33_non_const_sp_cl3304;\n"
|
||||
" cvt.s64.s32 %rd2, %r1;\n"
|
||||
" mul.wide.s32 %rd3, %r1, 4;\n"
|
||||
" ld.param.u64 %rd4, [__cudaparm_kernel_pair_fast_sp_cl_in];\n"
|
||||
" add.u64 %rd5, %rd4, %rd3;\n"
|
||||
" ld.global.f32 %f1, [%rd5+0];\n"
|
||||
" add.u64 %rd6, %rd3, %rd1;\n"
|
||||
" st.shared.f32 [%rd6+0], %f1;\n"
|
||||
"$Lt_1_19458:\n"
|
||||
" mov.u64 %rd1, __cuda___cuda_local_var_32678_33_non_const_sp_cl3304;\n"
|
||||
" .loc 16 186 0\n"
|
||||
" mov.f32 %f2, 0f00000000; \n"
|
||||
" mov.f32 %f3, %f2;\n"
|
||||
" mov.f32 %f4, 0f00000000; \n"
|
||||
" mov.f32 %f5, %f4;\n"
|
||||
" mov.f32 %f6, 0f00000000; \n"
|
||||
" mov.f32 %f7, %f6;\n"
|
||||
" mov.f32 %f8, 0f00000000; \n"
|
||||
" mov.f32 %f9, %f8;\n"
|
||||
" mov.f32 %f10, 0f00000000; \n"
|
||||
" mov.f32 %f11, %f10;\n"
|
||||
" mov.f32 %f12, 0f00000000; \n"
|
||||
" mov.f32 %f13, %f12;\n"
|
||||
" .loc 16 188 0\n"
|
||||
" bar.sync 0;\n"
|
||||
" ld.param.s32 %r3, [__cudaparm_kernel_pair_fast_t_per_atom];\n"
|
||||
" div.s32 %r4, %r1, %r3;\n"
|
||||
" cvt.s32.u32 %r5, %ntid.x;\n"
|
||||
" div.s32 %r6, %r5, %r3;\n"
|
||||
" cvt.s32.u32 %r7, %ctaid.x;\n"
|
||||
" mul.lo.s32 %r8, %r7, %r6;\n"
|
||||
" add.s32 %r9, %r4, %r8;\n"
|
||||
" ld.param.s32 %r10, [__cudaparm_kernel_pair_fast_inum];\n"
|
||||
" setp.ge.s32 %p2, %r9, %r10;\n"
|
||||
" @%p2 bra $Lt_1_27138;\n"
|
||||
" .loc 16 193 0\n"
|
||||
" cvt.s64.s32 %rd7, %r9;\n"
|
||||
" mul.wide.s32 %rd8, %r9, 4;\n"
|
||||
" ld.param.u64 %rd9, [__cudaparm_kernel_pair_fast_dev_nbor];\n"
|
||||
" add.u64 %rd10, %rd8, %rd9;\n"
|
||||
" ld.global.s32 %r11, [%rd10+0];\n"
|
||||
" ld.param.s32 %r12, [__cudaparm_kernel_pair_fast_nbor_pitch];\n"
|
||||
" cvt.s64.s32 %rd11, %r12;\n"
|
||||
" mul.wide.s32 %rd12, %r12, 4;\n"
|
||||
" add.u64 %rd13, %rd12, %rd10;\n"
|
||||
" ld.global.s32 %r13, [%rd13+0];\n"
|
||||
" sub.s32 %r14, %r3, 1;\n"
|
||||
" and.b32 %r15, %r14, %r1;\n"
|
||||
" cvt.s64.s32 %rd14, %r15;\n"
|
||||
" mul.wide.s32 %rd15, %r15, 4;\n"
|
||||
" ld.param.u64 %rd16, [__cudaparm_kernel_pair_fast_dev_packed];\n"
|
||||
" setp.ne.u64 %p3, %rd16, %rd9;\n"
|
||||
" @%p3 bra $Lt_1_20738;\n"
|
||||
" cvt.s32.s64 %r16, %rd11;\n"
|
||||
" mul.lo.s32 %r17, %r16, %r3;\n"
|
||||
" mov.s32 %r18, %r17;\n"
|
||||
" mul.lo.s32 %r19, %r14, %r9;\n"
|
||||
" add.s32 %r20, %r16, %r19;\n"
|
||||
" cvt.s64.s32 %rd17, %r20;\n"
|
||||
" mul.wide.s32 %rd18, %r20, 4;\n"
|
||||
" add.u64 %rd19, %rd13, %rd18;\n"
|
||||
" and.b32 %r21, %r14, %r13;\n"
|
||||
" cvt.s64.s32 %rd20, %r21;\n"
|
||||
" div.s32 %r22, %r13, %r3;\n"
|
||||
" mul.lo.s32 %r23, %r17, %r22;\n"
|
||||
" cvt.s64.s32 %rd21, %r23;\n"
|
||||
" add.u64 %rd22, %rd20, %rd21;\n"
|
||||
" mul.lo.u64 %rd23, %rd22, 4;\n"
|
||||
" add.u64 %rd24, %rd19, %rd23;\n"
|
||||
" add.u64 %rd25, %rd15, %rd19;\n"
|
||||
" bra.uni $Lt_1_20482;\n"
|
||||
"$Lt_1_20738:\n"
|
||||
" add.u64 %rd26, %rd12, %rd13;\n"
|
||||
" ld.global.s32 %r24, [%rd26+0];\n"
|
||||
" cvt.s64.s32 %rd27, %r24;\n"
|
||||
" mul.wide.s32 %rd28, %r24, 4;\n"
|
||||
" add.u64 %rd29, %rd16, %rd28;\n"
|
||||
" cvt.s64.s32 %rd30, %r13;\n"
|
||||
" mul.wide.s32 %rd31, %r13, 4;\n"
|
||||
" add.u64 %rd24, %rd29, %rd31;\n"
|
||||
" mov.s32 %r18, %r3;\n"
|
||||
" add.u64 %rd25, %rd15, %rd29;\n"
|
||||
"$Lt_1_20482:\n"
|
||||
" .loc 16 196 0\n"
|
||||
" mov.u32 %r25, %r11;\n"
|
||||
" mov.s32 %r26, 0;\n"
|
||||
" mov.u32 %r27, %r26;\n"
|
||||
" mov.s32 %r28, 0;\n"
|
||||
" mov.u32 %r29, %r28;\n"
|
||||
" mov.s32 %r30, 0;\n"
|
||||
" mov.u32 %r31, %r30;\n"
|
||||
" tex.1d.v4.f32.s32 {%f14,%f15,%f16,%f17},[pos_tex,{%r25,%r27,%r29,%r31}];\n"
|
||||
" mov.f32 %f18, %f14;\n"
|
||||
" mov.f32 %f19, %f15;\n"
|
||||
" mov.f32 %f20, %f16;\n"
|
||||
" .loc 16 197 0\n"
|
||||
" mov.u32 %r32, %r11;\n"
|
||||
" mov.s32 %r33, 0;\n"
|
||||
" mov.u32 %r34, %r33;\n"
|
||||
" mov.s32 %r35, 0;\n"
|
||||
" mov.u32 %r36, %r35;\n"
|
||||
" mov.s32 %r37, 0;\n"
|
||||
" mov.u32 %r38, %r37;\n"
|
||||
" tex.1d.v4.f32.s32 {%f21,%f22,%f23,%f24},[q_tex,{%r32,%r34,%r36,%r38}];\n"
|
||||
" mov.f32 %f25, %f21;\n"
|
||||
" setp.ge.u64 %p4, %rd25, %rd24;\n"
|
||||
" @%p4 bra $Lt_1_28674;\n"
|
||||
" cvt.s64.s32 %rd32, %r18;\n"
|
||||
" ld.param.f32 %f26, [__cudaparm_kernel_pair_fast_cut_coulsq];\n"
|
||||
" mov.f32 %f27, 0f00000000; \n"
|
||||
" mov.f32 %f28, 0f00000000; \n"
|
||||
" mov.f32 %f29, 0f00000000; \n"
|
||||
" mov.f32 %f30, 0f00000000; \n"
|
||||
"$Lt_1_21506:\n"
|
||||
" .loc 16 200 0\n"
|
||||
" ld.global.s32 %r39, [%rd25+0];\n"
|
||||
" .loc 16 203 0\n"
|
||||
" mov.f32 %f31, 0f3f800000; \n"
|
||||
" shr.s32 %r40, %r39, 30;\n"
|
||||
" and.b32 %r41, %r40, 3;\n"
|
||||
" cvt.s64.s32 %rd33, %r41;\n"
|
||||
" mul.wide.s32 %rd34, %r41, 4;\n"
|
||||
" add.u64 %rd35, %rd1, %rd34;\n"
|
||||
" ld.shared.f32 %f32, [%rd35+0];\n"
|
||||
" sub.ftz.f32 %f33, %f31, %f32;\n"
|
||||
" .loc 16 206 0\n"
|
||||
" and.b32 %r42, %r39, 1073741823;\n"
|
||||
" mov.u32 %r43, %r42;\n"
|
||||
" mov.s32 %r44, 0;\n"
|
||||
" mov.u32 %r45, %r44;\n"
|
||||
" mov.s32 %r46, 0;\n"
|
||||
" mov.u32 %r47, %r46;\n"
|
||||
" mov.s32 %r48, 0;\n"
|
||||
" mov.u32 %r49, %r48;\n"
|
||||
" tex.1d.v4.f32.s32 {%f34,%f35,%f36,%f37},[pos_tex,{%r43,%r45,%r47,%r49}];\n"
|
||||
" mov.f32 %f38, %f34;\n"
|
||||
" mov.f32 %f39, %f35;\n"
|
||||
" mov.f32 %f40, %f36;\n"
|
||||
" sub.ftz.f32 %f41, %f19, %f39;\n"
|
||||
" sub.ftz.f32 %f42, %f18, %f38;\n"
|
||||
" sub.ftz.f32 %f43, %f20, %f40;\n"
|
||||
" mul.ftz.f32 %f44, %f41, %f41;\n"
|
||||
" fma.rn.ftz.f32 %f45, %f42, %f42, %f44;\n"
|
||||
" fma.rn.ftz.f32 %f46, %f43, %f43, %f45;\n"
|
||||
" setp.lt.ftz.f32 %p5, %f46, %f26;\n"
|
||||
" @!%p5 bra $Lt_1_22274;\n"
|
||||
" .loc 20 518 0\n"
|
||||
" rcp.approx.ftz.f32 %f47, %f46;\n"
|
||||
" rsqrt.approx.ftz.f32 %f48, %f47;\n"
|
||||
" ld.param.f32 %f49, [__cudaparm_kernel_pair_fast_g_ewald];\n"
|
||||
" mul.ftz.f32 %f50, %f49, %f48;\n"
|
||||
" mul.ftz.f32 %f51, %f50, %f50;\n"
|
||||
" neg.ftz.f32 %f52, %f51;\n"
|
||||
" mov.f32 %f53, 0f3fb8aa3b; \n"
|
||||
" mul.ftz.f32 %f54, %f52, %f53;\n"
|
||||
" ex2.approx.ftz.f32 %f55, %f54;\n"
|
||||
" .loc 16 222 0\n"
|
||||
" mov.f32 %f56, 0f3f800000; \n"
|
||||
" mov.f32 %f57, 0f3ea7ba05; \n"
|
||||
" fma.rn.ftz.f32 %f58, %f57, %f50, %f56;\n"
|
||||
" rcp.approx.ftz.f32 %f59, %f58;\n"
|
||||
" mov.f32 %f60, 0f3e827906; \n"
|
||||
" mov.f32 %f61, 0fbe91a98e; \n"
|
||||
" mov.f32 %f62, 0f3fb5f0e3; \n"
|
||||
" mov.f32 %f63, 0fbfba00e3; \n"
|
||||
" mov.f32 %f64, 0f3f87dc22; \n"
|
||||
" fma.rn.ftz.f32 %f65, %f64, %f59, %f63;\n"
|
||||
" fma.rn.ftz.f32 %f66, %f59, %f65, %f62;\n"
|
||||
" fma.rn.ftz.f32 %f67, %f59, %f66, %f61;\n"
|
||||
" fma.rn.ftz.f32 %f68, %f59, %f67, %f60;\n"
|
||||
" mul.ftz.f32 %f69, %f59, %f68;\n"
|
||||
" mul.ftz.f32 %f70, %f55, %f69;\n"
|
||||
" .loc 16 223 0\n"
|
||||
" mov.u32 %r50, %r42;\n"
|
||||
" mov.s32 %r51, 0;\n"
|
||||
" mov.u32 %r52, %r51;\n"
|
||||
" mov.s32 %r53, 0;\n"
|
||||
" mov.u32 %r54, %r53;\n"
|
||||
" mov.s32 %r55, 0;\n"
|
||||
" mov.u32 %r56, %r55;\n"
|
||||
" tex.1d.v4.f32.s32 {%f71,%f72,%f73,%f74},[q_tex,{%r50,%r52,%r54,%r56}];\n"
|
||||
" mov.f32 %f75, %f71;\n"
|
||||
" .loc 16 224 0\n"
|
||||
" ld.param.f32 %f76, [__cudaparm_kernel_pair_fast_qqrd2e];\n"
|
||||
" mul.ftz.f32 %f77, %f76, %f25;\n"
|
||||
" mul.ftz.f32 %f78, %f77, %f75;\n"
|
||||
" div.approx.ftz.f32 %f79, %f78, %f48;\n"
|
||||
" mov.f32 %f80, 0f3f906ebb; \n"
|
||||
" mul.ftz.f32 %f81, %f50, %f80;\n"
|
||||
" fma.rn.ftz.f32 %f82, %f55, %f81, %f70;\n"
|
||||
" sub.ftz.f32 %f83, %f82, %f33;\n"
|
||||
" mul.ftz.f32 %f84, %f79, %f83;\n"
|
||||
" mul.ftz.f32 %f85, %f47, %f84;\n"
|
||||
" .loc 16 226 0\n"
|
||||
" fma.rn.ftz.f32 %f29, %f42, %f85, %f29;\n"
|
||||
" .loc 16 227 0\n"
|
||||
" fma.rn.ftz.f32 %f28, %f41, %f85, %f28;\n"
|
||||
" .loc 16 228 0\n"
|
||||
" fma.rn.ftz.f32 %f27, %f43, %f85, %f27;\n"
|
||||
" .loc 16 215 0\n"
|
||||
" sub.ftz.f32 %f86, %f70, %f33;\n"
|
||||
" fma.rn.ftz.f32 %f87, %f79, %f86, %f30;\n"
|
||||
" ld.param.s32 %r57, [__cudaparm_kernel_pair_fast_eflag];\n"
|
||||
" mov.s32 %r58, 0;\n"
|
||||
" setp.gt.s32 %p6, %r57, %r58;\n"
|
||||
" selp.f32 %f30, %f87, %f30, %p6;\n"
|
||||
" ld.param.s32 %r59, [__cudaparm_kernel_pair_fast_vflag];\n"
|
||||
" mov.u32 %r60, 0;\n"
|
||||
" setp.le.s32 %p7, %r59, %r60;\n"
|
||||
" @%p7 bra $Lt_1_22274;\n"
|
||||
" .loc 16 234 0\n"
|
||||
" mov.f32 %f88, %f3;\n"
|
||||
" mul.ftz.f32 %f89, %f42, %f42;\n"
|
||||
" fma.rn.ftz.f32 %f90, %f85, %f89, %f88;\n"
|
||||
" mov.f32 %f3, %f90;\n"
|
||||
" .loc 16 235 0\n"
|
||||
" mov.f32 %f91, %f5;\n"
|
||||
" fma.rn.ftz.f32 %f92, %f85, %f44, %f91;\n"
|
||||
" mov.f32 %f5, %f92;\n"
|
||||
" .loc 16 236 0\n"
|
||||
" mov.f32 %f93, %f7;\n"
|
||||
" mul.ftz.f32 %f94, %f43, %f43;\n"
|
||||
" fma.rn.ftz.f32 %f95, %f85, %f94, %f93;\n"
|
||||
" mov.f32 %f7, %f95;\n"
|
||||
" .loc 16 237 0\n"
|
||||
" mov.f32 %f96, %f9;\n"
|
||||
" mul.ftz.f32 %f97, %f41, %f42;\n"
|
||||
" fma.rn.ftz.f32 %f98, %f85, %f97, %f96;\n"
|
||||
" mov.f32 %f9, %f98;\n"
|
||||
" .loc 16 238 0\n"
|
||||
" mov.f32 %f99, %f11;\n"
|
||||
" mul.ftz.f32 %f100, %f42, %f43;\n"
|
||||
" fma.rn.ftz.f32 %f101, %f85, %f100, %f99;\n"
|
||||
" mov.f32 %f11, %f101;\n"
|
||||
" .loc 16 239 0\n"
|
||||
" mul.ftz.f32 %f102, %f41, %f43;\n"
|
||||
" fma.rn.ftz.f32 %f12, %f85, %f102, %f12;\n"
|
||||
" mov.f32 %f13, %f12;\n"
|
||||
"$Lt_1_22274:\n"
|
||||
"$Lt_1_21762:\n"
|
||||
" .loc 16 199 0\n"
|
||||
" mul.lo.u64 %rd36, %rd32, 4;\n"
|
||||
" add.u64 %rd25, %rd25, %rd36;\n"
|
||||
" setp.lt.u64 %p8, %rd25, %rd24;\n"
|
||||
" @%p8 bra $Lt_1_21506;\n"
|
||||
" bra.uni $Lt_1_20994;\n"
|
||||
"$Lt_1_28674:\n"
|
||||
" mov.f32 %f27, 0f00000000; \n"
|
||||
" mov.f32 %f28, 0f00000000; \n"
|
||||
" mov.f32 %f29, 0f00000000; \n"
|
||||
" mov.f32 %f30, 0f00000000; \n"
|
||||
"$Lt_1_20994:\n"
|
||||
" mov.u32 %r61, 1;\n"
|
||||
" setp.le.s32 %p9, %r3, %r61;\n"
|
||||
" @%p9 bra $Lt_1_25090;\n"
|
||||
" .loc 16 249 0\n"
|
||||
" mov.u64 %rd37, __cuda___cuda_local_var_32748_37_non_const_red_acc3320;\n"
|
||||
" cvt.s64.s32 %rd38, %r1;\n"
|
||||
" mul.wide.s32 %rd39, %r1, 4;\n"
|
||||
" add.u64 %rd40, %rd37, %rd39;\n"
|
||||
" mov.f32 %f103, %f29;\n"
|
||||
" st.shared.f32 [%rd40+0], %f103;\n"
|
||||
" .loc 16 250 0\n"
|
||||
" mov.f32 %f104, %f28;\n"
|
||||
" st.shared.f32 [%rd40+512], %f104;\n"
|
||||
" .loc 16 251 0\n"
|
||||
" mov.f32 %f105, %f27;\n"
|
||||
" st.shared.f32 [%rd40+1024], %f105;\n"
|
||||
" .loc 16 252 0\n"
|
||||
" mov.f32 %f106, %f30;\n"
|
||||
" st.shared.f32 [%rd40+1536], %f106;\n"
|
||||
" .loc 16 254 0\n"
|
||||
" shr.s32 %r62, %r3, 31;\n"
|
||||
" mov.s32 %r63, 1;\n"
|
||||
" and.b32 %r64, %r62, %r63;\n"
|
||||
" add.s32 %r65, %r64, %r3;\n"
|
||||
" shr.s32 %r66, %r65, 1;\n"
|
||||
" mov.s32 %r67, %r66;\n"
|
||||
" mov.u32 %r68, 0;\n"
|
||||
" setp.ne.u32 %p10, %r66, %r68;\n"
|
||||
" @!%p10 bra $Lt_1_23554;\n"
|
||||
"$Lt_1_24066:\n"
|
||||
" setp.ge.u32 %p11, %r15, %r67;\n"
|
||||
" @%p11 bra $Lt_1_24322;\n"
|
||||
" .loc 16 257 0\n"
|
||||
" add.u32 %r69, %r1, %r67;\n"
|
||||
" cvt.u64.u32 %rd41, %r69;\n"
|
||||
" mul.wide.u32 %rd42, %r69, 4;\n"
|
||||
" add.u64 %rd43, %rd37, %rd42;\n"
|
||||
" ld.shared.f32 %f107, [%rd43+0];\n"
|
||||
" add.ftz.f32 %f103, %f107, %f103;\n"
|
||||
" st.shared.f32 [%rd40+0], %f103;\n"
|
||||
" ld.shared.f32 %f108, [%rd43+512];\n"
|
||||
" add.ftz.f32 %f104, %f108, %f104;\n"
|
||||
" st.shared.f32 [%rd40+512], %f104;\n"
|
||||
" ld.shared.f32 %f109, [%rd43+1024];\n"
|
||||
" add.ftz.f32 %f105, %f109, %f105;\n"
|
||||
" st.shared.f32 [%rd40+1024], %f105;\n"
|
||||
" ld.shared.f32 %f110, [%rd43+1536];\n"
|
||||
" add.ftz.f32 %f106, %f110, %f106;\n"
|
||||
" st.shared.f32 [%rd40+1536], %f106;\n"
|
||||
"$Lt_1_24322:\n"
|
||||
" .loc 16 254 0\n"
|
||||
" shr.u32 %r67, %r67, 1;\n"
|
||||
" mov.u32 %r70, 0;\n"
|
||||
" setp.ne.u32 %p12, %r67, %r70;\n"
|
||||
" @%p12 bra $Lt_1_24066;\n"
|
||||
"$Lt_1_23554:\n"
|
||||
" .loc 16 261 0\n"
|
||||
" mov.f32 %f29, %f103;\n"
|
||||
" .loc 16 262 0\n"
|
||||
" mov.f32 %f28, %f104;\n"
|
||||
" .loc 16 263 0\n"
|
||||
" mov.f32 %f27, %f105;\n"
|
||||
" .loc 16 264 0\n"
|
||||
" mov.f32 %f30, %f106;\n"
|
||||
" ld.param.s32 %r71, [__cudaparm_kernel_pair_fast_vflag];\n"
|
||||
" mov.u32 %r72, 0;\n"
|
||||
" setp.le.s32 %p13, %r71, %r72;\n"
|
||||
" @%p13 bra $Lt_1_25090;\n"
|
||||
" .loc 16 268 0\n"
|
||||
" mov.f32 %f103, %f3;\n"
|
||||
" st.shared.f32 [%rd40+0], %f103;\n"
|
||||
" mov.f32 %f104, %f5;\n"
|
||||
" st.shared.f32 [%rd40+512], %f104;\n"
|
||||
" mov.f32 %f105, %f7;\n"
|
||||
" st.shared.f32 [%rd40+1024], %f105;\n"
|
||||
" mov.f32 %f106, %f9;\n"
|
||||
" st.shared.f32 [%rd40+1536], %f106;\n"
|
||||
" mov.f32 %f111, %f11;\n"
|
||||
" st.shared.f32 [%rd40+2048], %f111;\n"
|
||||
" mov.f32 %f112, %f12;\n"
|
||||
" st.shared.f32 [%rd40+2560], %f112;\n"
|
||||
" .loc 16 270 0\n"
|
||||
" mov.s32 %r73, %r66;\n"
|
||||
" @!%p10 bra $Lt_1_25602;\n"
|
||||
"$Lt_1_26114:\n"
|
||||
" setp.ge.u32 %p14, %r15, %r73;\n"
|
||||
" @%p14 bra $Lt_1_26370;\n"
|
||||
" .loc 16 273 0\n"
|
||||
" add.u32 %r74, %r1, %r73;\n"
|
||||
" cvt.u64.u32 %rd44, %r74;\n"
|
||||
" mul.wide.u32 %rd45, %r74, 4;\n"
|
||||
" add.u64 %rd46, %rd37, %rd45;\n"
|
||||
" ld.shared.f32 %f113, [%rd46+0];\n"
|
||||
" add.ftz.f32 %f103, %f113, %f103;\n"
|
||||
" st.shared.f32 [%rd40+0], %f103;\n"
|
||||
" ld.shared.f32 %f114, [%rd46+512];\n"
|
||||
" add.ftz.f32 %f104, %f114, %f104;\n"
|
||||
" st.shared.f32 [%rd40+512], %f104;\n"
|
||||
" ld.shared.f32 %f115, [%rd46+1024];\n"
|
||||
" add.ftz.f32 %f105, %f115, %f105;\n"
|
||||
" st.shared.f32 [%rd40+1024], %f105;\n"
|
||||
" ld.shared.f32 %f116, [%rd46+1536];\n"
|
||||
" add.ftz.f32 %f106, %f116, %f106;\n"
|
||||
" st.shared.f32 [%rd40+1536], %f106;\n"
|
||||
" ld.shared.f32 %f117, [%rd46+2048];\n"
|
||||
" add.ftz.f32 %f111, %f117, %f111;\n"
|
||||
" st.shared.f32 [%rd40+2048], %f111;\n"
|
||||
" ld.shared.f32 %f118, [%rd46+2560];\n"
|
||||
" add.ftz.f32 %f112, %f118, %f112;\n"
|
||||
" st.shared.f32 [%rd40+2560], %f112;\n"
|
||||
"$Lt_1_26370:\n"
|
||||
" .loc 16 270 0\n"
|
||||
" shr.u32 %r73, %r73, 1;\n"
|
||||
" mov.u32 %r75, 0;\n"
|
||||
" setp.ne.u32 %p15, %r73, %r75;\n"
|
||||
" @%p15 bra $Lt_1_26114;\n"
|
||||
"$Lt_1_25602:\n"
|
||||
" .loc 16 278 0\n"
|
||||
" mov.f32 %f3, %f103;\n"
|
||||
" mov.f32 %f5, %f104;\n"
|
||||
" mov.f32 %f7, %f105;\n"
|
||||
" mov.f32 %f9, %f106;\n"
|
||||
" mov.f32 %f11, %f111;\n"
|
||||
" mov.f32 %f13, %f112;\n"
|
||||
"$Lt_1_25090:\n"
|
||||
"$Lt_1_23042:\n"
|
||||
" mov.u32 %r76, 0;\n"
|
||||
" setp.ne.s32 %p16, %r15, %r76;\n"
|
||||
" @%p16 bra $Lt_1_27138;\n"
|
||||
" .loc 16 284 0\n"
|
||||
" ld.param.u64 %rd47, [__cudaparm_kernel_pair_fast_engv];\n"
|
||||
" add.u64 %rd48, %rd47, %rd8;\n"
|
||||
" ld.param.s32 %r77, [__cudaparm_kernel_pair_fast_eflag];\n"
|
||||
" mov.u32 %r78, 0;\n"
|
||||
" setp.le.s32 %p17, %r77, %r78;\n"
|
||||
" @%p17 bra $Lt_1_27650;\n"
|
||||
" .loc 16 286 0\n"
|
||||
" mov.f32 %f119, 0f00000000; \n"
|
||||
" st.global.f32 [%rd48+0], %f119;\n"
|
||||
" .loc 16 287 0\n"
|
||||
" cvt.s64.s32 %rd49, %r10;\n"
|
||||
" mul.wide.s32 %rd50, %r10, 4;\n"
|
||||
" add.u64 %rd51, %rd50, %rd48;\n"
|
||||
" .loc 16 288 0\n"
|
||||
" st.global.f32 [%rd51+0], %f30;\n"
|
||||
" .loc 16 289 0\n"
|
||||
" add.u64 %rd48, %rd50, %rd51;\n"
|
||||
"$Lt_1_27650:\n"
|
||||
" ld.param.s32 %r79, [__cudaparm_kernel_pair_fast_vflag];\n"
|
||||
" mov.u32 %r80, 0;\n"
|
||||
" setp.le.s32 %p18, %r79, %r80;\n"
|
||||
" @%p18 bra $Lt_1_28162;\n"
|
||||
" .loc 16 293 0\n"
|
||||
" mov.f32 %f120, %f3;\n"
|
||||
" st.global.f32 [%rd48+0], %f120;\n"
|
||||
" .loc 16 294 0\n"
|
||||
" cvt.s64.s32 %rd52, %r10;\n"
|
||||
" mul.wide.s32 %rd53, %r10, 4;\n"
|
||||
" add.u64 %rd54, %rd53, %rd48;\n"
|
||||
" .loc 16 293 0\n"
|
||||
" mov.f32 %f121, %f5;\n"
|
||||
" st.global.f32 [%rd54+0], %f121;\n"
|
||||
" .loc 16 294 0\n"
|
||||
" add.u64 %rd55, %rd53, %rd54;\n"
|
||||
" .loc 16 293 0\n"
|
||||
" mov.f32 %f122, %f7;\n"
|
||||
" st.global.f32 [%rd55+0], %f122;\n"
|
||||
" .loc 16 294 0\n"
|
||||
" add.u64 %rd56, %rd53, %rd55;\n"
|
||||
" .loc 16 293 0\n"
|
||||
" mov.f32 %f123, %f9;\n"
|
||||
" st.global.f32 [%rd56+0], %f123;\n"
|
||||
" .loc 16 294 0\n"
|
||||
" add.u64 %rd48, %rd53, %rd56;\n"
|
||||
" .loc 16 293 0\n"
|
||||
" mov.f32 %f124, %f11;\n"
|
||||
" st.global.f32 [%rd48+0], %f124;\n"
|
||||
" mov.f32 %f125, %f13;\n"
|
||||
" add.u64 %rd57, %rd53, %rd48;\n"
|
||||
" st.global.f32 [%rd57+0], %f125;\n"
|
||||
"$Lt_1_28162:\n"
|
||||
" .loc 16 297 0\n"
|
||||
" ld.param.u64 %rd58, [__cudaparm_kernel_pair_fast_ans];\n"
|
||||
" mul.lo.u64 %rd59, %rd7, 16;\n"
|
||||
" add.u64 %rd60, %rd58, %rd59;\n"
|
||||
" mov.f32 %f126, %f127;\n"
|
||||
" st.global.v4.f32 [%rd60+0], {%f29,%f28,%f27,%f126};\n"
|
||||
"$Lt_1_27138:\n"
|
||||
"$Lt_1_19970:\n"
|
||||
" .loc 16 300 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_pair_fast:\n"
|
||||
" }\n"
|
||||
;
|
||||
BIN
lib/gpu/cudpp.o
Normal file
BIN
lib/gpu/cudpp.o
Normal file
Binary file not shown.
BIN
lib/gpu/cudpp_maximal_launch.o
Normal file
BIN
lib/gpu/cudpp_maximal_launch.o
Normal file
Binary file not shown.
BIN
lib/gpu/cudpp_plan.o
Normal file
BIN
lib/gpu/cudpp_plan.o
Normal file
Binary file not shown.
BIN
lib/gpu/cudpp_plan_manager.o
Normal file
BIN
lib/gpu/cudpp_plan_manager.o
Normal file
Binary file not shown.
134
lib/gpu/device.ptx
Normal file
134
lib/gpu/device.ptx
Normal file
@ -0,0 +1,134 @@
|
||||
.version 2.3
|
||||
.target sm_20
|
||||
.address_size 64
|
||||
// compiled with /usr/local/cuda/open64/lib//be
|
||||
// nvopencc 4.0 built on 2011-05-12
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Compiling /tmp/tmpxft_00009a81_00000000-9_lal_device.cpp3.i (/home/sjplimp/ccBI#.zwVkZj)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Options:
|
||||
//-----------------------------------------------------------
|
||||
// Target:ptx, ISA:sm_20, Endian:little, Pointer Size:64
|
||||
// -O3 (Optimization level)
|
||||
// -g0 (Debug level)
|
||||
// -m2 (Report advisories)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
.file 1 "<command-line>"
|
||||
.file 2 "/tmp/tmpxft_00009a81_00000000-8_lal_device.cudafe2.gpu"
|
||||
.file 3 "/usr/lib/gcc/x86_64-redhat-linux/4.4.5/include/stddef.h"
|
||||
.file 4 "/usr/local/cuda/include/crt/device_runtime.h"
|
||||
.file 5 "/usr/local/cuda/include/host_defines.h"
|
||||
.file 6 "/usr/local/cuda/include/builtin_types.h"
|
||||
.file 7 "/usr/local/cuda/include/device_types.h"
|
||||
.file 8 "/usr/local/cuda/include/driver_types.h"
|
||||
.file 9 "/usr/local/cuda/include/surface_types.h"
|
||||
.file 10 "/usr/local/cuda/include/texture_types.h"
|
||||
.file 11 "/usr/local/cuda/include/vector_types.h"
|
||||
.file 12 "/usr/local/cuda/include/device_launch_parameters.h"
|
||||
.file 13 "/usr/local/cuda/include/crt/storage_class.h"
|
||||
.file 14 "/usr/include/bits/types.h"
|
||||
.file 15 "/usr/include/time.h"
|
||||
.file 16 "lal_device.cu"
|
||||
.file 17 "/usr/local/cuda/include/common_functions.h"
|
||||
.file 18 "/usr/local/cuda/include/math_functions.h"
|
||||
.file 19 "/usr/local/cuda/include/math_constants.h"
|
||||
.file 20 "/usr/local/cuda/include/device_functions.h"
|
||||
.file 21 "/usr/local/cuda/include/sm_11_atomic_functions.h"
|
||||
.file 22 "/usr/local/cuda/include/sm_12_atomic_functions.h"
|
||||
.file 23 "/usr/local/cuda/include/sm_13_double_functions.h"
|
||||
.file 24 "/usr/local/cuda/include/sm_20_atomic_functions.h"
|
||||
.file 25 "/usr/local/cuda/include/sm_20_intrinsics.h"
|
||||
.file 26 "/usr/local/cuda/include/surface_functions.h"
|
||||
.file 27 "/usr/local/cuda/include/texture_fetch_functions.h"
|
||||
.file 28 "/usr/local/cuda/include/math_functions_dbl_ptx3.h"
|
||||
|
||||
|
||||
.entry kernel_zero (
|
||||
.param .u64 __cudaparm_kernel_zero_mem,
|
||||
.param .s32 __cudaparm_kernel_zero_numel)
|
||||
{
|
||||
.reg .u32 %r<9>;
|
||||
.reg .u64 %rd<6>;
|
||||
.reg .pred %p<3>;
|
||||
.loc 16 20 0
|
||||
$LDWbegin_kernel_zero:
|
||||
cvt.s32.u32 %r1, %ctaid.x;
|
||||
cvt.s32.u32 %r2, %ntid.x;
|
||||
mul24.lo.s32 %r3, %r1, %r2;
|
||||
mov.u32 %r4, %tid.x;
|
||||
add.u32 %r5, %r3, %r4;
|
||||
ld.param.s32 %r6, [__cudaparm_kernel_zero_numel];
|
||||
setp.le.s32 %p1, %r6, %r5;
|
||||
@%p1 bra $Lt_0_1026;
|
||||
.loc 16 24 0
|
||||
mov.s32 %r7, 0;
|
||||
ld.param.u64 %rd1, [__cudaparm_kernel_zero_mem];
|
||||
cvt.s64.s32 %rd2, %r5;
|
||||
mul.wide.s32 %rd3, %r5, 4;
|
||||
add.u64 %rd4, %rd1, %rd3;
|
||||
st.global.s32 [%rd4+0], %r7;
|
||||
$Lt_0_1026:
|
||||
.loc 16 25 0
|
||||
exit;
|
||||
$LDWend_kernel_zero:
|
||||
} // kernel_zero
|
||||
|
||||
.entry kernel_info (
|
||||
.param .u64 __cudaparm_kernel_info_info)
|
||||
{
|
||||
.reg .u32 %r<16>;
|
||||
.reg .u64 %rd<3>;
|
||||
.loc 16 27 0
|
||||
$LDWbegin_kernel_info:
|
||||
.loc 16 28 0
|
||||
ld.param.u64 %rd1, [__cudaparm_kernel_info_info];
|
||||
mov.s32 %r1, 200;
|
||||
st.global.s32 [%rd1+0], %r1;
|
||||
.loc 16 29 0
|
||||
mov.s32 %r2, 32;
|
||||
st.global.s32 [%rd1+4], %r2;
|
||||
.loc 16 30 0
|
||||
mov.s32 %r3, 32;
|
||||
st.global.s32 [%rd1+8], %r3;
|
||||
.loc 16 31 0
|
||||
mov.s32 %r4, 4;
|
||||
st.global.s32 [%rd1+12], %r4;
|
||||
.loc 16 32 0
|
||||
mov.s32 %r5, 8;
|
||||
st.global.s32 [%rd1+16], %r5;
|
||||
.loc 16 33 0
|
||||
mov.s32 %r6, 64;
|
||||
st.global.s32 [%rd1+20], %r6;
|
||||
.loc 16 34 0
|
||||
mov.s32 %r7, 128;
|
||||
st.global.s32 [%rd1+24], %r7;
|
||||
.loc 16 35 0
|
||||
mov.s32 %r8, 11;
|
||||
st.global.s32 [%rd1+28], %r8;
|
||||
.loc 16 36 0
|
||||
mov.s32 %r9, 8;
|
||||
st.global.s32 [%rd1+32], %r9;
|
||||
.loc 16 37 0
|
||||
mov.s32 %r10, 128;
|
||||
st.global.s32 [%rd1+36], %r10;
|
||||
.loc 16 38 0
|
||||
mov.s32 %r11, 128;
|
||||
st.global.s32 [%rd1+40], %r11;
|
||||
.loc 16 39 0
|
||||
mov.s32 %r12, 128;
|
||||
st.global.s32 [%rd1+44], %r12;
|
||||
.loc 16 40 0
|
||||
mov.s32 %r13, 128;
|
||||
st.global.s32 [%rd1+48], %r13;
|
||||
.loc 16 41 0
|
||||
mov.s32 %r14, 8;
|
||||
st.global.s32 [%rd1+52], %r14;
|
||||
.loc 16 42 0
|
||||
exit;
|
||||
$LDWend_kernel_info:
|
||||
} // kernel_info
|
||||
|
||||
88
lib/gpu/device_ptx.h
Normal file
88
lib/gpu/device_ptx.h
Normal file
@ -0,0 +1,88 @@
|
||||
const char * device =
|
||||
" .version 2.3\n"
|
||||
" .target sm_20\n"
|
||||
" .address_size 64\n"
|
||||
" .entry kernel_zero (\n"
|
||||
" .param .u64 __cudaparm_kernel_zero_mem,\n"
|
||||
" .param .s32 __cudaparm_kernel_zero_numel)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<9>;\n"
|
||||
" .reg .u64 %rd<6>;\n"
|
||||
" .reg .pred %p<3>;\n"
|
||||
" .loc 16 20 0\n"
|
||||
"$LDWbegin_kernel_zero:\n"
|
||||
" cvt.s32.u32 %r1, %ctaid.x;\n"
|
||||
" cvt.s32.u32 %r2, %ntid.x;\n"
|
||||
" mul24.lo.s32 %r3, %r1, %r2;\n"
|
||||
" mov.u32 %r4, %tid.x;\n"
|
||||
" add.u32 %r5, %r3, %r4;\n"
|
||||
" ld.param.s32 %r6, [__cudaparm_kernel_zero_numel];\n"
|
||||
" setp.le.s32 %p1, %r6, %r5;\n"
|
||||
" @%p1 bra $Lt_0_1026;\n"
|
||||
" .loc 16 24 0\n"
|
||||
" mov.s32 %r7, 0;\n"
|
||||
" ld.param.u64 %rd1, [__cudaparm_kernel_zero_mem];\n"
|
||||
" cvt.s64.s32 %rd2, %r5;\n"
|
||||
" mul.wide.s32 %rd3, %r5, 4;\n"
|
||||
" add.u64 %rd4, %rd1, %rd3;\n"
|
||||
" st.global.s32 [%rd4+0], %r7;\n"
|
||||
"$Lt_0_1026:\n"
|
||||
" .loc 16 25 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_zero:\n"
|
||||
" }\n"
|
||||
" .entry kernel_info (\n"
|
||||
" .param .u64 __cudaparm_kernel_info_info)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<16>;\n"
|
||||
" .reg .u64 %rd<3>;\n"
|
||||
" .loc 16 27 0\n"
|
||||
"$LDWbegin_kernel_info:\n"
|
||||
" .loc 16 28 0\n"
|
||||
" ld.param.u64 %rd1, [__cudaparm_kernel_info_info];\n"
|
||||
" mov.s32 %r1, 200;\n"
|
||||
" st.global.s32 [%rd1+0], %r1;\n"
|
||||
" .loc 16 29 0\n"
|
||||
" mov.s32 %r2, 32;\n"
|
||||
" st.global.s32 [%rd1+4], %r2;\n"
|
||||
" .loc 16 30 0\n"
|
||||
" mov.s32 %r3, 32;\n"
|
||||
" st.global.s32 [%rd1+8], %r3;\n"
|
||||
" .loc 16 31 0\n"
|
||||
" mov.s32 %r4, 4;\n"
|
||||
" st.global.s32 [%rd1+12], %r4;\n"
|
||||
" .loc 16 32 0\n"
|
||||
" mov.s32 %r5, 8;\n"
|
||||
" st.global.s32 [%rd1+16], %r5;\n"
|
||||
" .loc 16 33 0\n"
|
||||
" mov.s32 %r6, 64;\n"
|
||||
" st.global.s32 [%rd1+20], %r6;\n"
|
||||
" .loc 16 34 0\n"
|
||||
" mov.s32 %r7, 128;\n"
|
||||
" st.global.s32 [%rd1+24], %r7;\n"
|
||||
" .loc 16 35 0\n"
|
||||
" mov.s32 %r8, 11;\n"
|
||||
" st.global.s32 [%rd1+28], %r8;\n"
|
||||
" .loc 16 36 0\n"
|
||||
" mov.s32 %r9, 8;\n"
|
||||
" st.global.s32 [%rd1+32], %r9;\n"
|
||||
" .loc 16 37 0\n"
|
||||
" mov.s32 %r10, 128;\n"
|
||||
" st.global.s32 [%rd1+36], %r10;\n"
|
||||
" .loc 16 38 0\n"
|
||||
" mov.s32 %r11, 128;\n"
|
||||
" st.global.s32 [%rd1+40], %r11;\n"
|
||||
" .loc 16 39 0\n"
|
||||
" mov.s32 %r12, 128;\n"
|
||||
" st.global.s32 [%rd1+44], %r12;\n"
|
||||
" .loc 16 40 0\n"
|
||||
" mov.s32 %r13, 128;\n"
|
||||
" st.global.s32 [%rd1+48], %r13;\n"
|
||||
" .loc 16 41 0\n"
|
||||
" mov.s32 %r14, 8;\n"
|
||||
" st.global.s32 [%rd1+52], %r14;\n"
|
||||
" .loc 16 42 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_info:\n"
|
||||
" }\n"
|
||||
;
|
||||
329
lib/gpu/ellipsoid_nbor.ptx
Normal file
329
lib/gpu/ellipsoid_nbor.ptx
Normal file
@ -0,0 +1,329 @@
|
||||
.version 2.3
|
||||
.target sm_20
|
||||
.address_size 64
|
||||
// compiled with /usr/local/cuda/open64/lib//be
|
||||
// nvopencc 4.0 built on 2011-05-12
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Compiling /tmp/tmpxft_00009ad9_00000000-9_lal_ellipsoid_nbor.cpp3.i (/home/sjplimp/ccBI#.7CLzz0)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Options:
|
||||
//-----------------------------------------------------------
|
||||
// Target:ptx, ISA:sm_20, Endian:little, Pointer Size:64
|
||||
// -O3 (Optimization level)
|
||||
// -g0 (Debug level)
|
||||
// -m2 (Report advisories)
|
||||
//-----------------------------------------------------------
|
||||
|
||||
.file 1 "<command-line>"
|
||||
.file 2 "/tmp/tmpxft_00009ad9_00000000-8_lal_ellipsoid_nbor.cudafe2.gpu"
|
||||
.file 3 "/usr/lib/gcc/x86_64-redhat-linux/4.4.5/include/stddef.h"
|
||||
.file 4 "/usr/local/cuda/include/crt/device_runtime.h"
|
||||
.file 5 "/usr/local/cuda/include/host_defines.h"
|
||||
.file 6 "/usr/local/cuda/include/builtin_types.h"
|
||||
.file 7 "/usr/local/cuda/include/device_types.h"
|
||||
.file 8 "/usr/local/cuda/include/driver_types.h"
|
||||
.file 9 "/usr/local/cuda/include/surface_types.h"
|
||||
.file 10 "/usr/local/cuda/include/texture_types.h"
|
||||
.file 11 "/usr/local/cuda/include/vector_types.h"
|
||||
.file 12 "/usr/local/cuda/include/device_launch_parameters.h"
|
||||
.file 13 "/usr/local/cuda/include/crt/storage_class.h"
|
||||
.file 14 "/usr/include/bits/types.h"
|
||||
.file 15 "/usr/include/time.h"
|
||||
.file 16 "lal_ellipsoid_nbor.cu"
|
||||
.file 17 "/usr/local/cuda/include/common_functions.h"
|
||||
.file 18 "/usr/local/cuda/include/math_functions.h"
|
||||
.file 19 "/usr/local/cuda/include/math_constants.h"
|
||||
.file 20 "/usr/local/cuda/include/device_functions.h"
|
||||
.file 21 "/usr/local/cuda/include/sm_11_atomic_functions.h"
|
||||
.file 22 "/usr/local/cuda/include/sm_12_atomic_functions.h"
|
||||
.file 23 "/usr/local/cuda/include/sm_13_double_functions.h"
|
||||
.file 24 "/usr/local/cuda/include/sm_20_atomic_functions.h"
|
||||
.file 25 "/usr/local/cuda/include/sm_20_intrinsics.h"
|
||||
.file 26 "/usr/local/cuda/include/surface_functions.h"
|
||||
.file 27 "/usr/local/cuda/include/texture_fetch_functions.h"
|
||||
.file 28 "/usr/local/cuda/include/math_functions_dbl_ptx3.h"
|
||||
|
||||
|
||||
.entry kernel_nbor (
|
||||
.param .u64 __cudaparm_kernel_nbor_x_,
|
||||
.param .u64 __cudaparm_kernel_nbor_cut_form,
|
||||
.param .s32 __cudaparm_kernel_nbor_ntypes,
|
||||
.param .u64 __cudaparm_kernel_nbor_dev_nbor,
|
||||
.param .s32 __cudaparm_kernel_nbor_nbor_pitch,
|
||||
.param .s32 __cudaparm_kernel_nbor_start,
|
||||
.param .s32 __cudaparm_kernel_nbor_inum,
|
||||
.param .u64 __cudaparm_kernel_nbor_dev_ij,
|
||||
.param .s32 __cudaparm_kernel_nbor_form_low,
|
||||
.param .s32 __cudaparm_kernel_nbor_form_high)
|
||||
{
|
||||
.reg .u32 %r<26>;
|
||||
.reg .u64 %rd<33>;
|
||||
.reg .f32 %f<20>;
|
||||
.reg .pred %p<8>;
|
||||
.loc 16 29 0
|
||||
$LDWbegin_kernel_nbor:
|
||||
cvt.s32.u32 %r1, %ctaid.x;
|
||||
cvt.s32.u32 %r2, %ntid.x;
|
||||
mul24.lo.s32 %r3, %r1, %r2;
|
||||
mov.u32 %r4, %tid.x;
|
||||
add.u32 %r5, %r3, %r4;
|
||||
ld.param.s32 %r6, [__cudaparm_kernel_nbor_start];
|
||||
add.u32 %r7, %r6, %r5;
|
||||
ld.param.s32 %r8, [__cudaparm_kernel_nbor_inum];
|
||||
setp.le.s32 %p1, %r8, %r7;
|
||||
@%p1 bra $Lt_0_4354;
|
||||
.loc 16 36 0
|
||||
cvt.s64.s32 %rd1, %r7;
|
||||
ld.param.u64 %rd2, [__cudaparm_kernel_nbor_dev_ij];
|
||||
mul.wide.s32 %rd3, %r7, 4;
|
||||
add.u64 %rd4, %rd2, %rd3;
|
||||
ld.global.s32 %r9, [%rd4+0];
|
||||
.loc 16 38 0
|
||||
ld.param.s32 %r10, [__cudaparm_kernel_nbor_nbor_pitch];
|
||||
cvt.s64.s32 %rd5, %r10;
|
||||
mul.wide.s32 %rd6, %r10, 4;
|
||||
add.u64 %rd7, %rd6, %rd4;
|
||||
ld.global.s32 %r11, [%rd7+0];
|
||||
.loc 16 39 0
|
||||
add.u64 %rd8, %rd6, %rd7;
|
||||
mov.s64 %rd9, %rd8;
|
||||
.loc 16 41 0
|
||||
ld.param.u64 %rd10, [__cudaparm_kernel_nbor_dev_nbor];
|
||||
add.u64 %rd11, %rd1, %rd5;
|
||||
add.u64 %rd12, %rd5, %rd11;
|
||||
mul.lo.u64 %rd13, %rd12, 4;
|
||||
add.u64 %rd14, %rd10, %rd13;
|
||||
.loc 16 43 0
|
||||
ld.param.u64 %rd15, [__cudaparm_kernel_nbor_x_];
|
||||
cvt.s64.s32 %rd16, %r9;
|
||||
mul.wide.s32 %rd17, %r9, 16;
|
||||
add.u64 %rd18, %rd15, %rd17;
|
||||
ld.global.v4.f32 {%f1,%f2,%f3,%f4}, [%rd18+0];
|
||||
cvt.s32.s64 %r12, %rd5;
|
||||
mul.lo.s32 %r13, %r12, %r11;
|
||||
cvt.s64.s32 %rd19, %r13;
|
||||
mul.wide.s32 %rd20, %r13, 4;
|
||||
add.u64 %rd21, %rd8, %rd20;
|
||||
setp.ge.u64 %p2, %rd8, %rd21;
|
||||
@%p2 bra $Lt_0_6402;
|
||||
cvt.rzi.ftz.s32.f32 %r14, %f4;
|
||||
ld.param.s32 %r15, [__cudaparm_kernel_nbor_form_low];
|
||||
cvt.rn.f32.s32 %f5, %r15;
|
||||
ld.param.s32 %r16, [__cudaparm_kernel_nbor_ntypes];
|
||||
mul.lo.s32 %r17, %r16, %r14;
|
||||
ld.param.u64 %rd22, [__cudaparm_kernel_nbor_cut_form];
|
||||
mov.s32 %r18, 0;
|
||||
$Lt_0_5378:
|
||||
//<loop> Loop body line 43, nesting depth: 1, estimated iterations: unknown
|
||||
.loc 16 49 0
|
||||
ld.global.s32 %r19, [%rd9+0];
|
||||
and.b32 %r20, %r19, 1073741823;
|
||||
.loc 16 50 0
|
||||
cvt.s64.s32 %rd23, %r20;
|
||||
mul.wide.s32 %rd24, %r20, 16;
|
||||
add.u64 %rd25, %rd15, %rd24;
|
||||
ld.global.v4.f32 {%f6,%f7,%f8,%f9}, [%rd25+0];
|
||||
.loc 16 53 0
|
||||
cvt.rzi.ftz.s32.f32 %r21, %f9;
|
||||
add.s32 %r22, %r21, %r17;
|
||||
cvt.s64.s32 %rd26, %r22;
|
||||
mul.wide.s32 %rd27, %r22, 8;
|
||||
add.u64 %rd28, %rd22, %rd27;
|
||||
ld.global.f32 %f10, [%rd28+4];
|
||||
.loc 16 48 0
|
||||
setp.le.ftz.f32 %p3, %f5, %f10;
|
||||
@!%p3 bra $Lt_0_6658;
|
||||
ld.param.s32 %r23, [__cudaparm_kernel_nbor_form_high];
|
||||
cvt.rn.f32.s32 %f11, %r23;
|
||||
setp.ge.ftz.f32 %p4, %f11, %f10;
|
||||
@!%p4 bra $Lt_0_6658;
|
||||
sub.ftz.f32 %f12, %f6, %f1;
|
||||
sub.ftz.f32 %f13, %f7, %f2;
|
||||
sub.ftz.f32 %f14, %f8, %f3;
|
||||
ld.global.f32 %f15, [%rd28+0];
|
||||
mul.ftz.f32 %f16, %f12, %f12;
|
||||
fma.rn.ftz.f32 %f17, %f13, %f13, %f16;
|
||||
fma.rn.ftz.f32 %f18, %f14, %f14, %f17;
|
||||
setp.gt.ftz.f32 %p5, %f15, %f18;
|
||||
@!%p5 bra $Lt_0_6658;
|
||||
.loc 16 64 0
|
||||
st.global.s32 [%rd14+0], %r20;
|
||||
.loc 16 65 0
|
||||
add.u64 %rd14, %rd6, %rd14;
|
||||
.loc 16 66 0
|
||||
add.s32 %r18, %r18, 1;
|
||||
$Lt_0_6658:
|
||||
$L_0_3842:
|
||||
.loc 16 47 0
|
||||
add.u64 %rd9, %rd6, %rd9;
|
||||
setp.gt.u64 %p6, %rd21, %rd9;
|
||||
@%p6 bra $Lt_0_5378;
|
||||
bra.uni $Lt_0_4866;
|
||||
$Lt_0_6402:
|
||||
mov.s32 %r18, 0;
|
||||
$Lt_0_4866:
|
||||
.loc 16 70 0
|
||||
add.s32 %r24, %r12, %r7;
|
||||
cvt.s64.s32 %rd29, %r24;
|
||||
mul.wide.s32 %rd30, %r24, 4;
|
||||
add.u64 %rd31, %rd10, %rd30;
|
||||
st.global.s32 [%rd31+0], %r18;
|
||||
$Lt_0_4354:
|
||||
.loc 16 72 0
|
||||
exit;
|
||||
$LDWend_kernel_nbor:
|
||||
} // kernel_nbor
|
||||
|
||||
.entry kernel_nbor_fast (
|
||||
.param .u64 __cudaparm_kernel_nbor_fast_x_,
|
||||
.param .u64 __cudaparm_kernel_nbor_fast_cut_form,
|
||||
.param .u64 __cudaparm_kernel_nbor_fast_dev_nbor,
|
||||
.param .s32 __cudaparm_kernel_nbor_fast_nbor_pitch,
|
||||
.param .s32 __cudaparm_kernel_nbor_fast_start,
|
||||
.param .s32 __cudaparm_kernel_nbor_fast_inum,
|
||||
.param .u64 __cudaparm_kernel_nbor_fast_dev_ij,
|
||||
.param .s32 __cudaparm_kernel_nbor_fast_form_low,
|
||||
.param .s32 __cudaparm_kernel_nbor_fast_form_high)
|
||||
{
|
||||
.reg .u32 %r<28>;
|
||||
.reg .u64 %rd<42>;
|
||||
.reg .f32 %f<19>;
|
||||
.reg .pred %p<9>;
|
||||
.shared .align 4 .b8 __cuda___cuda_local_var_32570_31_non_const_form120[484];
|
||||
.shared .align 4 .b8 __cuda___cuda_local_var_32571_33_non_const_cutsq604[484];
|
||||
.loc 16 84 0
|
||||
$LDWbegin_kernel_nbor_fast:
|
||||
cvt.s32.u32 %r1, %tid.x;
|
||||
mov.u32 %r2, 120;
|
||||
setp.gt.s32 %p1, %r1, %r2;
|
||||
@%p1 bra $Lt_1_5122;
|
||||
.loc 16 90 0
|
||||
mov.u64 %rd1, __cuda___cuda_local_var_32570_31_non_const_form120;
|
||||
mov.u64 %rd2, __cuda___cuda_local_var_32571_33_non_const_cutsq604;
|
||||
cvt.s64.s32 %rd3, %r1;
|
||||
mul.wide.s32 %rd4, %r1, 4;
|
||||
ld.param.u64 %rd5, [__cudaparm_kernel_nbor_fast_cut_form];
|
||||
mul.wide.s32 %rd6, %r1, 8;
|
||||
add.u64 %rd7, %rd5, %rd6;
|
||||
ld.global.v2.f32 {%f1,%f2}, [%rd7+0];
|
||||
add.u64 %rd8, %rd4, %rd2;
|
||||
st.shared.f32 [%rd8+0], %f1;
|
||||
.loc 16 91 0
|
||||
cvt.rzi.ftz.s32.f32 %r3, %f2;
|
||||
add.u64 %rd9, %rd4, %rd1;
|
||||
st.shared.s32 [%rd9+0], %r3;
|
||||
$Lt_1_5122:
|
||||
mov.u64 %rd1, __cuda___cuda_local_var_32570_31_non_const_form120;
|
||||
mov.u64 %rd2, __cuda___cuda_local_var_32571_33_non_const_cutsq604;
|
||||
.loc 16 94 0
|
||||
bar.sync 0;
|
||||
cvt.s32.u32 %r4, %ctaid.x;
|
||||
cvt.s32.u32 %r5, %ntid.x;
|
||||
mul.lo.s32 %r6, %r4, %r5;
|
||||
ld.param.s32 %r7, [__cudaparm_kernel_nbor_fast_start];
|
||||
add.s32 %r8, %r7, %r6;
|
||||
add.s32 %r9, %r8, %r1;
|
||||
ld.param.s32 %r10, [__cudaparm_kernel_nbor_fast_inum];
|
||||
setp.le.s32 %p2, %r10, %r9;
|
||||
@%p2 bra $Lt_1_5634;
|
||||
.loc 16 98 0
|
||||
cvt.s64.s32 %rd10, %r9;
|
||||
ld.param.u64 %rd11, [__cudaparm_kernel_nbor_fast_dev_ij];
|
||||
mul.wide.s32 %rd12, %r9, 4;
|
||||
add.u64 %rd13, %rd11, %rd12;
|
||||
ld.global.s32 %r11, [%rd13+0];
|
||||
.loc 16 100 0
|
||||
ld.param.s32 %r12, [__cudaparm_kernel_nbor_fast_nbor_pitch];
|
||||
cvt.s64.s32 %rd14, %r12;
|
||||
mul.wide.s32 %rd15, %r12, 4;
|
||||
add.u64 %rd16, %rd15, %rd13;
|
||||
ld.global.s32 %r13, [%rd16+0];
|
||||
.loc 16 101 0
|
||||
add.u64 %rd17, %rd15, %rd16;
|
||||
mov.s64 %rd18, %rd17;
|
||||
.loc 16 103 0
|
||||
ld.param.u64 %rd19, [__cudaparm_kernel_nbor_fast_dev_nbor];
|
||||
add.u64 %rd20, %rd10, %rd14;
|
||||
add.u64 %rd21, %rd14, %rd20;
|
||||
mul.lo.u64 %rd22, %rd21, 4;
|
||||
add.u64 %rd23, %rd19, %rd22;
|
||||
.loc 16 105 0
|
||||
ld.param.u64 %rd24, [__cudaparm_kernel_nbor_fast_x_];
|
||||
cvt.s64.s32 %rd25, %r11;
|
||||
mul.wide.s32 %rd26, %r11, 16;
|
||||
add.u64 %rd27, %rd24, %rd26;
|
||||
ld.global.v4.f32 {%f3,%f4,%f5,%f6}, [%rd27+0];
|
||||
cvt.s32.s64 %r14, %rd14;
|
||||
mul.lo.s32 %r15, %r14, %r13;
|
||||
cvt.s64.s32 %rd28, %r15;
|
||||
mul.wide.s32 %rd29, %r15, 4;
|
||||
add.u64 %rd30, %rd17, %rd29;
|
||||
setp.ge.u64 %p3, %rd17, %rd30;
|
||||
@%p3 bra $Lt_1_7682;
|
||||
cvt.rzi.ftz.s32.f32 %r16, %f6;
|
||||
mul.lo.s32 %r17, %r16, 11;
|
||||
ld.param.s32 %r18, [__cudaparm_kernel_nbor_fast_form_low];
|
||||
mov.s32 %r19, 0;
|
||||
$Lt_1_6658:
|
||||
//<loop> Loop body line 105, nesting depth: 1, estimated iterations: unknown
|
||||
.loc 16 112 0
|
||||
ld.global.s32 %r20, [%rd18+0];
|
||||
and.b32 %r21, %r20, 1073741823;
|
||||
.loc 16 113 0
|
||||
cvt.s64.s32 %rd31, %r21;
|
||||
mul.wide.s32 %rd32, %r21, 16;
|
||||
add.u64 %rd33, %rd24, %rd32;
|
||||
ld.global.v4.f32 {%f7,%f8,%f9,%f10}, [%rd33+0];
|
||||
.loc 16 111 0
|
||||
cvt.rzi.ftz.s32.f32 %r22, %f10;
|
||||
add.s32 %r23, %r22, %r17;
|
||||
cvt.s64.s32 %rd34, %r23;
|
||||
mul.wide.s32 %rd35, %r23, 4;
|
||||
add.u64 %rd36, %rd35, %rd1;
|
||||
ld.shared.s32 %r24, [%rd36+0];
|
||||
setp.lt.s32 %p4, %r24, %r18;
|
||||
@%p4 bra $Lt_1_7938;
|
||||
ld.param.s32 %r25, [__cudaparm_kernel_nbor_fast_form_high];
|
||||
setp.lt.s32 %p5, %r25, %r24;
|
||||
@%p5 bra $Lt_1_7938;
|
||||
sub.ftz.f32 %f11, %f7, %f3;
|
||||
sub.ftz.f32 %f12, %f8, %f4;
|
||||
sub.ftz.f32 %f13, %f9, %f5;
|
||||
add.u64 %rd37, %rd35, %rd2;
|
||||
ld.shared.f32 %f14, [%rd37+0];
|
||||
mul.ftz.f32 %f15, %f11, %f11;
|
||||
fma.rn.ftz.f32 %f16, %f12, %f12, %f15;
|
||||
fma.rn.ftz.f32 %f17, %f13, %f13, %f16;
|
||||
setp.gt.ftz.f32 %p6, %f14, %f17;
|
||||
@!%p6 bra $Lt_1_7938;
|
||||
.loc 16 127 0
|
||||
st.global.s32 [%rd23+0], %r21;
|
||||
.loc 16 128 0
|
||||
add.u64 %rd23, %rd15, %rd23;
|
||||
.loc 16 129 0
|
||||
add.s32 %r19, %r19, 1;
|
||||
$Lt_1_7938:
|
||||
$L_1_4610:
|
||||
.loc 16 110 0
|
||||
add.u64 %rd18, %rd15, %rd18;
|
||||
setp.gt.u64 %p7, %rd30, %rd18;
|
||||
@%p7 bra $Lt_1_6658;
|
||||
bra.uni $Lt_1_6146;
|
||||
$Lt_1_7682:
|
||||
mov.s32 %r19, 0;
|
||||
$Lt_1_6146:
|
||||
.loc 16 133 0
|
||||
add.s32 %r26, %r14, %r9;
|
||||
cvt.s64.s32 %rd38, %r26;
|
||||
mul.wide.s32 %rd39, %r26, 4;
|
||||
add.u64 %rd40, %rd19, %rd39;
|
||||
st.global.s32 [%rd40+0], %r19;
|
||||
$Lt_1_5634:
|
||||
.loc 16 135 0
|
||||
exit;
|
||||
$LDWend_kernel_nbor_fast:
|
||||
} // kernel_nbor_fast
|
||||
|
||||
281
lib/gpu/ellipsoid_nbor_ptx.h
Normal file
281
lib/gpu/ellipsoid_nbor_ptx.h
Normal file
@ -0,0 +1,281 @@
|
||||
const char * ellipsoid_nbor =
|
||||
" .version 2.3\n"
|
||||
" .target sm_20\n"
|
||||
" .address_size 64\n"
|
||||
" .entry kernel_nbor (\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_x_,\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_cut_form,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_ntypes,\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_dev_nbor,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_nbor_pitch,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_start,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_inum,\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_dev_ij,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_form_low,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_form_high)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<26>;\n"
|
||||
" .reg .u64 %rd<33>;\n"
|
||||
" .reg .f32 %f<20>;\n"
|
||||
" .reg .pred %p<8>;\n"
|
||||
" .loc 16 29 0\n"
|
||||
"$LDWbegin_kernel_nbor:\n"
|
||||
" cvt.s32.u32 %r1, %ctaid.x;\n"
|
||||
" cvt.s32.u32 %r2, %ntid.x;\n"
|
||||
" mul24.lo.s32 %r3, %r1, %r2;\n"
|
||||
" mov.u32 %r4, %tid.x;\n"
|
||||
" add.u32 %r5, %r3, %r4;\n"
|
||||
" ld.param.s32 %r6, [__cudaparm_kernel_nbor_start];\n"
|
||||
" add.u32 %r7, %r6, %r5;\n"
|
||||
" ld.param.s32 %r8, [__cudaparm_kernel_nbor_inum];\n"
|
||||
" setp.le.s32 %p1, %r8, %r7;\n"
|
||||
" @%p1 bra $Lt_0_4354;\n"
|
||||
" .loc 16 36 0\n"
|
||||
" cvt.s64.s32 %rd1, %r7;\n"
|
||||
" ld.param.u64 %rd2, [__cudaparm_kernel_nbor_dev_ij];\n"
|
||||
" mul.wide.s32 %rd3, %r7, 4;\n"
|
||||
" add.u64 %rd4, %rd2, %rd3;\n"
|
||||
" ld.global.s32 %r9, [%rd4+0];\n"
|
||||
" .loc 16 38 0\n"
|
||||
" ld.param.s32 %r10, [__cudaparm_kernel_nbor_nbor_pitch];\n"
|
||||
" cvt.s64.s32 %rd5, %r10;\n"
|
||||
" mul.wide.s32 %rd6, %r10, 4;\n"
|
||||
" add.u64 %rd7, %rd6, %rd4;\n"
|
||||
" ld.global.s32 %r11, [%rd7+0];\n"
|
||||
" .loc 16 39 0\n"
|
||||
" add.u64 %rd8, %rd6, %rd7;\n"
|
||||
" mov.s64 %rd9, %rd8;\n"
|
||||
" .loc 16 41 0\n"
|
||||
" ld.param.u64 %rd10, [__cudaparm_kernel_nbor_dev_nbor];\n"
|
||||
" add.u64 %rd11, %rd1, %rd5;\n"
|
||||
" add.u64 %rd12, %rd5, %rd11;\n"
|
||||
" mul.lo.u64 %rd13, %rd12, 4;\n"
|
||||
" add.u64 %rd14, %rd10, %rd13;\n"
|
||||
" .loc 16 43 0\n"
|
||||
" ld.param.u64 %rd15, [__cudaparm_kernel_nbor_x_];\n"
|
||||
" cvt.s64.s32 %rd16, %r9;\n"
|
||||
" mul.wide.s32 %rd17, %r9, 16;\n"
|
||||
" add.u64 %rd18, %rd15, %rd17;\n"
|
||||
" ld.global.v4.f32 {%f1,%f2,%f3,%f4}, [%rd18+0];\n"
|
||||
" cvt.s32.s64 %r12, %rd5;\n"
|
||||
" mul.lo.s32 %r13, %r12, %r11;\n"
|
||||
" cvt.s64.s32 %rd19, %r13;\n"
|
||||
" mul.wide.s32 %rd20, %r13, 4;\n"
|
||||
" add.u64 %rd21, %rd8, %rd20;\n"
|
||||
" setp.ge.u64 %p2, %rd8, %rd21;\n"
|
||||
" @%p2 bra $Lt_0_6402;\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r14, %f4;\n"
|
||||
" ld.param.s32 %r15, [__cudaparm_kernel_nbor_form_low];\n"
|
||||
" cvt.rn.f32.s32 %f5, %r15;\n"
|
||||
" ld.param.s32 %r16, [__cudaparm_kernel_nbor_ntypes];\n"
|
||||
" mul.lo.s32 %r17, %r16, %r14;\n"
|
||||
" ld.param.u64 %rd22, [__cudaparm_kernel_nbor_cut_form];\n"
|
||||
" mov.s32 %r18, 0;\n"
|
||||
"$Lt_0_5378:\n"
|
||||
" .loc 16 49 0\n"
|
||||
" ld.global.s32 %r19, [%rd9+0];\n"
|
||||
" and.b32 %r20, %r19, 1073741823;\n"
|
||||
" .loc 16 50 0\n"
|
||||
" cvt.s64.s32 %rd23, %r20;\n"
|
||||
" mul.wide.s32 %rd24, %r20, 16;\n"
|
||||
" add.u64 %rd25, %rd15, %rd24;\n"
|
||||
" ld.global.v4.f32 {%f6,%f7,%f8,%f9}, [%rd25+0];\n"
|
||||
" .loc 16 53 0\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r21, %f9;\n"
|
||||
" add.s32 %r22, %r21, %r17;\n"
|
||||
" cvt.s64.s32 %rd26, %r22;\n"
|
||||
" mul.wide.s32 %rd27, %r22, 8;\n"
|
||||
" add.u64 %rd28, %rd22, %rd27;\n"
|
||||
" ld.global.f32 %f10, [%rd28+4];\n"
|
||||
" .loc 16 48 0\n"
|
||||
" setp.le.ftz.f32 %p3, %f5, %f10;\n"
|
||||
" @!%p3 bra $Lt_0_6658;\n"
|
||||
" ld.param.s32 %r23, [__cudaparm_kernel_nbor_form_high];\n"
|
||||
" cvt.rn.f32.s32 %f11, %r23;\n"
|
||||
" setp.ge.ftz.f32 %p4, %f11, %f10;\n"
|
||||
" @!%p4 bra $Lt_0_6658;\n"
|
||||
" sub.ftz.f32 %f12, %f6, %f1;\n"
|
||||
" sub.ftz.f32 %f13, %f7, %f2;\n"
|
||||
" sub.ftz.f32 %f14, %f8, %f3;\n"
|
||||
" ld.global.f32 %f15, [%rd28+0];\n"
|
||||
" mul.ftz.f32 %f16, %f12, %f12;\n"
|
||||
" fma.rn.ftz.f32 %f17, %f13, %f13, %f16;\n"
|
||||
" fma.rn.ftz.f32 %f18, %f14, %f14, %f17;\n"
|
||||
" setp.gt.ftz.f32 %p5, %f15, %f18;\n"
|
||||
" @!%p5 bra $Lt_0_6658;\n"
|
||||
" .loc 16 64 0\n"
|
||||
" st.global.s32 [%rd14+0], %r20;\n"
|
||||
" .loc 16 65 0\n"
|
||||
" add.u64 %rd14, %rd6, %rd14;\n"
|
||||
" .loc 16 66 0\n"
|
||||
" add.s32 %r18, %r18, 1;\n"
|
||||
"$Lt_0_6658:\n"
|
||||
"$L_0_3842:\n"
|
||||
" .loc 16 47 0\n"
|
||||
" add.u64 %rd9, %rd6, %rd9;\n"
|
||||
" setp.gt.u64 %p6, %rd21, %rd9;\n"
|
||||
" @%p6 bra $Lt_0_5378;\n"
|
||||
" bra.uni $Lt_0_4866;\n"
|
||||
"$Lt_0_6402:\n"
|
||||
" mov.s32 %r18, 0;\n"
|
||||
"$Lt_0_4866:\n"
|
||||
" .loc 16 70 0\n"
|
||||
" add.s32 %r24, %r12, %r7;\n"
|
||||
" cvt.s64.s32 %rd29, %r24;\n"
|
||||
" mul.wide.s32 %rd30, %r24, 4;\n"
|
||||
" add.u64 %rd31, %rd10, %rd30;\n"
|
||||
" st.global.s32 [%rd31+0], %r18;\n"
|
||||
"$Lt_0_4354:\n"
|
||||
" .loc 16 72 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_nbor:\n"
|
||||
" }\n"
|
||||
" .entry kernel_nbor_fast (\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_fast_x_,\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_fast_cut_form,\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_fast_dev_nbor,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_fast_nbor_pitch,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_fast_start,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_fast_inum,\n"
|
||||
" .param .u64 __cudaparm_kernel_nbor_fast_dev_ij,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_fast_form_low,\n"
|
||||
" .param .s32 __cudaparm_kernel_nbor_fast_form_high)\n"
|
||||
" {\n"
|
||||
" .reg .u32 %r<28>;\n"
|
||||
" .reg .u64 %rd<42>;\n"
|
||||
" .reg .f32 %f<19>;\n"
|
||||
" .reg .pred %p<9>;\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32570_31_non_const_form120[484];\n"
|
||||
" .shared .align 4 .b8 __cuda___cuda_local_var_32571_33_non_const_cutsq604[484];\n"
|
||||
" .loc 16 84 0\n"
|
||||
"$LDWbegin_kernel_nbor_fast:\n"
|
||||
" cvt.s32.u32 %r1, %tid.x;\n"
|
||||
" mov.u32 %r2, 120;\n"
|
||||
" setp.gt.s32 %p1, %r1, %r2;\n"
|
||||
" @%p1 bra $Lt_1_5122;\n"
|
||||
" .loc 16 90 0\n"
|
||||
" mov.u64 %rd1, __cuda___cuda_local_var_32570_31_non_const_form120;\n"
|
||||
" mov.u64 %rd2, __cuda___cuda_local_var_32571_33_non_const_cutsq604;\n"
|
||||
" cvt.s64.s32 %rd3, %r1;\n"
|
||||
" mul.wide.s32 %rd4, %r1, 4;\n"
|
||||
" ld.param.u64 %rd5, [__cudaparm_kernel_nbor_fast_cut_form];\n"
|
||||
" mul.wide.s32 %rd6, %r1, 8;\n"
|
||||
" add.u64 %rd7, %rd5, %rd6;\n"
|
||||
" ld.global.v2.f32 {%f1,%f2}, [%rd7+0];\n"
|
||||
" add.u64 %rd8, %rd4, %rd2;\n"
|
||||
" st.shared.f32 [%rd8+0], %f1;\n"
|
||||
" .loc 16 91 0\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r3, %f2;\n"
|
||||
" add.u64 %rd9, %rd4, %rd1;\n"
|
||||
" st.shared.s32 [%rd9+0], %r3;\n"
|
||||
"$Lt_1_5122:\n"
|
||||
" mov.u64 %rd1, __cuda___cuda_local_var_32570_31_non_const_form120;\n"
|
||||
" mov.u64 %rd2, __cuda___cuda_local_var_32571_33_non_const_cutsq604;\n"
|
||||
" .loc 16 94 0\n"
|
||||
" bar.sync 0;\n"
|
||||
" cvt.s32.u32 %r4, %ctaid.x;\n"
|
||||
" cvt.s32.u32 %r5, %ntid.x;\n"
|
||||
" mul.lo.s32 %r6, %r4, %r5;\n"
|
||||
" ld.param.s32 %r7, [__cudaparm_kernel_nbor_fast_start];\n"
|
||||
" add.s32 %r8, %r7, %r6;\n"
|
||||
" add.s32 %r9, %r8, %r1;\n"
|
||||
" ld.param.s32 %r10, [__cudaparm_kernel_nbor_fast_inum];\n"
|
||||
" setp.le.s32 %p2, %r10, %r9;\n"
|
||||
" @%p2 bra $Lt_1_5634;\n"
|
||||
" .loc 16 98 0\n"
|
||||
" cvt.s64.s32 %rd10, %r9;\n"
|
||||
" ld.param.u64 %rd11, [__cudaparm_kernel_nbor_fast_dev_ij];\n"
|
||||
" mul.wide.s32 %rd12, %r9, 4;\n"
|
||||
" add.u64 %rd13, %rd11, %rd12;\n"
|
||||
" ld.global.s32 %r11, [%rd13+0];\n"
|
||||
" .loc 16 100 0\n"
|
||||
" ld.param.s32 %r12, [__cudaparm_kernel_nbor_fast_nbor_pitch];\n"
|
||||
" cvt.s64.s32 %rd14, %r12;\n"
|
||||
" mul.wide.s32 %rd15, %r12, 4;\n"
|
||||
" add.u64 %rd16, %rd15, %rd13;\n"
|
||||
" ld.global.s32 %r13, [%rd16+0];\n"
|
||||
" .loc 16 101 0\n"
|
||||
" add.u64 %rd17, %rd15, %rd16;\n"
|
||||
" mov.s64 %rd18, %rd17;\n"
|
||||
" .loc 16 103 0\n"
|
||||
" ld.param.u64 %rd19, [__cudaparm_kernel_nbor_fast_dev_nbor];\n"
|
||||
" add.u64 %rd20, %rd10, %rd14;\n"
|
||||
" add.u64 %rd21, %rd14, %rd20;\n"
|
||||
" mul.lo.u64 %rd22, %rd21, 4;\n"
|
||||
" add.u64 %rd23, %rd19, %rd22;\n"
|
||||
" .loc 16 105 0\n"
|
||||
" ld.param.u64 %rd24, [__cudaparm_kernel_nbor_fast_x_];\n"
|
||||
" cvt.s64.s32 %rd25, %r11;\n"
|
||||
" mul.wide.s32 %rd26, %r11, 16;\n"
|
||||
" add.u64 %rd27, %rd24, %rd26;\n"
|
||||
" ld.global.v4.f32 {%f3,%f4,%f5,%f6}, [%rd27+0];\n"
|
||||
" cvt.s32.s64 %r14, %rd14;\n"
|
||||
" mul.lo.s32 %r15, %r14, %r13;\n"
|
||||
" cvt.s64.s32 %rd28, %r15;\n"
|
||||
" mul.wide.s32 %rd29, %r15, 4;\n"
|
||||
" add.u64 %rd30, %rd17, %rd29;\n"
|
||||
" setp.ge.u64 %p3, %rd17, %rd30;\n"
|
||||
" @%p3 bra $Lt_1_7682;\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r16, %f6;\n"
|
||||
" mul.lo.s32 %r17, %r16, 11;\n"
|
||||
" ld.param.s32 %r18, [__cudaparm_kernel_nbor_fast_form_low];\n"
|
||||
" mov.s32 %r19, 0;\n"
|
||||
"$Lt_1_6658:\n"
|
||||
" .loc 16 112 0\n"
|
||||
" ld.global.s32 %r20, [%rd18+0];\n"
|
||||
" and.b32 %r21, %r20, 1073741823;\n"
|
||||
" .loc 16 113 0\n"
|
||||
" cvt.s64.s32 %rd31, %r21;\n"
|
||||
" mul.wide.s32 %rd32, %r21, 16;\n"
|
||||
" add.u64 %rd33, %rd24, %rd32;\n"
|
||||
" ld.global.v4.f32 {%f7,%f8,%f9,%f10}, [%rd33+0];\n"
|
||||
" .loc 16 111 0\n"
|
||||
" cvt.rzi.ftz.s32.f32 %r22, %f10;\n"
|
||||
" add.s32 %r23, %r22, %r17;\n"
|
||||
" cvt.s64.s32 %rd34, %r23;\n"
|
||||
" mul.wide.s32 %rd35, %r23, 4;\n"
|
||||
" add.u64 %rd36, %rd35, %rd1;\n"
|
||||
" ld.shared.s32 %r24, [%rd36+0];\n"
|
||||
" setp.lt.s32 %p4, %r24, %r18;\n"
|
||||
" @%p4 bra $Lt_1_7938;\n"
|
||||
" ld.param.s32 %r25, [__cudaparm_kernel_nbor_fast_form_high];\n"
|
||||
" setp.lt.s32 %p5, %r25, %r24;\n"
|
||||
" @%p5 bra $Lt_1_7938;\n"
|
||||
" sub.ftz.f32 %f11, %f7, %f3;\n"
|
||||
" sub.ftz.f32 %f12, %f8, %f4;\n"
|
||||
" sub.ftz.f32 %f13, %f9, %f5;\n"
|
||||
" add.u64 %rd37, %rd35, %rd2;\n"
|
||||
" ld.shared.f32 %f14, [%rd37+0];\n"
|
||||
" mul.ftz.f32 %f15, %f11, %f11;\n"
|
||||
" fma.rn.ftz.f32 %f16, %f12, %f12, %f15;\n"
|
||||
" fma.rn.ftz.f32 %f17, %f13, %f13, %f16;\n"
|
||||
" setp.gt.ftz.f32 %p6, %f14, %f17;\n"
|
||||
" @!%p6 bra $Lt_1_7938;\n"
|
||||
" .loc 16 127 0\n"
|
||||
" st.global.s32 [%rd23+0], %r21;\n"
|
||||
" .loc 16 128 0\n"
|
||||
" add.u64 %rd23, %rd15, %rd23;\n"
|
||||
" .loc 16 129 0\n"
|
||||
" add.s32 %r19, %r19, 1;\n"
|
||||
"$Lt_1_7938:\n"
|
||||
"$L_1_4610:\n"
|
||||
" .loc 16 110 0\n"
|
||||
" add.u64 %rd18, %rd15, %rd18;\n"
|
||||
" setp.gt.u64 %p7, %rd30, %rd18;\n"
|
||||
" @%p7 bra $Lt_1_6658;\n"
|
||||
" bra.uni $Lt_1_6146;\n"
|
||||
"$Lt_1_7682:\n"
|
||||
" mov.s32 %r19, 0;\n"
|
||||
"$Lt_1_6146:\n"
|
||||
" .loc 16 133 0\n"
|
||||
" add.s32 %r26, %r14, %r9;\n"
|
||||
" cvt.s64.s32 %rd38, %r26;\n"
|
||||
" mul.wide.s32 %rd39, %r26, 4;\n"
|
||||
" add.u64 %rd40, %rd19, %rd39;\n"
|
||||
" st.global.s32 [%rd40+0], %r19;\n"
|
||||
"$Lt_1_5634:\n"
|
||||
" .loc 16 135 0\n"
|
||||
" exit;\n"
|
||||
"$LDWend_kernel_nbor_fast:\n"
|
||||
" }\n"
|
||||
;
|
||||
1590
lib/gpu/gayberne.ptx
Normal file
1590
lib/gpu/gayberne.ptx
Normal file
File diff suppressed because it is too large
Load Diff
1915
lib/gpu/gayberne_lj.ptx
Normal file
1915
lib/gpu/gayberne_lj.ptx
Normal file
File diff suppressed because it is too large
Load Diff
1860
lib/gpu/gayberne_lj_ptx.h
Normal file
1860
lib/gpu/gayberne_lj_ptx.h
Normal file
File diff suppressed because it is too large
Load Diff
1540
lib/gpu/gayberne_ptx.h
Normal file
1540
lib/gpu/gayberne_ptx.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -211,7 +211,7 @@ inline int UCL_Device::set(int num) {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not access accelerator number " << num
|
||||
<< " for use.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_ERROR;
|
||||
}
|
||||
|
||||
@ -18,6 +18,10 @@
|
||||
#define NVC_GERYON_EXIT assert(0==1)
|
||||
#endif
|
||||
|
||||
#ifndef UCL_GERYON_EXIT
|
||||
#define UCL_GERYON_EXIT NVC_GERYON_EXIT
|
||||
#endif
|
||||
|
||||
#ifdef UCL_DEBUG
|
||||
#define UCL_SYNC_DEBUG
|
||||
#define UCL_DESTRUCT_CHECK
|
||||
|
||||
@ -288,7 +288,7 @@ inline int UCL_Device::set(int num) {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not access accelerator number " << num
|
||||
<< " for use.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_ERROR;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ class UCL_Program {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not open kernel file: "
|
||||
<< filename << std::endl;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_FILE_NOT_FOUND;
|
||||
}
|
||||
@ -108,14 +108,14 @@ class UCL_Program {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not open binary kernel file: "
|
||||
<< filename << std::endl;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_FILE_NOT_FOUND;
|
||||
} else if (err!=CUDA_SUCCESS) {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Error loading binary kernel file: "
|
||||
<< filename << std::endl;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_FILE_NOT_FOUND;
|
||||
}
|
||||
@ -156,7 +156,7 @@ class UCL_Kernel {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not find function: " << function
|
||||
<< " in program.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_FUNCTION_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -18,6 +18,10 @@
|
||||
#define NVD_GERYON_EXIT assert(0==1)
|
||||
#endif
|
||||
|
||||
#ifndef UCL_GERYON_EXIT
|
||||
#define UCL_GERYON_EXIT NVD_GERYON_EXIT
|
||||
#endif
|
||||
|
||||
#ifdef UCL_DEBUG
|
||||
#define UCL_SYNC_DEBUG
|
||||
#define UCL_DESTRUCT_CHECK
|
||||
|
||||
@ -89,6 +89,9 @@ class UCL_Timer {
|
||||
inline double add_to_total()
|
||||
{ double t=time(); _total_time+=t; return t/1000.0; }
|
||||
|
||||
/// Add a user specified time to the total (ms)
|
||||
inline void add_time_to_total(const double t) { _total_time+=t; }
|
||||
|
||||
/// Return the time (ms) of last start to stop - Forces synchronization
|
||||
inline double time() {
|
||||
float timer;
|
||||
|
||||
@ -28,8 +28,14 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include "CL/cl.h"
|
||||
#include "CL/cl_platform.h"
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#include <OpenCL/cl_platform.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#endif
|
||||
|
||||
#include "ocl_macros.h"
|
||||
#include "ucl_types.h"
|
||||
|
||||
@ -118,7 +124,7 @@ class UCL_Device {
|
||||
if (errorv!=CL_SUCCESS) {
|
||||
std::cerr << "Could not create command queue on device: " << name()
|
||||
<< std::endl;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
@ -293,7 +299,7 @@ inline int UCL_Device::create_context() {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not access accelerator number " << _device
|
||||
<< " for use.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_ERROR;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ class UCL_Program {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not open kernel file: "
|
||||
<< filename << std::endl;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_FILE_NOT_FOUND;
|
||||
}
|
||||
@ -244,7 +244,7 @@ inline int UCL_Kernel::set_function(UCL_Program &program, const char *function)
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not find function: " << function
|
||||
<< " in program.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return UCL_FUNCTION_NOT_FOUND;
|
||||
}
|
||||
|
||||
@ -3,7 +3,12 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cassert>
|
||||
#include "CL/cl.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#ifdef MPI_GERYON
|
||||
#include "mpi.h"
|
||||
@ -12,6 +17,10 @@
|
||||
#define OCL_GERYON_EXIT assert(0==1)
|
||||
#endif
|
||||
|
||||
#ifndef UCL_GERYON_EXIT
|
||||
#define UCL_GERYON_EXIT OCL_GERYON_EXIT
|
||||
#endif
|
||||
|
||||
#ifdef UCL_DEBUG
|
||||
#define UCL_SYNC_DEBUG
|
||||
#define UCL_DESTRUCT_CHECK
|
||||
|
||||
@ -88,6 +88,9 @@ class UCL_Timer {
|
||||
inline double add_to_total()
|
||||
{ double t=time(); _total_time+=t; return t/1000.0; }
|
||||
|
||||
/// Add a user specified time to the total (ms)
|
||||
inline void add_time_to_total(const double t) { _total_time+=t; }
|
||||
|
||||
/// Return the time (ms) of last start to stop - Forces synchronization
|
||||
inline double time() {
|
||||
cl_ulong tstart,tend;
|
||||
|
||||
@ -67,7 +67,7 @@ class UCL_D_Mat : public UCL_BaseMat {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not allocate "
|
||||
<< rows*cols*sizeof(numtyp) << " bytes on device.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return err;
|
||||
}
|
||||
@ -103,7 +103,7 @@ class UCL_D_Mat : public UCL_BaseMat {
|
||||
#ifndef UCL_NO_EXIT
|
||||
std::cerr << "UCL Error: Could not allocate "
|
||||
<< rows*cols*sizeof(numtyp) << " bytes on device.\n";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ class UCL_D_Vec : public UCL_BaseMat {
|
||||
std::cerr << "UCL Error: Could not allocate " << _row_bytes
|
||||
<< " bytes on device.\n";
|
||||
_row_bytes=0;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
_row_bytes=0;
|
||||
return err;
|
||||
@ -102,7 +102,7 @@ class UCL_D_Vec : public UCL_BaseMat {
|
||||
std::cerr << "UCL Error: Could not allocate " << _row_bytes
|
||||
<< " bytes on device.\n";
|
||||
_row_bytes=0;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
_row_bytes=0;
|
||||
return err;
|
||||
|
||||
@ -71,7 +71,7 @@ class UCL_H_Mat : public UCL_BaseMat {
|
||||
std::cerr << "UCL Error: Could not allocate " << _row_bytes*_rows
|
||||
<< " bytes on host.\n";
|
||||
_row_bytes=0;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
_row_bytes=0;
|
||||
return err;
|
||||
@ -102,7 +102,7 @@ class UCL_H_Mat : public UCL_BaseMat {
|
||||
std::cerr << "UCL Error: Could not allocate " << _row_bytes*_rows
|
||||
<< " bytes on host.\n";
|
||||
_row_bytes=0;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
_row_bytes=0;
|
||||
return err;
|
||||
|
||||
@ -72,7 +72,7 @@ class UCL_H_Vec : public UCL_BaseMat {
|
||||
std::cerr << "UCL Error: Could not allocate " << _row_bytes
|
||||
<< " bytes on host.\n";
|
||||
_row_bytes=0;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
_row_bytes=0;
|
||||
return err;
|
||||
@ -103,7 +103,7 @@ class UCL_H_Vec : public UCL_BaseMat {
|
||||
std::cerr << "UCL Error: Could not allocate " << _row_bytes
|
||||
<< " bytes on host.\n";
|
||||
_row_bytes=0;
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
#endif
|
||||
_row_bytes=0;
|
||||
return err;
|
||||
|
||||
@ -119,7 +119,7 @@ inline void ucl_print(mat_type &mat, const size_t n, std::ostream &out,
|
||||
if (n>mat.numel()) {
|
||||
std::cerr << "Attempted to ucl_print " << n << " elements of matrix "
|
||||
<< "that only has " << mat.numel() << " elements.";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
}
|
||||
_ucl_print<mat_type::MEM_TYPE>::p(mat,n,out,delim);
|
||||
}
|
||||
@ -144,7 +144,7 @@ inline void ucl_print(mat_type &mat, const size_t rows, const size_t cols,
|
||||
if (rows*cols>mat.numel()) {
|
||||
std::cerr << "Attempted to ucl_print " << rows*cols << " elements of matrix "
|
||||
<< "that only has " << mat.numel() << " elements.";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
}
|
||||
_ucl_print<mat_type::MEM_TYPE>::p(mat,rows,cols,out,delim,row_delim);
|
||||
}
|
||||
@ -189,7 +189,7 @@ inline void ucl_print(const mat_type &mat, const size_t n, std::ostream &out,
|
||||
if (n>mat.numel()) {
|
||||
std::cerr << "Attempted to ucl_print " << n << " elements of matrix "
|
||||
<< "that only has " << mat.numel() << " elements.";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
}
|
||||
_ucl_print<mat_type::MEM_TYPE>::p(mat,n,out,delim,dev);
|
||||
}
|
||||
@ -216,7 +216,7 @@ inline void ucl_print(const mat_type &mat,const size_t rows,const size_t cols,
|
||||
if (rows*cols>mat.numel()) {
|
||||
std::cerr << "Attempted to ucl_print " << rows*cols << " elements of matrix "
|
||||
<< "that only has " << mat.numel() << " elements.";
|
||||
exit(1);
|
||||
UCL_GERYON_EXIT;
|
||||
}
|
||||
_ucl_print<mat_type::MEM_TYPE>::p(mat,rows,cols,out,delim,row_delim,dev);
|
||||
}
|
||||
|
||||
BIN
lib/gpu/lal_ans.o
Normal file
BIN
lib/gpu/lal_ans.o
Normal file
Binary file not shown.
@ -21,7 +21,7 @@ using namespace LAMMPS_AL;
|
||||
template <class numtyp, class acctyp>
|
||||
AtomT::Atom() : _compiled(false),_allocated(false),
|
||||
_max_gpu_bytes(0) {
|
||||
#ifndef USE_OPENCL
|
||||
#ifdef USE_CUDPP
|
||||
sort_config.op = CUDPP_ADD;
|
||||
sort_config.datatype = CUDPP_UINT;
|
||||
sort_config.algorithm = CUDPP_SORT_RADIX;
|
||||
@ -56,7 +56,7 @@ bool AtomT::alloc(const int nall) {
|
||||
cpuview=true;
|
||||
|
||||
// Allocate storage for CUDPP sort
|
||||
#ifndef USE_OPENCL
|
||||
#ifdef USE_CUDPP
|
||||
if (_gpu_nbor==1) {
|
||||
CUDPPResult result = cudppPlan(&sort_plan, sort_config, _max_atoms, 1, 0);
|
||||
if (CUDPP_SUCCESS != result)
|
||||
@ -190,6 +190,7 @@ bool AtomT::init(const int nall, const bool charge, const bool rot,
|
||||
_rot=rot;
|
||||
_other=_charge || _rot;
|
||||
dev=&devi;
|
||||
_time_transfer=0;
|
||||
|
||||
// Initialize atom and nbor data
|
||||
int ef_nall=nall;
|
||||
@ -241,7 +242,7 @@ void AtomT::clear_resize() {
|
||||
dev_type_cast.clear();
|
||||
#endif
|
||||
|
||||
#ifndef USE_OPENCL
|
||||
#ifdef USE_CUDPP
|
||||
if (_gpu_nbor==1) cudppDestroyPlan(sort_plan);
|
||||
#endif
|
||||
|
||||
@ -285,7 +286,7 @@ double AtomT::host_memory_usage() const {
|
||||
// Sort arrays for neighbor list calculation
|
||||
template <class numtyp, class acctyp>
|
||||
void AtomT::sort_neighbor(const int num_atoms) {
|
||||
#ifndef USE_OPENCL
|
||||
#ifdef USE_CUDPP
|
||||
CUDPPResult result = cudppSort(sort_plan, (unsigned *)dev_cell_id.begin(),
|
||||
(int *)dev_particle_id.begin(),
|
||||
8*sizeof(unsigned), num_atoms);
|
||||
|
||||
@ -28,7 +28,6 @@ using namespace ucl_opencl;
|
||||
|
||||
#else
|
||||
|
||||
#include "cudpp.h"
|
||||
#include "geryon/nvd_timer.h"
|
||||
#include "geryon/nvd_mat.h"
|
||||
#include "geryon/nvd_kernel.h"
|
||||
@ -36,6 +35,10 @@ using namespace ucl_cudadr;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef USE_CUDPP
|
||||
#include "cudpp.h"
|
||||
#endif
|
||||
|
||||
#include "lal_precision.h"
|
||||
|
||||
namespace LAMMPS_AL {
|
||||
@ -135,7 +138,7 @@ class Atom {
|
||||
time_quat.zero_total();
|
||||
}
|
||||
|
||||
return total;
|
||||
return total+_time_transfer/1000.0;
|
||||
}
|
||||
|
||||
/// Return the total time for data cast/pack
|
||||
@ -350,6 +353,12 @@ class Atom {
|
||||
}
|
||||
}
|
||||
|
||||
/// Add in casting time from additional data (seconds)
|
||||
inline void add_cast_time(double t) { _time_cast+=t; }
|
||||
|
||||
/// Add in transfer time from additional data (ms)
|
||||
inline void add_transfer_time(double t) { _time_transfer+=t; }
|
||||
|
||||
/// Return number of bytes used on device
|
||||
inline double max_gpu_bytes()
|
||||
{ double m=_max_gpu_bytes; _max_gpu_bytes=0.0; return m; }
|
||||
@ -412,11 +421,11 @@ class Atom {
|
||||
bool _allocated, _rot, _charge, _other;
|
||||
int _max_atoms, _nall, _gpu_nbor;
|
||||
bool _bonds;
|
||||
double _time_cast;
|
||||
double _time_cast, _time_transfer;
|
||||
|
||||
double _max_gpu_bytes;
|
||||
|
||||
#ifndef USE_OPENCL
|
||||
#ifdef USE_CUDPP
|
||||
CUDPPConfiguration sort_config;
|
||||
CUDPPHandle sort_plan;
|
||||
#endif
|
||||
|
||||
BIN
lib/gpu/lal_atom.o
Normal file
BIN
lib/gpu/lal_atom.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_base_atomic.o
Normal file
BIN
lib/gpu/lal_base_atomic.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_base_charge.o
Normal file
BIN
lib/gpu/lal_base_charge.o
Normal file
Binary file not shown.
@ -14,6 +14,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "lal_base_ellipsoid.h"
|
||||
#include <cstdlib>
|
||||
using namespace LAMMPS_AL;
|
||||
|
||||
#ifdef USE_OPENCL
|
||||
|
||||
BIN
lib/gpu/lal_base_ellipsoid.o
Normal file
BIN
lib/gpu/lal_base_ellipsoid.o
Normal file
Binary file not shown.
153
lib/gpu/lal_buck.cpp
Normal file
153
lib/gpu/lal_buck.cpp
Normal file
@ -0,0 +1,153 @@
|
||||
/***************************************************************************
|
||||
buck.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Class for acceleration of the lj/cut pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef USE_OPENCL
|
||||
#include "buck_cl.h"
|
||||
#else
|
||||
#include "buck_ptx.h"
|
||||
#endif
|
||||
|
||||
#include "lal_buck.h"
|
||||
#include <cassert>
|
||||
using namespace LAMMPS_AL;
|
||||
#define BuckT Buck<numtyp, acctyp>
|
||||
|
||||
extern Device<PRECISION,ACC_PRECISION> device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BuckT::Buck() : BaseAtomic<numtyp,acctyp>(), _allocated(false) {
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BuckT::~Buck() {
|
||||
clear();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int BuckT::bytes_per_atom(const int max_nbors) const {
|
||||
return this->bytes_per_atom_atomic(max_nbors);
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int BuckT::init(const int ntypes, double **host_cutsq,
|
||||
double **host_rhoinv, double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **host_offset, double *host_special_lj,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *_screen) {
|
||||
int success;
|
||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
||||
_screen,buck);
|
||||
if (success!=0)
|
||||
return success;
|
||||
|
||||
// If atom type constants fit in shared memory use fast kernel
|
||||
int lj_types=ntypes;
|
||||
shared_types=false;
|
||||
int max_shared_types=this->device->max_shared_types();
|
||||
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
||||
lj_types=max_shared_types;
|
||||
shared_types=true;
|
||||
}
|
||||
_lj_types=lj_types;
|
||||
|
||||
// Allocate a host write buffer for data initialization
|
||||
UCL_H_Vec<numtyp> host_write(lj_types*lj_types*32,*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int i=0; i<lj_types*lj_types; i++)
|
||||
host_write[i]=0.0;
|
||||
|
||||
coeff1.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,coeff1,host_write,host_rhoinv,
|
||||
host_buck1,host_buck2,host_cutsq);
|
||||
|
||||
coeff2.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,coeff2,host_write,host_a,host_c,
|
||||
host_offset);
|
||||
|
||||
UCL_H_Vec<double> dview;
|
||||
sp_lj.alloc(4,*(this->ucl_device),UCL_READ_ONLY);
|
||||
dview.view(host_special_lj,4,*(this->ucl_device));
|
||||
ucl_copy(sp_lj,dview,false);
|
||||
|
||||
_allocated=true;
|
||||
this->_max_bytes=coeff1.row_bytes()+coeff2.row_bytes()+sp_lj.row_bytes();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void BuckT::clear() {
|
||||
if (!_allocated)
|
||||
return;
|
||||
_allocated=false;
|
||||
|
||||
coeff1.clear();
|
||||
coeff2.clear();
|
||||
sp_lj.clear();
|
||||
this->clear_atomic();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
double BuckT::host_memory_usage() const {
|
||||
return this->host_memory_usage_atomic()+sizeof(Buck<numtyp,acctyp>);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Calculate energies, forces, and torques
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void BuckT::loop(const bool _eflag, const bool _vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int eflag, vflag;
|
||||
if (_eflag)
|
||||
eflag=1;
|
||||
else
|
||||
eflag=0;
|
||||
|
||||
if (_vflag)
|
||||
vflag=1;
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
if (shared_types) {
|
||||
this->k_pair_fast.set_size(GX,BX);
|
||||
this->k_pair_fast.run(&this->atom->dev_x.begin(), &coeff1.begin(),
|
||||
&coeff2.begin(), &sp_lj.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(),
|
||||
&this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag,
|
||||
&ainum, &nbor_pitch, &this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_pair.set_size(GX,BX);
|
||||
this->k_pair.run(&this->atom->dev_x.begin(), &coeff1.begin(), &coeff2.begin(),
|
||||
&_lj_types, &sp_lj.begin(), &this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag, &ainum,
|
||||
&nbor_pitch, &this->_threads_per_atom);
|
||||
}
|
||||
this->time_pair.stop();
|
||||
}
|
||||
|
||||
template class Buck<PRECISION,ACC_PRECISION>;
|
||||
195
lib/gpu/lal_buck.cu
Normal file
195
lib/gpu/lal_buck.cu
Normal file
@ -0,0 +1,195 @@
|
||||
// **************************************************************************
|
||||
// buck.cu
|
||||
// -------------------
|
||||
// Trung Dac Nguyen (ORNL)
|
||||
//
|
||||
// Device code for acceleration of the buck pair style
|
||||
//
|
||||
// __________________________________________________________________________
|
||||
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
// __________________________________________________________________________
|
||||
//
|
||||
// begin :
|
||||
// email : nguyentd@ornl.gov
|
||||
// ***************************************************************************/
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
#include "lal_aux_fun1.h"
|
||||
texture<float4> pos_tex;
|
||||
#ifndef _DOUBLE_DOUBLE
|
||||
ucl_inline float4 fetch_pos(const int& i, const float4 *pos)
|
||||
{ return tex1Dfetch(pos_tex, i); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__kernel void kernel_pair(__global numtyp4 *x_, __global numtyp4 *coeff1,
|
||||
__global numtyp4* coeff2, const int lj_types,
|
||||
__global numtyp *sp_lj_in, __global int *dev_nbor,
|
||||
__global int *dev_packed, __global acctyp4 *ans,
|
||||
__global acctyp *engv, const int eflag,
|
||||
const int vflag, const int inum,
|
||||
const int nbor_pitch, const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp sp_lj[4];
|
||||
sp_lj[0]=sp_lj_in[0];
|
||||
sp_lj[1]=sp_lj_in[1];
|
||||
sp_lj[2]=sp_lj_in[2];
|
||||
sp_lj[3]=sp_lj_in[3];
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
int itype=ix.w;
|
||||
|
||||
numtyp factor_lj;
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
|
||||
int j=*nbor;
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int jtype=jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp r2inv = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
int mtype=itype*lj_types+jtype;
|
||||
if (r2inv<coeff1[mtype].w) {
|
||||
numtyp r=ucl_sqrt(r2inv);
|
||||
numtyp rexp = ucl_exp(-r*coeff1[mtype].x);
|
||||
r2inv=ucl_recip(r2inv);
|
||||
numtyp r6inv = r2inv*r2inv*r2inv;
|
||||
numtyp force = r2inv*(coeff1[mtype].y*r*rexp
|
||||
- coeff1[mtype].z*r6inv);
|
||||
force*=factor_lj;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
numtyp e=coeff2[mtype].x*rexp - coeff2[mtype].y*r6inv;
|
||||
energy+=factor_lj*(e-coeff2[mtype].z);
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers(f,energy,virial,ii,inum,tid,t_per_atom,offset,eflag,vflag,
|
||||
ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp4 *coeff1_in,
|
||||
__global numtyp4* coeff2_in,
|
||||
__global numtyp* sp_lj_in,
|
||||
__global int *dev_nbor, __global int *dev_packed,
|
||||
__global acctyp4 *ans, __global acctyp *engv,
|
||||
const int eflag, const int vflag, const int inum,
|
||||
const int nbor_pitch, const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp4 coeff1[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp4 coeff2[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp sp_lj[4];
|
||||
if (tid<4)
|
||||
sp_lj[tid]=sp_lj_in[tid];
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
coeff1[tid]=coeff1_in[tid];
|
||||
if (eflag>0)
|
||||
coeff2[tid]=coeff2_in[tid];
|
||||
}
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
__syncthreads();
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
int iw=ix.w;
|
||||
int itype=fast_mul((int)MAX_SHARED_TYPES,iw);
|
||||
|
||||
numtyp factor_lj;
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
|
||||
int j=*nbor;
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int mtype=itype+jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp r2inv = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (r2inv<coeff1[mtype].w) {
|
||||
numtyp r=ucl_sqrt(r2inv);
|
||||
numtyp rexp = ucl_exp(-r*coeff1[mtype].x);
|
||||
r2inv=ucl_recip(r2inv);
|
||||
numtyp r6inv = r2inv*r2inv*r2inv;
|
||||
numtyp force = r2inv*(coeff1[mtype].y*r*rexp
|
||||
- coeff1[mtype].z*r6inv);
|
||||
force*=factor_lj;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
numtyp e=coeff2[mtype].x*rexp - coeff2[mtype].y*r6inv;
|
||||
energy+=factor_lj*(e-coeff2[mtype].z);
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers(f,energy,virial,ii,inum,tid,t_per_atom,offset,eflag,vflag,
|
||||
ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
80
lib/gpu/lal_buck.h
Normal file
80
lib/gpu/lal_buck.h
Normal file
@ -0,0 +1,80 @@
|
||||
/***************************************************************************
|
||||
buck.h
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Class for acceleration of the buck pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LAL_BUCK_H
|
||||
#define LAL_BUCK_H
|
||||
|
||||
#include "lal_base_atomic.h"
|
||||
|
||||
namespace LAMMPS_AL {
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
class Buck : public BaseAtomic<numtyp, acctyp> {
|
||||
public:
|
||||
Buck();
|
||||
~Buck();
|
||||
|
||||
/// Clear any previous data and set up for a new LAMMPS run
|
||||
/** \param max_nbors initial number of rows in the neighbor matrix
|
||||
* \param cell_size cutoff + skin
|
||||
* \param gpu_split fraction of particles handled by device
|
||||
*
|
||||
* Returns:
|
||||
* - 0 if successfull
|
||||
* - -1 if fix gpu not found
|
||||
* - -3 if there is an out of memory error
|
||||
* - -4 if the GPU library was not compiled for GPU
|
||||
* - -5 Double precision is not supported on card **/
|
||||
int init(const int ntypes, double **host_cutsq,
|
||||
double **host_rhoinv, double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **host_offset, double *host_special_lj,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *screen);
|
||||
|
||||
/// Clear all host and device data
|
||||
/** \note This is called at the beginning of the init() routine **/
|
||||
void clear();
|
||||
|
||||
/// Returns memory usage on device per atom
|
||||
int bytes_per_atom(const int max_nbors) const;
|
||||
|
||||
/// Total host memory used by library for pair style
|
||||
double host_memory_usage() const;
|
||||
|
||||
// --------------------------- TYPE DATA --------------------------
|
||||
|
||||
/// coeff1.x = rhoinv, coeff1.y = buck1, coeff1.z = buck2, coeff1.w = cutsq
|
||||
UCL_D_Vec<numtyp4> coeff1;
|
||||
/// coeff2.x = a, coeff2.y = c, coeff2.z = offset
|
||||
UCL_D_Vec<numtyp4> coeff2;
|
||||
/// Special LJ values
|
||||
UCL_D_Vec<numtyp> sp_lj;
|
||||
|
||||
/// If atom type constants fit in shared memory, use fast kernels
|
||||
bool shared_types;
|
||||
|
||||
/// Number of atom types
|
||||
int _lj_types;
|
||||
|
||||
private:
|
||||
bool _allocated;
|
||||
void loop(const bool _eflag, const bool _vflag);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
166
lib/gpu/lal_buck_coul.cpp
Normal file
166
lib/gpu/lal_buck_coul.cpp
Normal file
@ -0,0 +1,166 @@
|
||||
/***************************************************************************
|
||||
buck_coul.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Class for acceleration of the buck/coul/cut pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef USE_OPENCL
|
||||
#include "buck_coul_cl.h"
|
||||
#else
|
||||
#include "buck_coul_ptx.h"
|
||||
#endif
|
||||
|
||||
#include "lal_buck_coul.h"
|
||||
#include <cassert>
|
||||
using namespace LAMMPS_AL;
|
||||
#define BuckCoulT BuckCoul<numtyp, acctyp>
|
||||
|
||||
extern Device<PRECISION,ACC_PRECISION> device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BuckCoulT::BuckCoul() : BaseCharge<numtyp,acctyp>(), _allocated(false) {
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BuckCoulT::~BuckCoul() {
|
||||
clear();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int BuckCoulT::bytes_per_atom(const int max_nbors) const {
|
||||
return this->bytes_per_atom_atomic(max_nbors);
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int BuckCoulT::init(const int ntypes, double **host_cutsq,
|
||||
double **host_rhoinv, double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **host_offset, double *host_special_lj,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *_screen, double **host_cut_ljsq,
|
||||
double **host_cut_coulsq, double *host_special_coul,
|
||||
const double qqrd2e) {
|
||||
int success;
|
||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
||||
_screen,buck_coul);
|
||||
if (success!=0)
|
||||
return success;
|
||||
|
||||
// If atom type constants fit in shared memory use fast kernel
|
||||
int lj_types=ntypes;
|
||||
shared_types=false;
|
||||
int max_shared_types=this->device->max_shared_types();
|
||||
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
||||
lj_types=max_shared_types;
|
||||
shared_types=true;
|
||||
}
|
||||
_lj_types=lj_types;
|
||||
|
||||
// Allocate a host write buffer for data initialization
|
||||
UCL_H_Vec<numtyp> host_write(lj_types*lj_types*32,*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int i=0; i<lj_types*lj_types; i++)
|
||||
host_write[i]=0.0;
|
||||
|
||||
coeff1.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,coeff1,host_write,host_rhoinv,
|
||||
host_buck1,host_buck2);
|
||||
|
||||
coeff2.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,coeff2,host_write,host_a,host_c,
|
||||
host_offset);
|
||||
|
||||
cutsq.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,cutsq,host_write,host_cutsq,
|
||||
host_cut_ljsq, host_cut_coulsq);
|
||||
|
||||
sp_lj.alloc(8,*(this->ucl_device),UCL_READ_ONLY);
|
||||
for (int i=0; i<4; i++) {
|
||||
host_write[i]=host_special_lj[i];
|
||||
host_write[i+4]=host_special_coul[i];
|
||||
}
|
||||
ucl_copy(sp_lj,host_write,8,false);
|
||||
|
||||
_qqrd2e = qqrd2e;
|
||||
|
||||
_allocated=true;
|
||||
this->_max_bytes=coeff1.row_bytes()+coeff2.row_bytes()+sp_lj.row_bytes();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void BuckCoulT::clear() {
|
||||
if (!_allocated)
|
||||
return;
|
||||
_allocated=false;
|
||||
|
||||
coeff1.clear();
|
||||
coeff2.clear();
|
||||
sp_lj.clear();
|
||||
this->clear_atomic();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
double BuckCoulT::host_memory_usage() const {
|
||||
return this->host_memory_usage_atomic()+sizeof(BuckCoul<numtyp,acctyp>);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Calculate energies, forces, and torques
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void BuckCoulT::loop(const bool _eflag, const bool _vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int eflag, vflag;
|
||||
if (_eflag)
|
||||
eflag=1;
|
||||
else
|
||||
eflag=0;
|
||||
|
||||
if (_vflag)
|
||||
vflag=1;
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
if (shared_types) {
|
||||
this->k_pair_fast.set_size(GX,BX);
|
||||
this->k_pair_fast.run(&this->atom->dev_x.begin(), &coeff1.begin(),
|
||||
&coeff2.begin(), &sp_lj.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(),
|
||||
&this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag,
|
||||
&ainum, &nbor_pitch,
|
||||
&this->atom->dev_q.begin(), &cutsq.begin(),
|
||||
&_qqrd2e, &this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_pair.set_size(GX,BX);
|
||||
this->k_pair.run(&this->atom->dev_x.begin(), &coeff1.begin(), &coeff2.begin(),
|
||||
&_lj_types, &sp_lj.begin(), &this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag, &ainum,
|
||||
&nbor_pitch, &this->atom->dev_q.begin(),
|
||||
&cutsq.begin(), &_qqrd2e, &this->_threads_per_atom);
|
||||
}
|
||||
this->time_pair.stop();
|
||||
}
|
||||
|
||||
template class BuckCoul<PRECISION,ACC_PRECISION>;
|
||||
244
lib/gpu/lal_buck_coul.cu
Normal file
244
lib/gpu/lal_buck_coul.cu
Normal file
@ -0,0 +1,244 @@
|
||||
// **************************************************************************
|
||||
// buck_coul.cu
|
||||
// -------------------
|
||||
// Trung Dac Nguyen (ORNL)
|
||||
//
|
||||
// Device code for acceleration of the buck/coul/cut pair style
|
||||
//
|
||||
// __________________________________________________________________________
|
||||
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
// __________________________________________________________________________
|
||||
//
|
||||
// begin :
|
||||
// email : nguyentd@ornl.gov
|
||||
// ***************************************************************************/
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
#include "lal_aux_fun1.h"
|
||||
texture<float4> pos_tex;
|
||||
texture<float> q_tex;
|
||||
#ifndef _DOUBLE_DOUBLE
|
||||
ucl_inline float4 fetch_pos(const int& i, const float4 *pos)
|
||||
{ return tex1Dfetch(pos_tex, i); }
|
||||
ucl_inline float fetch_q(const int& i, const float *q)
|
||||
{ return tex1Dfetch(q_tex, i); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__kernel void kernel_pair(__global numtyp4 *x_, __global numtyp4 *coeff1,
|
||||
__global numtyp4* coeff2, const int lj_types,
|
||||
__global numtyp *sp_lj_in, __global int *dev_nbor,
|
||||
__global int *dev_packed, __global acctyp4 *ans,
|
||||
__global acctyp *engv, const int eflag,
|
||||
const int vflag, const int inum,
|
||||
const int nbor_pitch, __global numtyp *q_ ,
|
||||
__global numtyp4 *cutsq, const numtyp qqrd2e,
|
||||
const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp sp_lj[8];
|
||||
sp_lj[0]=sp_lj_in[0];
|
||||
sp_lj[1]=sp_lj_in[1];
|
||||
sp_lj[2]=sp_lj_in[2];
|
||||
sp_lj[3]=sp_lj_in[3];
|
||||
sp_lj[4]=sp_lj_in[4];
|
||||
sp_lj[5]=sp_lj_in[5];
|
||||
sp_lj[6]=sp_lj_in[6];
|
||||
sp_lj[7]=sp_lj_in[7];
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp e_coul=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
numtyp qtmp=fetch_q(i,q_);
|
||||
int itype=ix.w;
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
|
||||
numtyp factor_lj, factor_coul;
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
factor_coul = sp_lj[sbmask(j)+4];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int jtype=jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
int mtype=itype*lj_types+jtype;
|
||||
if (rsq<cutsq[mtype].x) {
|
||||
numtyp r2inv=ucl_recip(rsq);
|
||||
numtyp forcecoul, forcebuck, force, r6inv;
|
||||
numtyp rexp = (numtyp)0.0;
|
||||
|
||||
if (rsq < cutsq[mtype].y) { // buckingham
|
||||
numtyp r=ucl_sqrt(rsq);
|
||||
rexp = ucl_exp(-r*coeff1[mtype].x);
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
forcebuck = (coeff1[mtype].y*r*rexp
|
||||
- coeff1[mtype].z*r6inv)*factor_lj;
|
||||
} else
|
||||
forcebuck = (numtyp)0.0;
|
||||
|
||||
if (rsq < coeff2[mtype].z) // coul
|
||||
forcecoul = qqrd2e*qtmp*fetch_q(j,q_)*ucl_rsqrt(rsq)*factor_coul;
|
||||
else
|
||||
forcecoul = (numtyp)0.0;
|
||||
|
||||
force = (forcebuck + forcecoul) * r2inv;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
e_coul += forcecoul;
|
||||
if (rsq < cutsq[mtype].y) {
|
||||
numtyp e=coeff2[mtype].x*rexp - coeff2[mtype].y*r6inv;
|
||||
energy+=factor_lj*(e-coeff2[mtype].z);
|
||||
}
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers_q(f,energy,e_coul,virial,ii,inum,tid,t_per_atom,offset,eflag,
|
||||
vflag,ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp4 *coeff1_in,
|
||||
__global numtyp4* coeff2_in,
|
||||
__global numtyp* sp_lj_in,
|
||||
__global int *dev_nbor, __global int *dev_packed,
|
||||
__global acctyp4 *ans, __global acctyp *engv,
|
||||
const int eflag, const int vflag, const int inum,
|
||||
const int nbor_pitch, __global numtyp *q_,
|
||||
__global numtyp4 *_cutsq, const numtyp qqrd2e,
|
||||
const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp4 coeff1[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp4 coeff2[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp4 cutsq[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp sp_lj[8];
|
||||
if (tid<8)
|
||||
sp_lj[tid]=sp_lj_in[tid];
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
coeff1[tid]=coeff1_in[tid];
|
||||
cutsq[tid]=_cutsq[tid];
|
||||
if (eflag>0)
|
||||
coeff2[tid]=coeff2_in[tid];
|
||||
}
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp e_coul=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
__syncthreads();
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
numtyp qtmp=fetch_q(i,q_);
|
||||
int iw=ix.w;
|
||||
int itype=fast_mul((int)MAX_SHARED_TYPES,iw);
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
|
||||
numtyp factor_lj, factor_coul;
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
factor_coul = sp_lj[sbmask(j)+4];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int mtype=itype+jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<cutsq[mtype].x) {
|
||||
numtyp r2inv=ucl_recip(rsq);
|
||||
numtyp forcecoul, forcebuck, force, r6inv;
|
||||
numtyp rexp = (numtyp)0.0;
|
||||
|
||||
if (rsq < cutsq[mtype].y) { // buckingham
|
||||
numtyp r=ucl_sqrt(rsq);
|
||||
rexp = ucl_exp(-r*coeff1[mtype].x);
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
forcebuck = (coeff1[mtype].y*r*rexp
|
||||
- coeff1[mtype].z*r6inv)*factor_lj;
|
||||
} else
|
||||
forcebuck = (numtyp)0.0;
|
||||
|
||||
if (rsq < cutsq[mtype].z) // coul
|
||||
forcecoul = qqrd2e*qtmp*fetch_q(j,q_)*ucl_rsqrt(rsq)*factor_coul;
|
||||
else
|
||||
forcecoul = (numtyp)0.0;
|
||||
|
||||
force = (forcebuck + forcecoul) * r2inv;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
e_coul += forcecoul;
|
||||
if (rsq < cutsq[mtype].y) {
|
||||
numtyp e=coeff2[mtype].x*rexp - coeff2[mtype].y*r6inv;
|
||||
energy+=factor_lj*(e-coeff2[mtype].z);
|
||||
}
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers_q(f,energy,e_coul,virial,ii,inum,tid,t_per_atom,offset,eflag,
|
||||
vflag,ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
86
lib/gpu/lal_buck_coul.h
Normal file
86
lib/gpu/lal_buck_coul.h
Normal file
@ -0,0 +1,86 @@
|
||||
/***************************************************************************
|
||||
buck_coul.h
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Class for acceleration of the buck/coul/cut pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LAL_BUCK_COUL_H
|
||||
#define LAL_BUCK_COUL_H
|
||||
|
||||
#include "lal_base_charge.h"
|
||||
|
||||
namespace LAMMPS_AL {
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
class BuckCoul : public BaseCharge<numtyp, acctyp> {
|
||||
public:
|
||||
BuckCoul();
|
||||
~BuckCoul();
|
||||
|
||||
/// Clear any previous data and set up for a new LAMMPS run
|
||||
/** \param max_nbors initial number of rows in the neighbor matrix
|
||||
* \param cell_size cutoff + skin
|
||||
* \param gpu_split fraction of particles handled by device
|
||||
*
|
||||
* Returns:
|
||||
* - 0 if successfull
|
||||
* - -1 if fix gpu not found
|
||||
* - -3 if there is an out of memory error
|
||||
* - -4 if the GPU library was not compiled for GPU
|
||||
* - -5 Double precision is not supported on card **/
|
||||
int init(const int ntypes, double **host_cutsq,
|
||||
double **host_rhoinv, double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **host_offset, double *host_special_lj,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *screen, double **host_cut_ljsq,
|
||||
double **host_cut_coulsq, double *host_special_coul,
|
||||
const double qqrd2e);
|
||||
|
||||
/// Clear all host and device data
|
||||
/** \note This is called at the beginning of the init() routine **/
|
||||
void clear();
|
||||
|
||||
/// Returns memory usage on device per atom
|
||||
int bytes_per_atom(const int max_nbors) const;
|
||||
|
||||
/// Total host memory used by library for pair style
|
||||
double host_memory_usage() const;
|
||||
|
||||
// --------------------------- TYPE DATA --------------------------
|
||||
|
||||
/// coeff1.x = rhoinv, coeff1.y = buck1, coeff1.z = buck2
|
||||
UCL_D_Vec<numtyp4> coeff1;
|
||||
/// coeff2.x = a, coeff2.y = c, coeff2.z = offset
|
||||
UCL_D_Vec<numtyp4> coeff2;
|
||||
/// cutsq.x = cutsq, cutsq.y = cutsq_lj, cutsq.z = cutsq_coul
|
||||
UCL_D_Vec<numtyp4> cutsq;
|
||||
/// Special LJ values
|
||||
UCL_D_Vec<numtyp> sp_lj;
|
||||
|
||||
/// If atom type constants fit in shared memory, use fast kernels
|
||||
bool shared_types;
|
||||
|
||||
/// Number of atom types
|
||||
int _lj_types;
|
||||
|
||||
numtyp _qqrd2e;
|
||||
|
||||
private:
|
||||
bool _allocated;
|
||||
void loop(const bool _eflag, const bool _vflag);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
131
lib/gpu/lal_buck_coul_ext.cpp
Normal file
131
lib/gpu/lal_buck_coul_ext.cpp
Normal file
@ -0,0 +1,131 @@
|
||||
/***************************************************************************
|
||||
buck_coul_ext.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Functions for LAMMPS access to buck/coul/cut acceleration routines.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <math.h>
|
||||
|
||||
#include "lal_buck_coul.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace LAMMPS_AL;
|
||||
|
||||
static BuckCoul<PRECISION,ACC_PRECISION> BUCKCMF;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Allocate memory on host and device and copy constants to device
|
||||
// ---------------------------------------------------------------------------
|
||||
int buckc_gpu_init(const int ntypes, double **cutsq, double **host_rhoinv,
|
||||
double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **offset, double *special_lj, const int inum,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, int &gpu_mode, FILE *screen,
|
||||
double **host_cut_ljsq, double **host_cut_coulsq,
|
||||
double *host_special_coul, const double qqrd2e) {
|
||||
BUCKCMF.clear();
|
||||
gpu_mode=BUCKCMF.device->gpu_mode();
|
||||
double gpu_split=BUCKCMF.device->particle_split();
|
||||
int first_gpu=BUCKCMF.device->first_device();
|
||||
int last_gpu=BUCKCMF.device->last_device();
|
||||
int world_me=BUCKCMF.device->world_me();
|
||||
int gpu_rank=BUCKCMF.device->gpu_rank();
|
||||
int procs_per_gpu=BUCKCMF.device->procs_per_gpu();
|
||||
|
||||
BUCKCMF.device->init_message(screen,"buck",first_gpu,last_gpu);
|
||||
|
||||
bool message=false;
|
||||
if (BUCKCMF.device->replica_me()==0 && screen)
|
||||
message=true;
|
||||
|
||||
if (message) {
|
||||
fprintf(screen,"Initializing GPU and compiling on process 0...");
|
||||
fflush(screen);
|
||||
}
|
||||
|
||||
int init_ok=0;
|
||||
if (world_me==0)
|
||||
init_ok=BUCKCMF.init(ntypes, cutsq, host_rhoinv, host_buck1, host_buck2,
|
||||
host_a, host_c, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen,
|
||||
host_cut_ljsq, host_cut_coulsq,
|
||||
host_special_coul, qqrd2e);
|
||||
|
||||
BUCKCMF.device->world_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
|
||||
for (int i=0; i<procs_per_gpu; i++) {
|
||||
if (message) {
|
||||
if (last_gpu-first_gpu==0)
|
||||
fprintf(screen,"Initializing GPU %d on core %d...",first_gpu,i);
|
||||
else
|
||||
fprintf(screen,"Initializing GPUs %d-%d on core %d...",first_gpu,
|
||||
last_gpu,i);
|
||||
fflush(screen);
|
||||
}
|
||||
if (gpu_rank==i && world_me!=0)
|
||||
init_ok=BUCKCMF.init(ntypes, cutsq, host_rhoinv, host_buck1, host_buck2,
|
||||
host_a, host_c, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen,
|
||||
host_cut_ljsq, host_cut_coulsq,
|
||||
host_special_coul, qqrd2e);
|
||||
|
||||
BUCKCMF.device->gpu_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
}
|
||||
if (message)
|
||||
fprintf(screen,"\n");
|
||||
|
||||
if (init_ok==0)
|
||||
BUCKCMF.estimate_gpu_overhead();
|
||||
return init_ok;
|
||||
}
|
||||
|
||||
void buckc_gpu_clear() {
|
||||
BUCKCMF.clear();
|
||||
}
|
||||
|
||||
int ** buckc_gpu_compute_n(const int ago, const int inum_full,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
double *sublo, double *subhi, int *tag, int **nspecial,
|
||||
int **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **jnum, const double cpu_time,
|
||||
bool &success, double *host_q, double *boxlo,
|
||||
double *prd) {
|
||||
return BUCKCMF.compute(ago, inum_full, nall, host_x, host_type, sublo,
|
||||
subhi, tag, nspecial, special, eflag, vflag, eatom,
|
||||
vatom, host_start, ilist, jnum, cpu_time, success,
|
||||
host_q, boxlo, prd);
|
||||
}
|
||||
|
||||
void buckc_gpu_compute(const int ago, const int inum_full, const int nall,
|
||||
double **host_x, int *host_type, int *ilist, int *numj,
|
||||
int **firstneigh, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
const double cpu_time, bool &success, double *host_q,
|
||||
const int nlocal, double *boxlo, double *prd) {
|
||||
BUCKCMF.compute(ago,inum_full,nall,host_x,host_type,ilist,numj,firstneigh,eflag,
|
||||
vflag,eatom,vatom,host_start,cpu_time,success,host_q,
|
||||
nlocal,boxlo,prd);
|
||||
}
|
||||
|
||||
double buckc_gpu_bytes() {
|
||||
return BUCKCMF.host_memory_usage();
|
||||
}
|
||||
|
||||
|
||||
171
lib/gpu/lal_buck_coul_long.cpp
Normal file
171
lib/gpu/lal_buck_coul_long.cpp
Normal file
@ -0,0 +1,171 @@
|
||||
/***************************************************************************
|
||||
buck_coul_long.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Class for acceleration of the buck/coul/long pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef USE_OPENCL
|
||||
#include "buck_coul_long_cl.h"
|
||||
#else
|
||||
#include "buck_coul_long_ptx.h"
|
||||
#endif
|
||||
|
||||
#include "lal_buck_coul_long.h"
|
||||
#include <cassert>
|
||||
using namespace LAMMPS_AL;
|
||||
#define BuckCoulLongT BuckCoulLong<numtyp, acctyp>
|
||||
|
||||
extern Device<PRECISION,ACC_PRECISION> device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BuckCoulLongT::BuckCoulLong() : BaseCharge<numtyp,acctyp>(),
|
||||
_allocated(false) {
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BuckCoulLongT::~BuckCoulLongT() {
|
||||
clear();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int BuckCoulLongT::bytes_per_atom(const int max_nbors) const {
|
||||
return this->bytes_per_atom_atomic(max_nbors);
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int BuckCoulLongT::init(const int ntypes, double **host_cutsq,
|
||||
double **host_rhoinv, double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c, double **host_offset,
|
||||
double *host_special_lj, const int nlocal,
|
||||
const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *_screen,
|
||||
double **host_cut_ljsq, const double host_cut_coulsq,
|
||||
double *host_special_coul, const double qqrd2e,
|
||||
const double g_ewald) {
|
||||
int success;
|
||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
||||
_screen,buck_coul_long);
|
||||
if (success!=0)
|
||||
return success;
|
||||
|
||||
// If atom type constants fit in shared memory use fast kernel
|
||||
int lj_types=ntypes;
|
||||
shared_types=false;
|
||||
int max_shared_types=this->device->max_shared_types();
|
||||
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
||||
lj_types=max_shared_types;
|
||||
shared_types=true;
|
||||
}
|
||||
_lj_types=lj_types;
|
||||
|
||||
// Allocate a host write buffer for data initialization
|
||||
UCL_H_Vec<numtyp> host_write(lj_types*lj_types*32,*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int i=0; i<lj_types*lj_types; i++)
|
||||
host_write[i]=0.0;
|
||||
|
||||
coeff1.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,coeff1,host_write,host_rhoinv,
|
||||
host_buck1,host_buck2,host_cut_ljsq);
|
||||
|
||||
coeff2.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,coeff2,host_write,host_a,host_c,
|
||||
host_offset);
|
||||
|
||||
cutsq.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack1(ntypes,lj_types,cutsq,host_write,host_cutsq);
|
||||
|
||||
sp_lj.alloc(8,*(this->ucl_device),UCL_READ_ONLY);
|
||||
for (int i=0; i<4; i++) {
|
||||
host_write[i]=host_special_lj[i];
|
||||
host_write[i+4]=host_special_coul[i];
|
||||
}
|
||||
ucl_copy(sp_lj,host_write,8,false);
|
||||
|
||||
_cut_coulsq=host_cut_coulsq;
|
||||
_qqrd2e=qqrd2e;
|
||||
_g_ewald=g_ewald;
|
||||
|
||||
_allocated=true;
|
||||
this->_max_bytes=coeff1.row_bytes()+coeff2.row_bytes()+sp_lj.row_bytes();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void BuckCoulLongT::clear() {
|
||||
if (!_allocated)
|
||||
return;
|
||||
_allocated=false;
|
||||
|
||||
coeff1.clear();
|
||||
coeff2.clear();
|
||||
sp_lj.clear();
|
||||
this->clear_atomic();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
double BuckCoulLongT::host_memory_usage() const {
|
||||
return this->host_memory_usage_atomic()+sizeof(BuckCoulLong<numtyp,acctyp>);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Calculate energies, forces, and torques
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void BuckCoulLongT::loop(const bool _eflag, const bool _vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int eflag, vflag;
|
||||
if (_eflag)
|
||||
eflag=1;
|
||||
else
|
||||
eflag=0;
|
||||
|
||||
if (_vflag)
|
||||
vflag=1;
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
if (shared_types) {
|
||||
this->k_pair_fast.set_size(GX,BX);
|
||||
this->k_pair_fast.run(&this->atom->dev_x.begin(), &coeff1.begin(),
|
||||
&coeff2.begin(), &sp_lj.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(),
|
||||
&this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag,
|
||||
&ainum, &nbor_pitch, &this->atom->dev_q.begin(),
|
||||
&cutsq.begin(), &_cut_coulsq, &_qqrd2e,
|
||||
&_g_ewald, &this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_pair.set_size(GX,BX);
|
||||
this->k_pair.run(&this->atom->dev_x.begin(), &coeff1.begin(),
|
||||
&coeff2.begin(), &_lj_types, &sp_lj.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag, &ainum,
|
||||
&nbor_pitch, &this->atom->dev_q.begin(),
|
||||
&cutsq.begin(), &_cut_coulsq,
|
||||
&_qqrd2e, &_g_ewald, &this->_threads_per_atom);
|
||||
}
|
||||
this->time_pair.stop();
|
||||
}
|
||||
|
||||
template class BuckCoulLong<PRECISION,ACC_PRECISION>;
|
||||
258
lib/gpu/lal_buck_coul_long.cu
Normal file
258
lib/gpu/lal_buck_coul_long.cu
Normal file
@ -0,0 +1,258 @@
|
||||
// **************************************************************************
|
||||
// buck_coul_long.cu
|
||||
// -------------------
|
||||
// Trung Dac Nguyen (ORNL)
|
||||
//
|
||||
// Device code for acceleration of the buck/coul/long pair style
|
||||
//
|
||||
// __________________________________________________________________________
|
||||
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
// __________________________________________________________________________
|
||||
//
|
||||
// begin :
|
||||
// email : nguyentd@ornl.gov
|
||||
// ***************************************************************************/
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
#include "lal_aux_fun1.h"
|
||||
texture<float4> pos_tex;
|
||||
texture<float> q_tex;
|
||||
#ifndef _DOUBLE_DOUBLE
|
||||
ucl_inline float4 fetch_pos(const int& i, const float4 *pos)
|
||||
{ return tex1Dfetch(pos_tex, i); }
|
||||
ucl_inline float fetch_q(const int& i, const float *q)
|
||||
{ return tex1Dfetch(q_tex, i); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__kernel void kernel_pair(__global numtyp4 *x_, __global numtyp4 *coeff1,
|
||||
__global numtyp4* coeff2, const int lj_types,
|
||||
__global numtyp *sp_lj_in, __global int *dev_nbor,
|
||||
__global int *dev_packed, __global acctyp4 *ans,
|
||||
__global acctyp *engv, const int eflag,
|
||||
const int vflag, const int inum,
|
||||
const int nbor_pitch, __global numtyp *q_,
|
||||
__global numtyp *cutsq,
|
||||
const numtyp cut_coulsq, const numtyp qqrd2e,
|
||||
const numtyp g_ewald, const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp sp_lj[8];
|
||||
sp_lj[0]=sp_lj_in[0];
|
||||
sp_lj[1]=sp_lj_in[1];
|
||||
sp_lj[2]=sp_lj_in[2];
|
||||
sp_lj[3]=sp_lj_in[3];
|
||||
sp_lj[4]=sp_lj_in[4];
|
||||
sp_lj[5]=sp_lj_in[5];
|
||||
sp_lj[6]=sp_lj_in[6];
|
||||
sp_lj[7]=sp_lj_in[7];
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp e_coul=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
numtyp qtmp=fetch_q(i,q_);
|
||||
int itype=ix.w;
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
|
||||
numtyp factor_lj, factor_coul;
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
factor_coul = (numtyp)1.0-sp_lj[sbmask(j)+4];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int jtype=jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
int mtype=itype*lj_types+jtype;
|
||||
if (rsq<cutsq[mtype]) {
|
||||
numtyp r2inv=ucl_recip(rsq);
|
||||
numtyp forcecoul, force_lj, force, r6inv, prefactor, _erfc;
|
||||
numtyp rexp = (numtyp)0.0;
|
||||
|
||||
if (rsq < coeff1[mtype].w) { // cut_ljsq
|
||||
numtyp r=ucl_sqrt(rsq);
|
||||
rexp = ucl_exp(-r*coeff1[mtype].x);
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
force_lj = (coeff1[mtype].y*r*rexp
|
||||
- coeff1[mtype].z*r6inv)*factor_lj;
|
||||
} else
|
||||
force_lj = (numtyp)0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
numtyp r = ucl_rsqrt(r2inv);
|
||||
numtyp grij = g_ewald * r;
|
||||
numtyp expm2 = ucl_exp(-grij*grij);
|
||||
numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij);
|
||||
_erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
||||
prefactor = qqrd2e * qtmp*fetch_q(j,q_)/r;
|
||||
forcecoul = prefactor * (_erfc + EWALD_F*grij*expm2-factor_coul);
|
||||
} else
|
||||
forcecoul = (numtyp)0.0;
|
||||
|
||||
force = (force_lj + forcecoul) * r2inv;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
if (rsq < cut_coulsq)
|
||||
e_coul += prefactor*(_erfc-factor_coul);
|
||||
if (rsq < coeff1[mtype].w) {
|
||||
numtyp e=coeff2[mtype].x*rexp - coeff2[mtype].y*r6inv;
|
||||
energy+=factor_lj*(e-coeff2[mtype].z);
|
||||
}
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers_q(f,energy,e_coul,virial,ii,inum,tid,t_per_atom,offset,eflag,
|
||||
vflag,ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp4 *coeff1_in,
|
||||
__global numtyp4* coeff2_in,
|
||||
__global numtyp* sp_lj_in,
|
||||
__global int *dev_nbor, __global int *dev_packed,
|
||||
__global acctyp4 *ans, __global acctyp *engv,
|
||||
const int eflag, const int vflag, const int inum,
|
||||
const int nbor_pitch, __global numtyp *q_,
|
||||
__global numtyp *cutsq,
|
||||
const numtyp cut_coulsq, const numtyp qqrd2e,
|
||||
const numtyp g_ewald, const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp4 coeff1[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp4 coeff2[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp sp_lj[8];
|
||||
if (tid<8)
|
||||
sp_lj[tid]=sp_lj_in[tid];
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
coeff1[tid]=coeff1_in[tid];
|
||||
if (eflag>0)
|
||||
coeff2[tid]=coeff2_in[tid];
|
||||
}
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp e_coul=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
__syncthreads();
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
numtyp qtmp=fetch_q(i,q_);
|
||||
int iw=ix.w;
|
||||
int itype=fast_mul((int)MAX_SHARED_TYPES,iw);
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
|
||||
numtyp factor_lj, factor_coul;
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
factor_coul = (numtyp)1.0-sp_lj[sbmask(j)+4];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int mtype=itype+jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<cutsq[mtype]) {
|
||||
numtyp r2inv=ucl_recip(rsq);
|
||||
numtyp forcecoul, force_lj, force, r6inv, prefactor, _erfc;
|
||||
numtyp rexp = (numtyp)0.0;
|
||||
|
||||
if (rsq < coeff1[mtype].w) {
|
||||
numtyp r=ucl_sqrt(rsq);
|
||||
rexp = ucl_exp(-r*coeff1[mtype].x);
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
force_lj = (coeff1[mtype].y*r*rexp
|
||||
- coeff1[mtype].z*r6inv)*factor_lj;
|
||||
} else
|
||||
force_lj = (numtyp)0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
numtyp r = ucl_rsqrt(r2inv);
|
||||
numtyp grij = g_ewald * r;
|
||||
numtyp expm2 = ucl_exp(-grij*grij);
|
||||
numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij);
|
||||
_erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
|
||||
prefactor = qqrd2e * qtmp*fetch_q(j,q_)/r;
|
||||
forcecoul = prefactor * (_erfc + EWALD_F*grij*expm2-factor_coul);
|
||||
} else
|
||||
forcecoul = (numtyp)0.0;
|
||||
|
||||
force = (force_lj + forcecoul) * r2inv;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
if (rsq < cut_coulsq)
|
||||
e_coul += prefactor*(_erfc-factor_coul);
|
||||
if (rsq < coeff1[mtype].w) {
|
||||
numtyp e=coeff2[mtype].x*rexp - coeff2[mtype].y*r6inv;
|
||||
energy+=factor_lj*(e-coeff2[mtype].z);
|
||||
}
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers_q(f,energy,e_coul,virial,ii,inum,tid,t_per_atom,offset,eflag,
|
||||
vflag,ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
86
lib/gpu/lal_buck_coul_long.h
Normal file
86
lib/gpu/lal_buck_coul_long.h
Normal file
@ -0,0 +1,86 @@
|
||||
/***************************************************************************
|
||||
buck_coul_long.h
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Class for acceleration of the buck/coul/long pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LAL_BUCK_COUL_LONG_H
|
||||
#define LAL_BUCK_COUL_LONG_H
|
||||
|
||||
#include "lal_base_charge.h"
|
||||
|
||||
namespace LAMMPS_AL {
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
class BuckCoulLong : public BaseCharge<numtyp, acctyp> {
|
||||
public:
|
||||
BuckCoulLong();
|
||||
~BuckCoulLong();
|
||||
|
||||
/// Clear any previous data and set up for a new LAMMPS run
|
||||
/** \param max_nbors initial number of rows in the neighbor matrix
|
||||
* \param cell_size cutoff + skin
|
||||
* \param gpu_split fraction of particles handled by device
|
||||
*
|
||||
* Returns:
|
||||
* - 0 if successfull
|
||||
* - -1 if fix gpu not found
|
||||
* - -3 if there is an out of memory error
|
||||
* - -4 if the GPU library was not compiled for GPU
|
||||
* - -5 Double precision is not supported on card **/
|
||||
int init(const int ntypes, double **host_cutsq,
|
||||
double **host_rhoinv, double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **host_offset, double *host_special_lj,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *screen, double **host_cut_ljsq,
|
||||
const double host_cut_coulsq, double *host_special_coul,
|
||||
const double qqrd2e, const double g_ewald);
|
||||
|
||||
/// Clear all host and device data
|
||||
/** \note This is called at the beginning of the init() routine **/
|
||||
void clear();
|
||||
|
||||
/// Returns memory usage on device per atom
|
||||
int bytes_per_atom(const int max_nbors) const;
|
||||
|
||||
/// Total host memory used by library for pair style
|
||||
double host_memory_usage() const;
|
||||
|
||||
// --------------------------- TYPE DATA --------------------------
|
||||
|
||||
/// coeff1.x = rhoinv, coeff1.y = buck1, coeff1.z = buck2, coeff1.w = cutsq_lj
|
||||
UCL_D_Vec<numtyp4> coeff1;
|
||||
/// coeff2.x = a, coeff2.y = c, coeff2.z = offset
|
||||
UCL_D_Vec<numtyp4> coeff2;
|
||||
/// cutsq
|
||||
UCL_D_Vec<numtyp> cutsq;
|
||||
/// Special LJ values [0-3] and Special Coul values [4-7]
|
||||
UCL_D_Vec<numtyp> sp_lj;
|
||||
|
||||
/// If atom type constants fit in shared memory, use fast kernels
|
||||
bool shared_types;
|
||||
|
||||
/// Number of atom types
|
||||
int _lj_types;
|
||||
|
||||
numtyp _cut_coulsq, _qqrd2e, _g_ewald;
|
||||
|
||||
private:
|
||||
bool _allocated;
|
||||
void loop(const bool _eflag, const bool _vflag);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
130
lib/gpu/lal_buck_coul_long_ext.cpp
Normal file
130
lib/gpu/lal_buck_coul_long_ext.cpp
Normal file
@ -0,0 +1,130 @@
|
||||
/***************************************************************************
|
||||
buck_coul_long_ext.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Functions for LAMMPS access to buck/coul/long acceleration routines.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <math.h>
|
||||
|
||||
#include "lal_buck_coul_long.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace LAMMPS_AL;
|
||||
|
||||
static BuckCoulLong<PRECISION,ACC_PRECISION> BUCKCLMF;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Allocate memory on host and device and copy constants to device
|
||||
// ---------------------------------------------------------------------------
|
||||
int buckcl_gpu_init(const int ntypes, double **cutsq, double **host_rhoinv,
|
||||
double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **offset, double *special_lj, const int inum,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, int &gpu_mode, FILE *screen,
|
||||
double **host_cut_ljsq, double host_cut_coulsq,
|
||||
double *host_special_coul, const double qqrd2e,
|
||||
const double g_ewald) {
|
||||
BUCKCLMF.clear();
|
||||
gpu_mode=BUCKCLMF.device->gpu_mode();
|
||||
double gpu_split=BUCKCLMF.device->particle_split();
|
||||
int first_gpu=BUCKCLMF.device->first_device();
|
||||
int last_gpu=BUCKCLMF.device->last_device();
|
||||
int world_me=BUCKCLMF.device->world_me();
|
||||
int gpu_rank=BUCKCLMF.device->gpu_rank();
|
||||
int procs_per_gpu=BUCKCLMF.device->procs_per_gpu();
|
||||
|
||||
BUCKCLMF.device->init_message(screen,"buck/coul/long",first_gpu,last_gpu);
|
||||
|
||||
bool message=false;
|
||||
if (BUCKCLMF.device->replica_me()==0 && screen)
|
||||
message=true;
|
||||
|
||||
if (message) {
|
||||
fprintf(screen,"Initializing GPU and compiling on process 0...");
|
||||
fflush(screen);
|
||||
}
|
||||
|
||||
int init_ok=0;
|
||||
if (world_me==0)
|
||||
init_ok=BUCKCLMF.init(ntypes, cutsq, host_rhoinv, host_buck1, host_buck2,
|
||||
host_a, host_c, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen, host_cut_ljsq,
|
||||
host_cut_coulsq, host_special_coul, qqrd2e, g_ewald);
|
||||
|
||||
BUCKCLMF.device->world_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
|
||||
for (int i=0; i<procs_per_gpu; i++) {
|
||||
if (message) {
|
||||
if (last_gpu-first_gpu==0)
|
||||
fprintf(screen,"Initializing GPU %d on core %d...",first_gpu,i);
|
||||
else
|
||||
fprintf(screen,"Initializing GPUs %d-%d on core %d...",first_gpu,
|
||||
last_gpu,i);
|
||||
fflush(screen);
|
||||
}
|
||||
if (gpu_rank==i && world_me!=0)
|
||||
init_ok=BUCKCLMF.init(ntypes, cutsq, host_rhoinv, host_buck1, host_buck2,
|
||||
host_a, host_c, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen, host_cut_ljsq,
|
||||
host_cut_coulsq, host_special_coul, qqrd2e, g_ewald);
|
||||
|
||||
BUCKCLMF.device->gpu_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
}
|
||||
if (message)
|
||||
fprintf(screen,"\n");
|
||||
|
||||
if (init_ok==0)
|
||||
BUCKCLMF.estimate_gpu_overhead();
|
||||
return init_ok;
|
||||
}
|
||||
|
||||
void buckcl_gpu_clear() {
|
||||
BUCKCLMF.clear();
|
||||
}
|
||||
|
||||
int** buckcl_gpu_compute_n(const int ago, const int inum_full,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
double *sublo, double *subhi, int *tag, int **nspecial,
|
||||
int **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **jnum, const double cpu_time,
|
||||
bool &success, double *host_q, double *boxlo,
|
||||
double *prd) {
|
||||
return BUCKCLMF.compute(ago, inum_full, nall, host_x, host_type, sublo,
|
||||
subhi, tag, nspecial, special, eflag, vflag, eatom,
|
||||
vatom, host_start, ilist, jnum, cpu_time, success,
|
||||
host_q, boxlo, prd);
|
||||
}
|
||||
|
||||
void buckcl_gpu_compute(const int ago, const int inum_full, const int nall,
|
||||
double **host_x, int *host_type, int *ilist, int *numj,
|
||||
int **firstneigh, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
const double cpu_time, bool &success, double *host_q,
|
||||
const int nlocal, double *boxlo, double *prd) {
|
||||
BUCKCLMF.compute(ago,inum_full,nall,host_x,host_type,ilist,numj,
|
||||
firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success,
|
||||
host_q,nlocal,boxlo,prd);
|
||||
}
|
||||
|
||||
double buckcl_gpu_bytes() {
|
||||
return BUCKCLMF.host_memory_usage();
|
||||
}
|
||||
|
||||
|
||||
121
lib/gpu/lal_buck_ext.cpp
Normal file
121
lib/gpu/lal_buck_ext.cpp
Normal file
@ -0,0 +1,121 @@
|
||||
/***************************************************************************
|
||||
buck_ext.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen (ORNL)
|
||||
|
||||
Functions for LAMMPS access to buck acceleration routines.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <math.h>
|
||||
|
||||
#include "lal_buck.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace LAMMPS_AL;
|
||||
|
||||
static Buck<PRECISION,ACC_PRECISION> BUCKMF;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Allocate memory on host and device and copy constants to device
|
||||
// ---------------------------------------------------------------------------
|
||||
int buck_gpu_init(const int ntypes, double **cutsq, double **host_rhoinv,
|
||||
double **host_buck1, double **host_buck2,
|
||||
double **host_a, double **host_c,
|
||||
double **offset, double *special_lj, const int inum,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, int &gpu_mode, FILE *screen) {
|
||||
BUCKMF.clear();
|
||||
gpu_mode=BUCKMF.device->gpu_mode();
|
||||
double gpu_split=BUCKMF.device->particle_split();
|
||||
int first_gpu=BUCKMF.device->first_device();
|
||||
int last_gpu=BUCKMF.device->last_device();
|
||||
int world_me=BUCKMF.device->world_me();
|
||||
int gpu_rank=BUCKMF.device->gpu_rank();
|
||||
int procs_per_gpu=BUCKMF.device->procs_per_gpu();
|
||||
|
||||
BUCKMF.device->init_message(screen,"buck",first_gpu,last_gpu);
|
||||
|
||||
bool message=false;
|
||||
if (BUCKMF.device->replica_me()==0 && screen)
|
||||
message=true;
|
||||
|
||||
if (message) {
|
||||
fprintf(screen,"Initializing GPU and compiling on process 0...");
|
||||
fflush(screen);
|
||||
}
|
||||
|
||||
int init_ok=0;
|
||||
if (world_me==0)
|
||||
init_ok=BUCKMF.init(ntypes, cutsq, host_rhoinv, host_buck1, host_buck2,
|
||||
host_a, host_c, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen);
|
||||
|
||||
BUCKMF.device->world_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
|
||||
for (int i=0; i<procs_per_gpu; i++) {
|
||||
if (message) {
|
||||
if (last_gpu-first_gpu==0)
|
||||
fprintf(screen,"Initializing GPU %d on core %d...",first_gpu,i);
|
||||
else
|
||||
fprintf(screen,"Initializing GPUs %d-%d on core %d...",first_gpu,
|
||||
last_gpu,i);
|
||||
fflush(screen);
|
||||
}
|
||||
if (gpu_rank==i && world_me!=0)
|
||||
init_ok=BUCKMF.init(ntypes, cutsq, host_rhoinv, host_buck1, host_buck2,
|
||||
host_a, host_c, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen);
|
||||
|
||||
BUCKMF.device->gpu_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
}
|
||||
if (message)
|
||||
fprintf(screen,"\n");
|
||||
|
||||
if (init_ok==0)
|
||||
BUCKMF.estimate_gpu_overhead();
|
||||
return init_ok;
|
||||
}
|
||||
|
||||
void buck_gpu_clear() {
|
||||
BUCKMF.clear();
|
||||
}
|
||||
|
||||
int ** buck_gpu_compute_n(const int ago, const int inum_full,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
double *sublo, double *subhi, int *tag, int **nspecial,
|
||||
int **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **jnum, const double cpu_time,
|
||||
bool &success) {
|
||||
return BUCKMF.compute(ago, inum_full, nall, host_x, host_type, sublo,
|
||||
subhi, tag, nspecial, special, eflag, vflag, eatom,
|
||||
vatom, host_start, ilist, jnum, cpu_time, success);
|
||||
}
|
||||
|
||||
void buck_gpu_compute(const int ago, const int inum_full, const int nall,
|
||||
double **host_x, int *host_type, int *ilist, int *numj,
|
||||
int **firstneigh, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
const double cpu_time, bool &success) {
|
||||
BUCKMF.compute(ago,inum_full,nall,host_x,host_type,ilist,numj,
|
||||
firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success);
|
||||
}
|
||||
|
||||
double buck_gpu_bytes() {
|
||||
return BUCKMF.host_memory_usage();
|
||||
}
|
||||
|
||||
|
||||
BIN
lib/gpu/lal_cg_cmm.o
Normal file
BIN
lib/gpu/lal_cg_cmm.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_cg_cmm_ext.o
Normal file
BIN
lib/gpu/lal_cg_cmm_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_cg_cmm_long.o
Normal file
BIN
lib/gpu/lal_cg_cmm_long.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_cg_cmm_long_ext.o
Normal file
BIN
lib/gpu/lal_cg_cmm_long_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_charmm_long.o
Normal file
BIN
lib/gpu/lal_charmm_long.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_charmm_long_ext.o
Normal file
BIN
lib/gpu/lal_charmm_long_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_coul_long.o
Normal file
BIN
lib/gpu/lal_coul_long.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_coul_long_ext.o
Normal file
BIN
lib/gpu/lal_coul_long_ext.o
Normal file
Binary file not shown.
@ -56,7 +56,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica,
|
||||
if (_device_init)
|
||||
return 0;
|
||||
_device_init=true;
|
||||
_comm_world=world;
|
||||
_comm_world=replica; //world;
|
||||
_comm_replica=replica;
|
||||
_first_device=first_gpu;
|
||||
_last_device=last_gpu;
|
||||
@ -164,7 +164,7 @@ int DeviceT::init(Answer<numtyp,acctyp> &ans, const bool charge,
|
||||
gpu_nbor=1;
|
||||
else if (_gpu_mode==Device<numtyp,acctyp>::GPU_HYB_NEIGH)
|
||||
gpu_nbor=2;
|
||||
#ifdef USE_OPENCL
|
||||
#ifndef USE_CUDPP
|
||||
if (gpu_nbor==1)
|
||||
gpu_nbor=2;
|
||||
#endif
|
||||
|
||||
BIN
lib/gpu/lal_device.o
Normal file
BIN
lib/gpu/lal_device.o
Normal file
Binary file not shown.
564
lib/gpu/lal_eam.cpp
Normal file
564
lib/gpu/lal_eam.cpp
Normal file
@ -0,0 +1,564 @@
|
||||
/***************************************************************************
|
||||
eam.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen, W. Michael Brown (ORNL)
|
||||
|
||||
Class for acceleration of the eam pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : brownw@ornl.gov nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef USE_OPENCL
|
||||
#include "eam_cl.h"
|
||||
#else
|
||||
#include "eam_ptx.h"
|
||||
#endif
|
||||
|
||||
#include "lal_eam.h"
|
||||
#include <cassert>
|
||||
using namespace LAMMPS_AL;
|
||||
#define EAMT EAM<numtyp, acctyp>
|
||||
|
||||
|
||||
#define MIN(A,B) ((A) < (B) ? (A) : (B))
|
||||
#define MAX(A,B) ((A) > (B) ? (A) : (B))
|
||||
|
||||
extern Device<PRECISION,ACC_PRECISION> device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
EAMT::EAM() : BaseAtomic<numtyp,acctyp>(),
|
||||
_compiled_energy(false), _allocated(false) {
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
EAMT::~EAM() {
|
||||
clear();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int EAMT::init(const int ntypes, double host_cutforcesq, int **host_type2rhor,
|
||||
int **host_type2z2r, int *host_type2frho,
|
||||
double ***host_rhor_spline, double ***host_z2r_spline,
|
||||
double ***host_frho_spline, double rdr, double rdrho, int nrhor,
|
||||
int nrho, int nz2r, int nfrho, int nr, const int nlocal,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, const double gpu_split, FILE *_screen)
|
||||
{
|
||||
int success;
|
||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,
|
||||
gpu_split,_screen,eam);
|
||||
|
||||
if (success!=0)
|
||||
return success;
|
||||
|
||||
// allocate fp
|
||||
|
||||
bool cpuview=false;
|
||||
if (this->ucl_device->device_type()==UCL_CPU)
|
||||
cpuview=true;
|
||||
|
||||
int ef_nall=nall;
|
||||
if (ef_nall==0)
|
||||
ef_nall=2000;
|
||||
|
||||
_max_fp_size=static_cast<int>(static_cast<double>(ef_nall)*1.10);
|
||||
host_fp.alloc(_max_fp_size,*(this->ucl_device));
|
||||
if (cpuview)
|
||||
dev_fp.view(host_fp);
|
||||
else
|
||||
dev_fp.alloc(_max_fp_size,*(this->ucl_device),UCL_WRITE_ONLY);
|
||||
|
||||
k_energy.set_function(*(this->pair_program),"kernel_energy");
|
||||
k_energy_fast.set_function(*(this->pair_program),"kernel_energy_fast");
|
||||
fp_tex.get_texture(*(this->pair_program),"fp_tex");
|
||||
fp_tex.bind_float(dev_fp,1);
|
||||
_compiled_energy = true;
|
||||
|
||||
// Initialize timers for selected GPU
|
||||
time_pair2.init(*(this->ucl_device));
|
||||
time_pair2.zero();
|
||||
|
||||
time_fp1.init(*(this->ucl_device));
|
||||
time_fp1.zero();
|
||||
|
||||
time_fp2.init(*(this->ucl_device));
|
||||
time_fp2.zero();
|
||||
|
||||
// If atom type constants fit in shared memory use fast kernel
|
||||
int lj_types=ntypes;
|
||||
shared_types=false;
|
||||
|
||||
int max_shared_types=this->device->max_shared_types();
|
||||
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
||||
lj_types=max_shared_types;
|
||||
shared_types=true;
|
||||
}
|
||||
|
||||
_ntypes=lj_types;
|
||||
_cutforcesq=host_cutforcesq;
|
||||
_rdr=rdr;
|
||||
_rdrho = rdrho;
|
||||
_nrhor=nrhor;
|
||||
_nrho=nrho;
|
||||
_nz2r=nz2r;
|
||||
_nfrho=nfrho;
|
||||
_nr=nr;
|
||||
|
||||
UCL_H_Vec<int2> dview_type(lj_types*lj_types,*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int i=0; i<lj_types*lj_types; i++) {
|
||||
dview_type[i].x=0; dview_type[i].y=0;
|
||||
}
|
||||
|
||||
// pack type2rhor and type2z2r
|
||||
type2rhor_z2r.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
|
||||
for (int i=0; i<ntypes; i++) {
|
||||
for (int j=0; j<ntypes; j++) {
|
||||
dview_type[i*lj_types+j].x=host_type2rhor[i][j];
|
||||
dview_type[i*lj_types+j].y=host_type2z2r[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
ucl_copy(type2rhor_z2r,dview_type,false);
|
||||
|
||||
// pack type2frho
|
||||
UCL_H_Vec<int> dview_type2frho(lj_types,*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
type2frho.alloc(lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
for (int i=0; i<ntypes; i++)
|
||||
dview_type2frho[i]=host_type2frho[i];
|
||||
ucl_copy(type2frho,dview_type2frho,false);
|
||||
|
||||
// pack frho_spline
|
||||
UCL_H_Vec<numtyp4> dview_frho_spline(nfrho*(nrho+1),*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int ix=0; ix<nfrho; ix++)
|
||||
for (int iy=0; iy<nrho+1; iy++) {
|
||||
dview_frho_spline[ix*(nrho+1)+iy].x=host_frho_spline[ix][iy][0];
|
||||
dview_frho_spline[ix*(nrho+1)+iy].y=host_frho_spline[ix][iy][1];
|
||||
dview_frho_spline[ix*(nrho+1)+iy].z=host_frho_spline[ix][iy][2];
|
||||
dview_frho_spline[ix*(nrho+1)+iy].w=0;
|
||||
}
|
||||
|
||||
frho_spline1.alloc(nfrho*(nrho+1),*(this->ucl_device),UCL_READ_ONLY);
|
||||
ucl_copy(frho_spline1,dview_frho_spline,false);
|
||||
frho_spline1_tex.get_texture(*(this->pair_program),"frho_sp1_tex");
|
||||
frho_spline1_tex.bind_float(frho_spline1,4);
|
||||
|
||||
for (int ix=0; ix<nfrho; ix++)
|
||||
for (int iy=0; iy<nrho+1; iy++) {
|
||||
dview_frho_spline[ix*(nrho+1)+iy].x=host_frho_spline[ix][iy][3];
|
||||
dview_frho_spline[ix*(nrho+1)+iy].y=host_frho_spline[ix][iy][4];
|
||||
dview_frho_spline[ix*(nrho+1)+iy].z=host_frho_spline[ix][iy][5];
|
||||
dview_frho_spline[ix*(nrho+1)+iy].w=host_frho_spline[ix][iy][6];
|
||||
}
|
||||
|
||||
frho_spline2.alloc(nfrho*(nrho+1),*(this->ucl_device),UCL_READ_ONLY);
|
||||
ucl_copy(frho_spline2,dview_frho_spline,false);
|
||||
frho_spline2_tex.get_texture(*(this->pair_program),"frho_sp2_tex");
|
||||
frho_spline2_tex.bind_float(frho_spline2,4);
|
||||
|
||||
// pack rhor_spline
|
||||
UCL_H_Vec<numtyp4> dview_rhor_spline(nrhor*(nr+1),*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int ix=0; ix<nrhor; ix++)
|
||||
for (int iy=0; iy<nr+1; iy++) {
|
||||
dview_rhor_spline[ix*(nr+1)+iy].x=host_rhor_spline[ix][iy][0];
|
||||
dview_rhor_spline[ix*(nr+1)+iy].y=host_rhor_spline[ix][iy][1];
|
||||
dview_rhor_spline[ix*(nr+1)+iy].z=host_rhor_spline[ix][iy][2];
|
||||
dview_rhor_spline[ix*(nr+1)+iy].w=(numtyp)0;
|
||||
}
|
||||
|
||||
rhor_spline1.alloc(nrhor*(nr+1),*(this->ucl_device),UCL_READ_ONLY);
|
||||
ucl_copy(rhor_spline1,dview_rhor_spline,false);
|
||||
rhor_spline1_tex.get_texture(*(this->pair_program),"rhor_sp1_tex");
|
||||
rhor_spline1_tex.bind_float(rhor_spline1,4);
|
||||
|
||||
for (int ix=0; ix<nrhor; ix++)
|
||||
for (int iy=0; iy<nr+1; iy++) {
|
||||
dview_rhor_spline[ix*(nr+1)+iy].x=host_rhor_spline[ix][iy][3];
|
||||
dview_rhor_spline[ix*(nr+1)+iy].y=host_rhor_spline[ix][iy][4];
|
||||
dview_rhor_spline[ix*(nr+1)+iy].z=host_rhor_spline[ix][iy][5];
|
||||
dview_rhor_spline[ix*(nr+1)+iy].w=host_rhor_spline[ix][iy][6];
|
||||
}
|
||||
|
||||
rhor_spline2.alloc(nrhor*(nr+1),*(this->ucl_device),UCL_READ_ONLY);
|
||||
ucl_copy(rhor_spline2,dview_rhor_spline,false);
|
||||
rhor_spline2_tex.get_texture(*(this->pair_program),"rhor_sp2_tex");
|
||||
rhor_spline2_tex.bind_float(rhor_spline2,4);
|
||||
|
||||
// pack z2r_spline
|
||||
UCL_H_Vec<numtyp4> dview_z2r_spline(nz2r*(nr+1),*(this->ucl_device),
|
||||
UCL_WRITE_OPTIMIZED);
|
||||
|
||||
for (int ix=0; ix<nz2r; ix++)
|
||||
for (int iy=0; iy<nr+1; iy++) {
|
||||
dview_z2r_spline[ix*(nr+1)+iy].x=host_z2r_spline[ix][iy][0];
|
||||
dview_z2r_spline[ix*(nr+1)+iy].y=host_z2r_spline[ix][iy][1];
|
||||
dview_z2r_spline[ix*(nr+1)+iy].z=host_z2r_spline[ix][iy][2];
|
||||
dview_z2r_spline[ix*(nr+1)+iy].w=(numtyp)0;
|
||||
}
|
||||
|
||||
z2r_spline1.alloc(nz2r*(nr+1),*(this->ucl_device),UCL_READ_ONLY);
|
||||
ucl_copy(z2r_spline1,dview_z2r_spline,false);
|
||||
z2r_spline1_tex.get_texture(*(this->pair_program),"z2r_sp1_tex");
|
||||
z2r_spline1_tex.bind_float(z2r_spline1,4);
|
||||
|
||||
for (int ix=0; ix<nz2r; ix++)
|
||||
for (int iy=0; iy<nr+1; iy++) {
|
||||
dview_z2r_spline[ix*(nr+1)+iy].x=host_z2r_spline[ix][iy][3];
|
||||
dview_z2r_spline[ix*(nr+1)+iy].y=host_z2r_spline[ix][iy][4];
|
||||
dview_z2r_spline[ix*(nr+1)+iy].z=host_z2r_spline[ix][iy][5];
|
||||
dview_z2r_spline[ix*(nr+1)+iy].w=host_z2r_spline[ix][iy][6];
|
||||
}
|
||||
|
||||
z2r_spline2.alloc(nz2r*(nr+1),*(this->ucl_device),UCL_READ_ONLY);
|
||||
ucl_copy(z2r_spline2,dview_z2r_spline,false);
|
||||
z2r_spline2_tex.get_texture(*(this->pair_program),"z2r_sp2_tex");
|
||||
z2r_spline2_tex.bind_float(z2r_spline2,4);
|
||||
|
||||
_allocated=true;
|
||||
this->_max_bytes=type2rhor_z2r.row_bytes()
|
||||
+ type2frho.row_bytes()
|
||||
+ rhor_spline1.row_bytes()
|
||||
+ rhor_spline2.row_bytes()
|
||||
+ frho_spline1.row_bytes()
|
||||
+ frho_spline2.row_bytes()
|
||||
+ z2r_spline1.row_bytes()
|
||||
+ z2r_spline2.row_bytes()
|
||||
+ dev_fp.row_bytes();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void EAMT::clear() {
|
||||
if (!_allocated)
|
||||
return;
|
||||
_allocated=false;
|
||||
|
||||
type2rhor_z2r.clear();
|
||||
type2frho.clear();
|
||||
rhor_spline1.clear();
|
||||
rhor_spline2.clear();
|
||||
frho_spline1.clear();
|
||||
frho_spline2.clear();
|
||||
z2r_spline1.clear();
|
||||
z2r_spline2.clear();
|
||||
|
||||
host_fp.clear();
|
||||
dev_fp.clear();
|
||||
|
||||
time_pair2.clear();
|
||||
time_fp1.clear();
|
||||
time_fp2.clear();
|
||||
|
||||
if (_compiled_energy) {
|
||||
k_energy_fast.clear();
|
||||
k_energy.clear();
|
||||
_compiled_energy=false;
|
||||
}
|
||||
|
||||
this->clear_atomic();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
double EAMT::host_memory_usage() const {
|
||||
return this->host_memory_usage_atomic()+sizeof(EAM<numtyp,acctyp>);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Copy nbor list from host if necessary and then compute atom energies/forces
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void EAMT::compute(const int f_ago, const int inum_full, const int nlocal,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
int *ilist, int *numj, int **firstneigh,
|
||||
const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom,
|
||||
int &host_start, const double cpu_time,
|
||||
bool &success, void **fp_ptr) {
|
||||
this->acc_timers();
|
||||
|
||||
if (this->device->time_device()) {
|
||||
// Put time from the second part to the total time_pair
|
||||
this->time_pair.add_time_to_total(time_pair2.time());
|
||||
|
||||
// Add transfer time from device -> host after part 1
|
||||
this->atom->add_transfer_time(time_fp1.time());
|
||||
|
||||
// Add transfer time from host -> device before part 2
|
||||
this->atom->add_transfer_time(time_fp2.time());
|
||||
}
|
||||
|
||||
// ------------------- Resize FP Array for EAM --------------------
|
||||
|
||||
if (nall>_max_fp_size) {
|
||||
dev_fp.clear();
|
||||
host_fp.clear();
|
||||
|
||||
_max_fp_size=static_cast<int>(static_cast<double>(nall)*1.10);
|
||||
host_fp.alloc(_max_fp_size,*(this->ucl_device));
|
||||
if (this->ucl_device->device_type()==UCL_CPU)
|
||||
dev_fp.view(host_fp);
|
||||
else
|
||||
dev_fp.alloc(_max_fp_size,*(this->ucl_device));
|
||||
|
||||
fp_tex.bind_float(dev_fp,1);
|
||||
}
|
||||
*fp_ptr=host_fp.begin();
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
if (inum_full==0) {
|
||||
host_start=0;
|
||||
// Make sure textures are correct if realloc by a different hybrid style
|
||||
this->resize_atom(0,nall,success);
|
||||
this->zero_timers();
|
||||
return;
|
||||
}
|
||||
|
||||
int ago=this->hd_balancer.ago_first(f_ago);
|
||||
int inum=this->hd_balancer.balance(ago,inum_full,cpu_time);
|
||||
this->ans->inum(inum);
|
||||
host_start=inum;
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
if (ago==0) {
|
||||
this->reset_nbors(nall, inum, ilist, numj, firstneigh, success);
|
||||
if (!success)
|
||||
return;
|
||||
}
|
||||
|
||||
this->atom->cast_x_data(host_x,host_type);
|
||||
this->atom->add_x_data(host_x,host_type);
|
||||
|
||||
loop(eflag,vflag);
|
||||
|
||||
// copy fp from device to host for comm
|
||||
_nlocal=nlocal;
|
||||
time_fp1.start();
|
||||
ucl_copy(host_fp,dev_fp,nlocal,false);
|
||||
time_fp1.stop();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Reneighbor on GPU and then compute per-atom densities
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
int** EAMT::compute(const int ago, const int inum_full, const int nall,
|
||||
double **host_x, int *host_type, double *sublo,
|
||||
double *subhi, int *tag, int **nspecial, int **special,
|
||||
const bool eflag, const bool vflag, const bool eatom,
|
||||
const bool vatom, int &host_start, int **ilist, int **jnum,
|
||||
const double cpu_time, bool &success, int &inum,
|
||||
void **fp_ptr) {
|
||||
this->acc_timers();
|
||||
|
||||
if (this->device->time_device()) {
|
||||
// Put time from the second part to the total time_pair
|
||||
this->time_pair.add_time_to_total(time_pair2.time());
|
||||
|
||||
// Add transfer time from device -> host after part 1
|
||||
this->atom->add_transfer_time(time_fp1.time());
|
||||
|
||||
// Add transfer time from host -> device before part 2
|
||||
this->atom->add_transfer_time(time_fp2.time());
|
||||
}
|
||||
|
||||
// ------------------- Resize FP Array for EAM --------------------
|
||||
|
||||
if (nall>_max_fp_size) {
|
||||
dev_fp.clear();
|
||||
host_fp.clear();
|
||||
|
||||
_max_fp_size=static_cast<int>(static_cast<double>(nall)*1.10);
|
||||
host_fp.alloc(_max_fp_size,*(this->ucl_device));
|
||||
if (this->ucl_device->device_type()==UCL_CPU)
|
||||
dev_fp.view(host_fp);
|
||||
else
|
||||
dev_fp.alloc(_max_fp_size,*(this->ucl_device));
|
||||
|
||||
fp_tex.bind_float(dev_fp,1);
|
||||
}
|
||||
*fp_ptr=host_fp.begin();
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
if (inum_full==0) {
|
||||
host_start=0;
|
||||
// Make sure textures are correct if realloc by a different hybrid style
|
||||
this->resize_atom(0,nall,success);
|
||||
this->zero_timers();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// load balance, returning the atom count on the device (inum)
|
||||
this->hd_balancer.balance(cpu_time);
|
||||
inum=this->hd_balancer.get_gpu_count(ago,inum_full);
|
||||
this->ans->inum(inum);
|
||||
host_start=inum;
|
||||
|
||||
// Build neighbor list on GPU if necessary
|
||||
if (ago==0) {
|
||||
this->build_nbor_list(inum, inum_full-inum, nall, host_x, host_type,
|
||||
sublo, subhi, tag, nspecial, special, success);
|
||||
if (!success)
|
||||
return NULL;
|
||||
} else {
|
||||
this->atom->cast_x_data(host_x,host_type);
|
||||
this->atom->add_x_data(host_x,host_type);
|
||||
}
|
||||
*ilist=this->nbor->host_ilist.begin();
|
||||
*jnum=this->nbor->host_acc.begin();
|
||||
|
||||
loop(eflag,vflag);
|
||||
|
||||
// copy fp from device to host for comm
|
||||
_nlocal=inum_full;
|
||||
time_fp1.start();
|
||||
ucl_copy(host_fp,dev_fp,inum_full,false);
|
||||
time_fp1.stop();
|
||||
|
||||
return this->nbor->host_jlist.begin()-host_start;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Copy nbor list from host if necessary and then calculate forces, virials,..
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void EAMT::compute2(int *ilist, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom) {
|
||||
if (this->ans->inum()==0)
|
||||
return;
|
||||
|
||||
this->hd_balancer.start_timer();
|
||||
time_fp2.start();
|
||||
this->add_fp_data();
|
||||
time_fp2.stop();
|
||||
|
||||
loop2(eflag,vflag);
|
||||
if (ilist == NULL)
|
||||
this->ans->copy_answers(eflag,vflag,eatom,vatom);
|
||||
else
|
||||
this->ans->copy_answers(eflag,vflag,eatom,vatom, ilist);
|
||||
|
||||
this->device->add_ans_object(this->ans);
|
||||
this->hd_balancer.stop_timer();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Calculate per-atom energies and forces
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void EAMT::loop(const bool _eflag, const bool _vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int eflag, vflag;
|
||||
if (_eflag)
|
||||
eflag=1;
|
||||
else
|
||||
eflag=0;
|
||||
|
||||
if (_vflag)
|
||||
vflag=1;
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
|
||||
if (shared_types) {
|
||||
this->k_energy_fast.set_size(GX,BX);
|
||||
this->k_energy_fast.run(&this->atom->dev_x.begin(), &type2rhor_z2r.begin(),
|
||||
&type2frho.begin(), &rhor_spline2.begin(),
|
||||
&frho_spline1.begin(),&frho_spline2.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &dev_fp.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &ainum,
|
||||
&nbor_pitch, &_ntypes, &_cutforcesq, &_rdr, &_rdrho,
|
||||
&_nrho, &_nr, &this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_energy.set_size(GX,BX);
|
||||
this->k_energy.run(&this->atom->dev_x.begin(), &type2rhor_z2r.begin(),
|
||||
&type2frho.begin(), &rhor_spline2.begin(),
|
||||
&frho_spline1.begin(),&frho_spline2.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &dev_fp.begin(),
|
||||
&this->ans->dev_engv.begin(),&eflag, &ainum, &nbor_pitch,
|
||||
&_ntypes, &_cutforcesq, &_rdr, &_rdrho, &_nrho, &_nr,
|
||||
&this->_threads_per_atom);
|
||||
}
|
||||
|
||||
this->time_pair.stop();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Calculate energies, forces, and torques
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void EAMT::loop2(const bool _eflag, const bool _vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int eflag, vflag;
|
||||
if (_eflag)
|
||||
eflag=1;
|
||||
else
|
||||
eflag=0;
|
||||
|
||||
if (_vflag)
|
||||
vflag=1;
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair2.start();
|
||||
|
||||
if (shared_types) {
|
||||
this->k_pair_fast.set_size(GX,BX);
|
||||
this->k_pair_fast.run(&this->atom->dev_x.begin(), &dev_fp.begin(),
|
||||
&type2rhor_z2r.begin(),
|
||||
&rhor_spline1.begin(),
|
||||
&z2r_spline1.begin(),
|
||||
&z2r_spline2.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag, &ainum,
|
||||
&nbor_pitch, &_cutforcesq, &_rdr, &_nr,
|
||||
&this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_pair.set_size(GX,BX);
|
||||
this->k_pair.run(&this->atom->dev_x.begin(), &dev_fp.begin(),
|
||||
&type2rhor_z2r.begin(),
|
||||
&rhor_spline1.begin(),
|
||||
&z2r_spline1.begin(),
|
||||
&z2r_spline2.begin(),
|
||||
&this->nbor->dev_nbor.begin(),
|
||||
&this->_nbor_data->begin(), &this->ans->dev_ans.begin(),
|
||||
&this->ans->dev_engv.begin(), &eflag, &vflag, &ainum,
|
||||
&nbor_pitch, &_ntypes, &_cutforcesq, &_rdr, &_nr,
|
||||
&this->_threads_per_atom);
|
||||
}
|
||||
|
||||
this->time_pair2.stop();
|
||||
}
|
||||
|
||||
template class EAM<PRECISION,ACC_PRECISION>;
|
||||
504
lib/gpu/lal_eam.cu
Normal file
504
lib/gpu/lal_eam.cu
Normal file
@ -0,0 +1,504 @@
|
||||
// **************************************************************************
|
||||
// eam.cu
|
||||
// -------------------
|
||||
// Trung Dac Nguyen, W. Michael Brown (ORNL)
|
||||
//
|
||||
// Device code for acceleration of the eam pair style
|
||||
//
|
||||
// __________________________________________________________________________
|
||||
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
// __________________________________________________________________________
|
||||
//
|
||||
// begin :
|
||||
// email : brownw@ornl.gov nguyentd@ornl.gov
|
||||
// ***************************************************************************/
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
#include "lal_aux_fun1.h"
|
||||
texture<float4> pos_tex;
|
||||
texture<float> fp_tex;
|
||||
|
||||
texture<float4> rhor_sp1_tex;
|
||||
texture<float4> rhor_sp2_tex;
|
||||
texture<float4> frho_sp1_tex;
|
||||
texture<float4> frho_sp2_tex;
|
||||
texture<float4> z2r_sp1_tex;
|
||||
texture<float4> z2r_sp2_tex;
|
||||
|
||||
#ifdef _DOUBLE_DOUBLE
|
||||
ucl_inline double4 fetch_rhor_sp1(const int& i, const double4 *rhor_spline1) {
|
||||
return rhor_spline1[i];
|
||||
}
|
||||
ucl_inline double4 fetch_rhor_sp2(const int& i, const double4 *rhor_spline2) {
|
||||
return rhor_spline2[i];
|
||||
}
|
||||
ucl_inline double4 fetch_frho_sp1(const int& i, const double4 *frho_spline1) {
|
||||
return frho_spline1[i];
|
||||
}
|
||||
ucl_inline double4 fetch_frho_sp2(const int& i, const double4 *frho_spline2) {
|
||||
return frho_spline2[i];
|
||||
}
|
||||
ucl_inline double4 fetch_z2r_sp1(const int& i, const double4 *z2r_spline1) {
|
||||
return z2r_spline1[i];
|
||||
}
|
||||
ucl_inline double4 fetch_z2r_sp2(const int& i, const double4 *z2r_spline2) {
|
||||
return z2r_spline2[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef _DOUBLE_DOUBLE
|
||||
ucl_inline float4 fetch_pos(const int& i, const float4 *pos)
|
||||
{ return tex1Dfetch(pos_tex, i); }
|
||||
ucl_inline float fetch_q(const int& i, const float *fp)
|
||||
{ return tex1Dfetch(fp_tex, i); }
|
||||
|
||||
ucl_inline float4 fetch_rhor_sp1(const int& i, const float4 *rhor_spline1)
|
||||
{ return tex1Dfetch(rhor_sp1_tex, i); }
|
||||
ucl_inline float4 fetch_rhor_sp2(const int& i, const float4 *rhor_spline2)
|
||||
{ return tex1Dfetch(rhor_sp2_tex, i); }
|
||||
ucl_inline float4 fetch_frho_sp1(const int& i, const float4 *frho_spline1)
|
||||
{ return tex1Dfetch(frho_sp1_tex, i); }
|
||||
ucl_inline float4 fetch_frho_sp2(const int& i, const float4 *frho_spline2)
|
||||
{ return tex1Dfetch(frho_sp2_tex, i); }
|
||||
ucl_inline float4 fetch_z2r_sp1(const int& i, const float4 *z2r_spline1)
|
||||
{ return tex1Dfetch(z2r_sp1_tex, i); }
|
||||
ucl_inline float4 fetch_z2r_sp2(const int& i, const float4 *z2r_spline2)
|
||||
{ return tex1Dfetch(z2r_sp2_tex, i); }
|
||||
#endif
|
||||
|
||||
#else // OPENCL
|
||||
|
||||
#define fetch_q(i,y) fp_[i]
|
||||
#define fetch_rhor_sp1(i,y) rhor_spline1[i]
|
||||
#define fetch_rhor_sp2(i,y) rhor_spline2[i]
|
||||
#define fetch_frho_sp1(i,y) frho_spline1[i]
|
||||
#define fetch_frho_sp2(i,y) frho_spline2[i]
|
||||
#define fetch_z2r_sp1(i,y) z2r_spline1[i]
|
||||
#define fetch_z2r_sp2(i,y) z2r_spline2[i]
|
||||
|
||||
#endif
|
||||
|
||||
#define MIN(A,B) ((A) < (B) ? (A) : (B))
|
||||
#define MAX(A,B) ((A) > (B) ? (A) : (B))
|
||||
|
||||
#define store_energy_fp(rho,energy,ii,inum,tid,t_per_atom,offset, \
|
||||
eflag,vflag,engv,rdrho,nrho,i) \
|
||||
if (t_per_atom>1) { \
|
||||
__local acctyp red_acc[BLOCK_PAIR]; \
|
||||
red_acc[tid]=rho; \
|
||||
for (unsigned int s=t_per_atom/2; s>0; s>>=1) { \
|
||||
if (offset < s) \
|
||||
red_acc[tid] += red_acc[tid+s]; \
|
||||
} \
|
||||
rho=red_acc[tid]; \
|
||||
} \
|
||||
if (offset==0) { \
|
||||
numtyp p = rho*rdrho + (numtyp)1.0; \
|
||||
int m=p; \
|
||||
m = MAX(1,MIN(m,nrho-1)); \
|
||||
p -= m; \
|
||||
p = MIN(p,(numtyp)1.0); \
|
||||
int index = type2frho[itype]*(nrho+1)+m; \
|
||||
numtyp4 coeff = fetch_frho_sp1(index, frho_spline1); \
|
||||
numtyp fp = (coeff.x*p + coeff.y)*p + coeff.z; \
|
||||
fp_[i]=fp; \
|
||||
if (eflag>0) { \
|
||||
coeff = fetch_frho_sp2(index, frho_spline2); \
|
||||
energy = ((coeff.x*p + coeff.y)*p + coeff.z)*p + coeff.w; \
|
||||
engv[ii]=(acctyp)2.0*energy; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define store_answers_eam(f, energy, virial, ii, inum, tid, t_per_atom, \
|
||||
offset, elag, vflag, ans, engv) \
|
||||
if (t_per_atom>1) { \
|
||||
__local acctyp red_acc[6][BLOCK_PAIR]; \
|
||||
red_acc[0][tid]=f.x; \
|
||||
red_acc[1][tid]=f.y; \
|
||||
red_acc[2][tid]=f.z; \
|
||||
red_acc[3][tid]=energy; \
|
||||
for (unsigned int s=t_per_atom/2; s>0; s>>=1) { \
|
||||
if (offset < s) { \
|
||||
for (int r=0; r<4; r++) \
|
||||
red_acc[r][tid] += red_acc[r][tid+s]; \
|
||||
} \
|
||||
} \
|
||||
f.x=red_acc[0][tid]; \
|
||||
f.y=red_acc[1][tid]; \
|
||||
f.z=red_acc[2][tid]; \
|
||||
energy=red_acc[3][tid]; \
|
||||
if (vflag>0) { \
|
||||
for (int r=0; r<6; r++) \
|
||||
red_acc[r][tid]=virial[r]; \
|
||||
for (unsigned int s=t_per_atom/2; s>0; s>>=1) { \
|
||||
if (offset < s) { \
|
||||
for (int r=0; r<6; r++) \
|
||||
red_acc[r][tid] += red_acc[r][tid+s]; \
|
||||
} \
|
||||
} \
|
||||
for (int r=0; r<6; r++) \
|
||||
virial[r]=red_acc[r][tid]; \
|
||||
} \
|
||||
} \
|
||||
if (offset==0) { \
|
||||
if (eflag>0) { \
|
||||
engv[ii]+=energy; \
|
||||
engv+=inum; \
|
||||
} \
|
||||
if (vflag>0) { \
|
||||
for (int i=0; i<6; i++) { \
|
||||
engv[ii]=virial[i]; \
|
||||
engv+=inum; \
|
||||
} \
|
||||
} \
|
||||
ans[ii]=f; \
|
||||
}
|
||||
|
||||
__kernel void kernel_energy(__global numtyp4 *x_, __global int2 *type2rhor_z2r,
|
||||
__global int *type2frho,
|
||||
__global numtyp4 *rhor_spline2,
|
||||
__global numtyp4 *frho_spline1,
|
||||
__global numtyp4 *frho_spline2,
|
||||
__global int *dev_nbor, __global int *dev_packed,
|
||||
__global numtyp *fp_, __global acctyp *engv,
|
||||
const int eflag, const int inum,
|
||||
const int nbor_pitch, const int ntypes,
|
||||
const numtyp cutforcesq, const numtyp rdr,
|
||||
const numtyp rdrho, const int nrho, const int nr,
|
||||
const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
acctyp rho = (acctyp)0;
|
||||
acctyp energy = (acctyp)0;
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
int itype=ix.w;
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int jtype=jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<cutforcesq) {
|
||||
numtyp p = ucl_sqrt(rsq)*rdr + (numtyp)1.0;
|
||||
int m=p;
|
||||
m = MIN(m,nr-1);
|
||||
p -= m;
|
||||
p = MIN(p,(numtyp)1.0);
|
||||
|
||||
int mtype = jtype*ntypes+itype;
|
||||
int index = type2rhor_z2r[mtype].x*(nr+1)+m;
|
||||
numtyp4 coeff = fetch_rhor_sp2(index, rhor_spline2);
|
||||
rho += ((coeff.x*p + coeff.y)*p + coeff.z)*p + coeff.w;
|
||||
}
|
||||
} // for nbor
|
||||
|
||||
store_energy_fp(rho,energy,ii,inum,tid,t_per_atom,offset,
|
||||
eflag,vflag,engv,rdrho,nrho,i);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void kernel_energy_fast(__global numtyp4 *x_,
|
||||
__global int2 *type2rhor_z2r_in,
|
||||
__global int *type2frho_in,
|
||||
__global numtyp4 *rhor_spline2,
|
||||
__global numtyp4 *frho_spline1,
|
||||
__global numtyp4 *frho_spline2,
|
||||
__global int *dev_nbor,
|
||||
__global int *dev_packed, __global numtyp *fp_,
|
||||
__global acctyp *engv, const int eflag,
|
||||
const int inum, const int nbor_pitch,
|
||||
const int ntypes, const numtyp cutforcesq,
|
||||
const numtyp rdr, const numtyp rdrho,
|
||||
const int nrho, const int nr,
|
||||
const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local int2 type2rhor_z2r[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local int type2frho[MAX_SHARED_TYPES];
|
||||
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
type2rhor_z2r[tid]=type2rhor_z2r_in[tid];
|
||||
}
|
||||
|
||||
if (tid<MAX_SHARED_TYPES) {
|
||||
type2frho[tid]=type2frho_in[tid];
|
||||
}
|
||||
|
||||
acctyp rho = (acctyp)0;
|
||||
acctyp energy = (acctyp)0;
|
||||
|
||||
__syncthreads();
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
int itype=ix.w;
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<cutforcesq) {
|
||||
numtyp p = ucl_sqrt(rsq)*rdr + (numtyp)1.0;
|
||||
int m=p;
|
||||
m = MIN(m,nr-1);
|
||||
p -= m;
|
||||
p = MIN(p,(numtyp)1.0);
|
||||
|
||||
int jtype=fast_mul((int)MAX_SHARED_TYPES,jx.w);
|
||||
int mtype = jtype+itype;
|
||||
int index = type2rhor_z2r[mtype].x*(nr+1)+m;
|
||||
numtyp4 coeff = fetch_rhor_sp2(index, rhor_spline2);
|
||||
rho += ((coeff.x*p + coeff.y)*p + coeff.z)*p + coeff.w;
|
||||
}
|
||||
} // for nbor
|
||||
|
||||
store_energy_fp(rho,energy,ii,inum,tid,t_per_atom,offset,
|
||||
eflag,vflag,engv,rdrho,nrho,i);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void kernel_pair(__global numtyp4 *x_, __global numtyp *fp_,
|
||||
__global int2 *type2rhor_z2r,
|
||||
__global numtyp4 *rhor_spline1,
|
||||
__global numtyp4 *z2r_spline1,
|
||||
__global numtyp4 *z2r_spline2,
|
||||
__global int *dev_nbor, __global int *dev_packed,
|
||||
__global acctyp4 *ans, __global acctyp *engv,
|
||||
const int eflag, const int vflag,
|
||||
const int inum, const int nbor_pitch,
|
||||
const int ntypes, const numtyp cutforcesq,
|
||||
const numtyp rdr, const int nr,
|
||||
const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0;
|
||||
f.y=(acctyp)0;
|
||||
f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
numtyp ifp=fetch_q(i,fp_); //fp_[i];
|
||||
int itype=ix.w;
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int jtype=jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<cutforcesq) {
|
||||
numtyp r = ucl_sqrt(rsq);
|
||||
numtyp p = r*rdr + (numtyp)1.0;
|
||||
int m=p;
|
||||
m = MIN(m,nr-1);
|
||||
p -= m;
|
||||
p = MIN(p,(numtyp)1.0);
|
||||
|
||||
int mtype,index;
|
||||
numtyp4 coeff;
|
||||
|
||||
mtype = itype*ntypes+jtype;
|
||||
index = type2rhor_z2r[mtype].x*(nr+1)+m;
|
||||
coeff = fetch_rhor_sp1(index, rhor_spline1);
|
||||
numtyp rhoip = (coeff.x*p + coeff.y)*p + coeff.z;
|
||||
|
||||
mtype = jtype*ntypes+itype;
|
||||
index = type2rhor_z2r[mtype].x*(nr+1)+m;
|
||||
coeff = fetch_rhor_sp1(index, rhor_spline1);
|
||||
numtyp rhojp = (coeff.x*p + coeff.y)*p + coeff.z;
|
||||
|
||||
mtype = itype*ntypes+jtype;
|
||||
index = type2rhor_z2r[mtype].y*(nr+1)+m;
|
||||
coeff = fetch_z2r_sp1(index, z2r_spline1);
|
||||
numtyp z2p = (coeff.x*p + coeff.y)*p + coeff.z;
|
||||
coeff = fetch_z2r_sp2(index, z2r_spline2);
|
||||
numtyp z2 = ((coeff.x*p + coeff.y)*p + coeff.z)*p + coeff.w;
|
||||
|
||||
numtyp recip = ucl_recip(r);
|
||||
numtyp phi = z2*recip;
|
||||
numtyp phip = z2p*recip - phi*recip;
|
||||
numtyp psip = ifp*rhojp + fetch_q(j,fp_)*rhoip + phip;
|
||||
numtyp force = -psip*recip;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
energy += phi;
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
} // for nbor
|
||||
store_answers_eam(f,energy,virial,ii,inum,tid,t_per_atom,offset,eflag,vflag,
|
||||
ans,engv);
|
||||
} // if ii
|
||||
|
||||
}
|
||||
|
||||
__kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp *fp_,
|
||||
__global int2 *type2rhor_z2r_in,
|
||||
__global numtyp4 *rhor_spline1,
|
||||
__global numtyp4 *z2r_spline1,
|
||||
__global numtyp4 *z2r_spline2,
|
||||
__global int *dev_nbor, __global int *dev_packed,
|
||||
__global acctyp4 *ans, __global acctyp *engv,
|
||||
const int eflag, const int vflag, const int inum,
|
||||
const int nbor_pitch,
|
||||
const numtyp cutforcesq,
|
||||
const numtyp rdr, const int nr,
|
||||
const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local int2 type2rhor_z2r[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
type2rhor_z2r[tid]=type2rhor_z2r_in[tid];
|
||||
}
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
__syncthreads();
|
||||
|
||||
if (ii<inum) {
|
||||
__global int *nbor, *list_end;
|
||||
int i, numj, n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,list_end,nbor);
|
||||
|
||||
numtyp4 ix=fetch_pos(i,x_); //x_[i];
|
||||
numtyp ifp=fetch_q(i,fp_); //fp_[i];
|
||||
int iw=ix.w;
|
||||
int itype=fast_mul((int)MAX_SHARED_TYPES,iw);
|
||||
|
||||
for ( ; nbor<list_end; nbor+=n_stride) {
|
||||
int j=*nbor;
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx=fetch_pos(j,x_); //x_[j];
|
||||
int jw=jx.w;
|
||||
int jtype=fast_mul((int)MAX_SHARED_TYPES,jw);
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<cutforcesq) {
|
||||
numtyp r = ucl_sqrt(rsq);
|
||||
numtyp p = r*rdr + (numtyp)1.0;
|
||||
int m=p;
|
||||
m = MIN(m,nr-1);
|
||||
p -= m;
|
||||
p = MIN(p,(numtyp)1.0);
|
||||
|
||||
numtyp4 coeff;
|
||||
int mtype,index;
|
||||
|
||||
mtype = itype+jw;
|
||||
index = type2rhor_z2r[mtype].x*(nr+1)+m;
|
||||
coeff = fetch_rhor_sp1(index, rhor_spline1);
|
||||
numtyp rhoip = (coeff.x*p + coeff.y)*p + coeff.z;
|
||||
|
||||
mtype = jtype+iw;
|
||||
index = type2rhor_z2r[mtype].x*(nr+1)+m;
|
||||
coeff = fetch_rhor_sp1(index, rhor_spline1);
|
||||
numtyp rhojp = (coeff.x*p + coeff.y)*p + coeff.z;
|
||||
|
||||
mtype = itype+jw;
|
||||
index = type2rhor_z2r[mtype].y*(nr+1)+m;
|
||||
coeff = fetch_z2r_sp1(index, z2r_spline1);
|
||||
numtyp z2p = (coeff.x*p + coeff.y)*p + coeff.z;
|
||||
coeff = fetch_z2r_sp2(index, z2r_spline2);
|
||||
numtyp z2 = ((coeff.x*p + coeff.y)*p + coeff.z)*p + coeff.w;
|
||||
|
||||
numtyp recip = ucl_recip(r);
|
||||
numtyp phi = z2*recip;
|
||||
numtyp phip = z2p*recip - phi*recip;
|
||||
numtyp psip = ifp*rhojp + fetch_q(j,fp_)*rhoip + phip;
|
||||
numtyp force = -psip*recip;
|
||||
|
||||
f.x+=delx*force;
|
||||
f.y+=dely*force;
|
||||
f.z+=delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
energy += phi;
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
} // for nbor
|
||||
store_answers_eam(f,energy,virial,ii,inum,tid,t_per_atom,offset,eflag,vflag,
|
||||
ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
144
lib/gpu/lal_eam.h
Normal file
144
lib/gpu/lal_eam.h
Normal file
@ -0,0 +1,144 @@
|
||||
/***************************************************************************
|
||||
eam.h
|
||||
-------------------
|
||||
Trung Dac Nguyen, W. Michael Brown (ORNL)
|
||||
|
||||
Class for acceleration of the eam pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : brownw@ornl.gov nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LAL_EAM_H
|
||||
#define LAL_EAM_H
|
||||
|
||||
#include "lal_precision.h"
|
||||
#include "lal_base_atomic.h"
|
||||
|
||||
namespace LAMMPS_AL {
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
class EAM : public BaseAtomic<numtyp, acctyp> {
|
||||
public:
|
||||
EAM();
|
||||
~EAM();
|
||||
|
||||
/// Clear any previous data and set up for a new LAMMPS run
|
||||
/** \param max_nbors initial number of rows in the neighbor matrix
|
||||
* \param cell_size cutoff + skin
|
||||
* \param gpu_split fraction of particles handled by device
|
||||
*
|
||||
* Returns:
|
||||
* - 0 if successfull
|
||||
* - -1 if fix gpu not found
|
||||
* - -3 if there is an out of memory error
|
||||
* - -4 if the GPU library was not compiled for GPU
|
||||
* - -5 Double precision is not supported on card **/
|
||||
int init(const int ntypes, double host_cutforcesq, int **host_type2rhor,
|
||||
int **host_type2z2r, int *host_type2frho, double ***host_rhor_spline,
|
||||
double ***host_z2r_spline, double ***host_frho_spline, double rdr,
|
||||
double rdrho, int nrhor, int nrho, int nz2r, int nfrho, int nr,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size, const double gpu_split,
|
||||
FILE *_screen);
|
||||
|
||||
// Copy charges to device asynchronously
|
||||
inline void add_fp_data() {
|
||||
int nghost=this->atom->nall()-_nlocal;
|
||||
if (nghost>0) {
|
||||
UCL_H_Vec<numtyp> host_view;
|
||||
UCL_D_Vec<numtyp> dev_view;
|
||||
host_view.view_offset(_nlocal,host_fp);
|
||||
dev_view.view_offset(_nlocal,dev_fp);
|
||||
ucl_copy(dev_view,host_view,nghost,true);
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear all host and device data
|
||||
/** \note This is called at the beginning of the init() routine **/
|
||||
void clear();
|
||||
|
||||
/// Returns memory usage on device per atom
|
||||
int bytes_per_atom(const int max_nbors) const;
|
||||
|
||||
/// Total host memory used by library for pair style
|
||||
double host_memory_usage() const;
|
||||
|
||||
/// Pair loop with host neighboring
|
||||
void compute(const int f_ago, const int inum_full, const int, const int nall,
|
||||
double **host_x, int *host_type, int *ilist, int *numj,
|
||||
int **firstneigh, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
const double cpu_time, bool &success,
|
||||
void **fp_ptr);
|
||||
|
||||
/// Pair loop with device neighboring
|
||||
int** compute(const int ago, const int inum_full, const int nall,
|
||||
double **host_x, int *host_type, double *sublo,
|
||||
double *subhi, int *tag, int **nspecial,
|
||||
int **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **numj, const double cpu_time, bool &success,
|
||||
int &inum, void **fp_ptr);
|
||||
|
||||
/// Pair loop with host neighboring
|
||||
void compute2(int *ilist, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom);
|
||||
|
||||
// ------------------------- DEVICE KERNELS -------------------------
|
||||
UCL_Kernel k_energy, k_energy_fast;
|
||||
|
||||
// --------------------------- TEXTURES -----------------------------
|
||||
UCL_Texture fp_tex;
|
||||
UCL_Texture rhor_spline1_tex, rhor_spline2_tex;
|
||||
UCL_Texture frho_spline1_tex, frho_spline2_tex;
|
||||
UCL_Texture z2r_spline1_tex, z2r_spline2_tex;
|
||||
|
||||
// --------------------------- DEVICE DATA --------------------------
|
||||
|
||||
/// Device Timers
|
||||
UCL_Timer time_pair2, time_fp1, time_fp2;
|
||||
|
||||
// --------------------------- TYPE DATA --------------------------
|
||||
|
||||
UCL_D_Vec<int2> type2rhor_z2r;
|
||||
UCL_D_Vec<int> type2frho;
|
||||
|
||||
UCL_D_Vec<numtyp4> z2r_spline1, z2r_spline2;
|
||||
UCL_D_Vec<numtyp4> frho_spline1, frho_spline2;
|
||||
UCL_D_Vec<numtyp4> rhor_spline1, rhor_spline2;
|
||||
|
||||
numtyp _cutforcesq,_rdr,_rdrho;
|
||||
|
||||
int _nfrho,_nrhor,_nrho,_nz2r,_nr;
|
||||
|
||||
/// If atom type constants fit in shared memory, use fast kernels
|
||||
bool shared_types;
|
||||
|
||||
/// Number of atom types
|
||||
int _ntypes;
|
||||
|
||||
int _max_fp_size;
|
||||
|
||||
/// True of energy kernels are compiled
|
||||
bool _compiled_energy;
|
||||
|
||||
/// Per-atom arrays
|
||||
UCL_H_Vec<numtyp> host_fp;
|
||||
UCL_D_Vec<numtyp> dev_fp;
|
||||
|
||||
protected:
|
||||
bool _allocated;
|
||||
int _nlocal;
|
||||
void loop(const bool _eflag, const bool _vflag);
|
||||
void loop2(const bool _eflag, const bool _vflag);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
143
lib/gpu/lal_eam_ext.cpp
Normal file
143
lib/gpu/lal_eam_ext.cpp
Normal file
@ -0,0 +1,143 @@
|
||||
/***************************************************************************
|
||||
eam_ext.cpp
|
||||
-------------------
|
||||
Trung Dac Nguyen, W. Michael Brown (ORNL)
|
||||
|
||||
Functions for LAMMPS access to buck acceleration routines.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : brownw@ornl.gov nguyentd@ornl.gov
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <math.h>
|
||||
|
||||
#include "lal_eam.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace LAMMPS_AL;
|
||||
|
||||
static EAM<PRECISION,ACC_PRECISION> EAMMF;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Allocate memory on host and device and copy constants to device
|
||||
// ---------------------------------------------------------------------------
|
||||
int eam_gpu_init(const int ntypes, double host_cutforcesq,
|
||||
int **host_type2rhor, int **host_type2z2r, int *host_type2frho,
|
||||
double ***host_rhor_spline, double ***host_z2r_spline,
|
||||
double ***host_frho_spline,
|
||||
double rdr, double rdrho, int nrhor,
|
||||
int nrho, int nz2r, int nfrho, int nr,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
int &gpu_mode, FILE *screen, int &fp_size) {
|
||||
EAMMF.clear();
|
||||
gpu_mode=EAMMF.device->gpu_mode();
|
||||
double gpu_split=EAMMF.device->particle_split();
|
||||
int first_gpu=EAMMF.device->first_device();
|
||||
int last_gpu=EAMMF.device->last_device();
|
||||
int world_me=EAMMF.device->world_me();
|
||||
int gpu_rank=EAMMF.device->gpu_rank();
|
||||
int procs_per_gpu=EAMMF.device->procs_per_gpu();
|
||||
|
||||
// disable host/device split for now
|
||||
if (gpu_split != 1.0)
|
||||
return -8;
|
||||
|
||||
fp_size=sizeof(PRECISION);
|
||||
|
||||
EAMMF.device->init_message(screen,"eam",first_gpu,last_gpu);
|
||||
|
||||
bool message=false;
|
||||
if (EAMMF.device->replica_me()==0 && screen)
|
||||
message=true;
|
||||
|
||||
if (message) {
|
||||
fprintf(screen,"Initializing GPU and compiling on process 0...");
|
||||
fflush(screen);
|
||||
}
|
||||
|
||||
int init_ok=0;
|
||||
if (world_me==0)
|
||||
init_ok=EAMMF.init(ntypes, host_cutforcesq, host_type2rhor, host_type2z2r,
|
||||
host_type2frho, host_rhor_spline, host_z2r_spline,
|
||||
host_frho_spline, rdr, rdrho, nrhor, nrho, nz2r, nfrho,
|
||||
nr, nlocal, nall, 300, maxspecial, cell_size, gpu_split,
|
||||
screen);
|
||||
|
||||
EAMMF.device->world_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
|
||||
for (int i=0; i<procs_per_gpu; i++) {
|
||||
if (message) {
|
||||
if (last_gpu-first_gpu==0)
|
||||
fprintf(screen,"Initializing GPU %d on core %d...",first_gpu,i);
|
||||
else
|
||||
fprintf(screen,"Initializing GPUs %d-%d on core %d...",first_gpu,
|
||||
last_gpu,i);
|
||||
fflush(screen);
|
||||
}
|
||||
if (gpu_rank==i && world_me!=0)
|
||||
init_ok=EAMMF.init(ntypes, host_cutforcesq, host_type2rhor, host_type2z2r,
|
||||
host_type2frho, host_rhor_spline, host_z2r_spline,
|
||||
host_frho_spline, rdr, rdrho, nrhor, nrho, nz2r, nfrho,
|
||||
nr, nlocal, nall, 300, maxspecial, cell_size,
|
||||
gpu_split, screen);
|
||||
|
||||
EAMMF.device->gpu_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
}
|
||||
if (message)
|
||||
fprintf(screen,"\n");
|
||||
|
||||
if (init_ok==0)
|
||||
EAMMF.estimate_gpu_overhead();
|
||||
return init_ok;
|
||||
}
|
||||
|
||||
void eam_gpu_clear() {
|
||||
EAMMF.clear();
|
||||
}
|
||||
|
||||
int ** eam_gpu_compute_n(const int ago, const int inum_full,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
double *sublo, double *subhi, int *tag, int **nspecial,
|
||||
int **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **jnum, const double cpu_time,
|
||||
bool &success, int &inum, void **fp_ptr) {
|
||||
return EAMMF.compute(ago, inum_full, nall, host_x, host_type, sublo,
|
||||
subhi, tag, nspecial, special, eflag, vflag, eatom,
|
||||
vatom, host_start, ilist, jnum, cpu_time, success,
|
||||
inum, fp_ptr);
|
||||
}
|
||||
|
||||
void eam_gpu_compute(const int ago, const int inum_full, const int nlocal,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
int *ilist, int *numj, int **firstneigh, const bool eflag,
|
||||
const bool vflag, const bool eatom, const bool vatom,
|
||||
int &host_start, const double cpu_time, bool &success,
|
||||
void **fp_ptr) {
|
||||
EAMMF.compute(ago,inum_full,nlocal,nall,host_x,host_type,ilist,numj,
|
||||
firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success,
|
||||
fp_ptr);
|
||||
}
|
||||
|
||||
void eam_gpu_compute_force(int *ilist, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom) {
|
||||
EAMMF.compute2(ilist, eflag, vflag, eatom, vatom);
|
||||
}
|
||||
|
||||
|
||||
double eam_gpu_bytes() {
|
||||
return EAMMF.host_memory_usage();
|
||||
}
|
||||
|
||||
|
||||
BIN
lib/gpu/lal_gayberne.o
Normal file
BIN
lib/gpu/lal_gayberne.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_gayberne_ext.o
Normal file
BIN
lib/gpu/lal_gayberne_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj.o
Normal file
BIN
lib/gpu/lal_lj.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj96.o
Normal file
BIN
lib/gpu/lal_lj96.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj96_ext.o
Normal file
BIN
lib/gpu/lal_lj96_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_class2_long.o
Normal file
BIN
lib/gpu/lal_lj_class2_long.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_class2_long_ext.o
Normal file
BIN
lib/gpu/lal_lj_class2_long_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_coul.o
Normal file
BIN
lib/gpu/lal_lj_coul.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_coul_ext.o
Normal file
BIN
lib/gpu/lal_lj_coul_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_coul_long.o
Normal file
BIN
lib/gpu/lal_lj_coul_long.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_coul_long_ext.o
Normal file
BIN
lib/gpu/lal_lj_coul_long_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_expand.o
Normal file
BIN
lib/gpu/lal_lj_expand.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_expand_ext.o
Normal file
BIN
lib/gpu/lal_lj_expand_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_lj_ext.o
Normal file
BIN
lib/gpu/lal_lj_ext.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_morse.o
Normal file
BIN
lib/gpu/lal_morse.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_morse_ext.o
Normal file
BIN
lib/gpu/lal_morse_ext.o
Normal file
Binary file not shown.
@ -464,8 +464,10 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum,
|
||||
ptr+=mn;
|
||||
}
|
||||
_gpu_bytes+=dev_host_nbor.row_bytes();
|
||||
} else
|
||||
} else {
|
||||
dev_host_nbor.view(dev_nbor);
|
||||
dev_host_numj.view(dev_nbor);
|
||||
}
|
||||
if (_alloc_packed) {
|
||||
dev_packed.clear();
|
||||
success=success && (dev_packed.alloc((mn+2)*_max_atoms,*dev,
|
||||
@ -495,7 +497,7 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum,
|
||||
time_kernel.stop();
|
||||
|
||||
time_nbor.start();
|
||||
if (_gpu_host)
|
||||
if (inum<nt)
|
||||
ucl_copy(host_nbor,dev_host_nbor,false);
|
||||
time_nbor.stop();
|
||||
}
|
||||
|
||||
BIN
lib/gpu/lal_neighbor.o
Normal file
BIN
lib/gpu/lal_neighbor.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_neighbor_shared.o
Normal file
BIN
lib/gpu/lal_neighbor_shared.o
Normal file
Binary file not shown.
BIN
lib/gpu/lal_pppm.o
Normal file
BIN
lib/gpu/lal_pppm.o
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user