mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
Complete cuda renaming
This commit is contained in:
+54
-54
@@ -23,22 +23,22 @@ FOBJS=cusparse_mod.o base_cusparse_mod.o \
|
||||
psb_s_vectordev_mod.o psb_d_vectordev_mod.o psb_i_vectordev_mod.o\
|
||||
psb_c_vectordev_mod.o psb_z_vectordev_mod.o psb_base_vectordev_mod.o \
|
||||
elldev_mod.o hlldev_mod.o diagdev_mod.o hdiagdev_mod.o \
|
||||
psb_i_gpu_vect_mod.o \
|
||||
psb_d_gpu_vect_mod.o psb_s_gpu_vect_mod.o\
|
||||
psb_z_gpu_vect_mod.o psb_c_gpu_vect_mod.o\
|
||||
psb_d_elg_mat_mod.o psb_d_hlg_mat_mod.o \
|
||||
psb_d_hybg_mat_mod.o psb_d_csrg_mat_mod.o\
|
||||
psb_s_elg_mat_mod.o psb_s_hlg_mat_mod.o \
|
||||
psb_s_hybg_mat_mod.o psb_s_csrg_mat_mod.o\
|
||||
psb_c_elg_mat_mod.o psb_c_hlg_mat_mod.o \
|
||||
psb_c_hybg_mat_mod.o psb_c_csrg_mat_mod.o\
|
||||
psb_z_elg_mat_mod.o psb_z_hlg_mat_mod.o \
|
||||
psb_z_hybg_mat_mod.o psb_z_csrg_mat_mod.o\
|
||||
psb_gpu_env_mod.o psb_gpu_mod.o \
|
||||
psb_d_diag_mat_mod.o\
|
||||
psb_d_hdiag_mat_mod.o psb_s_hdiag_mat_mod.o\
|
||||
psb_s_dnsg_mat_mod.o psb_d_dnsg_mat_mod.o \
|
||||
psb_c_dnsg_mat_mod.o psb_z_dnsg_mat_mod.o \
|
||||
psb_i_cuda_vect_mod.o \
|
||||
psb_d_cuda_vect_mod.o psb_s_cuda_vect_mod.o\
|
||||
psb_z_cuda_vect_mod.o psb_c_cuda_vect_mod.o\
|
||||
psb_d_cuda_elg_mat_mod.o psb_d_cuda_hlg_mat_mod.o \
|
||||
psb_d_cuda_hybg_mat_mod.o psb_d_cuda_csrg_mat_mod.o\
|
||||
psb_s_cuda_elg_mat_mod.o psb_s_cuda_hlg_mat_mod.o \
|
||||
psb_s_cuda_hybg_mat_mod.o psb_s_cuda_csrg_mat_mod.o\
|
||||
psb_c_cuda_elg_mat_mod.o psb_c_cuda_hlg_mat_mod.o \
|
||||
psb_c_cuda_hybg_mat_mod.o psb_c_cuda_csrg_mat_mod.o\
|
||||
psb_z_cuda_elg_mat_mod.o psb_z_cuda_hlg_mat_mod.o \
|
||||
psb_z_cuda_hybg_mat_mod.o psb_z_cuda_csrg_mat_mod.o\
|
||||
psb_cuda_env_mod.o psb_cuda_mod.o \
|
||||
psb_d_cuda_diag_mat_mod.o\
|
||||
psb_d_cuda_hdiag_mat_mod.o psb_s_cuda_hdiag_mat_mod.o\
|
||||
psb_s_cuda_dnsg_mat_mod.o psb_d_cuda_dnsg_mat_mod.o \
|
||||
psb_c_cuda_dnsg_mat_mod.o psb_z_cuda_dnsg_mat_mod.o \
|
||||
dnsdev_mod.o
|
||||
|
||||
COBJS= elldev.o hlldev.o diagdev.o hdiagdev.o vectordev.o ivectordev.o dnsdev.o\
|
||||
@@ -65,30 +65,30 @@ lib: ilib cudalib spgpulib
|
||||
/bin/cp -p $(LIBNAME) $(LIBDIR)
|
||||
|
||||
dnsdev_mod.o hlldev_mod.o elldev_mod.o psb_base_vectordev_mod.o: core_mod.o
|
||||
psb_d_gpu_vect_mod.o psb_s_gpu_vect_mod.o psb_z_gpu_vect_mod.o psb_c_gpu_vect_mod.o: psb_i_gpu_vect_mod.o
|
||||
psb_i_gpu_vect_mod.o : psb_vectordev_mod.o psb_gpu_env_mod.o
|
||||
psb_d_cuda_vect_mod.o psb_s_cuda_vect_mod.o psb_z_cuda_vect_mod.o psb_c_cuda_vect_mod.o: psb_i_cuda_vect_mod.o
|
||||
psb_i_cuda_vect_mod.o : psb_vectordev_mod.o psb_cuda_env_mod.o
|
||||
cusparse_mod.o: s_cusparse_mod.o d_cusparse_mod.o c_cusparse_mod.o z_cusparse_mod.o
|
||||
s_cusparse_mod.o d_cusparse_mod.o c_cusparse_mod.o z_cusparse_mod.o : base_cusparse_mod.o
|
||||
psb_d_hlg_mat_mod.o: hlldev_mod.o psb_d_gpu_vect_mod.o psb_gpu_env_mod.o
|
||||
psb_d_elg_mat_mod.o: elldev_mod.o psb_d_gpu_vect_mod.o
|
||||
psb_d_diag_mat_mod.o: diagdev_mod.o psb_d_gpu_vect_mod.o
|
||||
psb_d_hdiag_mat_mod.o: hdiagdev_mod.o psb_d_gpu_vect_mod.o
|
||||
psb_s_dnsg_mat_mod.o: dnsdev_mod.o psb_s_gpu_vect_mod.o
|
||||
psb_d_dnsg_mat_mod.o: dnsdev_mod.o psb_d_gpu_vect_mod.o
|
||||
psb_c_dnsg_mat_mod.o: dnsdev_mod.o psb_c_gpu_vect_mod.o
|
||||
psb_z_dnsg_mat_mod.o: dnsdev_mod.o psb_z_gpu_vect_mod.o
|
||||
psb_s_hlg_mat_mod.o: hlldev_mod.o psb_s_gpu_vect_mod.o psb_gpu_env_mod.o
|
||||
psb_s_elg_mat_mod.o: elldev_mod.o psb_s_gpu_vect_mod.o
|
||||
psb_s_diag_mat_mod.o: diagdev_mod.o psb_s_gpu_vect_mod.o
|
||||
psb_s_hdiag_mat_mod.o: hdiagdev_mod.o psb_s_gpu_vect_mod.o
|
||||
psb_s_csrg_mat_mod.o psb_s_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_d_csrg_mat_mod.o psb_d_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_z_hlg_mat_mod.o: hlldev_mod.o psb_z_gpu_vect_mod.o psb_gpu_env_mod.o
|
||||
psb_z_elg_mat_mod.o: elldev_mod.o psb_z_gpu_vect_mod.o
|
||||
psb_c_hlg_mat_mod.o: hlldev_mod.o psb_c_gpu_vect_mod.o psb_gpu_env_mod.o
|
||||
psb_c_elg_mat_mod.o: elldev_mod.o psb_c_gpu_vect_mod.o
|
||||
psb_c_csrg_mat_mod.o psb_c_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_z_csrg_mat_mod.o psb_z_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_d_cuda_hlg_mat_mod.o: hlldev_mod.o psb_d_cuda_vect_mod.o psb_cuda_env_mod.o
|
||||
psb_d_cuda_elg_mat_mod.o: elldev_mod.o psb_d_cuda_vect_mod.o
|
||||
psb_d_cuda_diag_mat_mod.o: diagdev_mod.o psb_d_cuda_vect_mod.o
|
||||
psb_d_cuda_hdiag_mat_mod.o: hdiagdev_mod.o psb_d_cuda_vect_mod.o
|
||||
psb_s_cuda_dnsg_mat_mod.o: dnsdev_mod.o psb_s_cuda_vect_mod.o
|
||||
psb_d_cuda_dnsg_mat_mod.o: dnsdev_mod.o psb_d_cuda_vect_mod.o
|
||||
psb_c_cuda_dnsg_mat_mod.o: dnsdev_mod.o psb_c_cuda_vect_mod.o
|
||||
psb_z_cuda_dnsg_mat_mod.o: dnsdev_mod.o psb_z_cuda_vect_mod.o
|
||||
psb_s_cuda_hlg_mat_mod.o: hlldev_mod.o psb_s_cuda_vect_mod.o psb_cuda_env_mod.o
|
||||
psb_s_cuda_elg_mat_mod.o: elldev_mod.o psb_s_cuda_vect_mod.o
|
||||
psb_s_cuda_diag_mat_mod.o: diagdev_mod.o psb_s_cuda_vect_mod.o
|
||||
psb_s_cuda_hdiag_mat_mod.o: hdiagdev_mod.o psb_s_cuda_vect_mod.o
|
||||
psb_s_cuda_csrg_mat_mod.o psb_s_cuda_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_d_cuda_csrg_mat_mod.o psb_d_cuda_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_z_cuda_hlg_mat_mod.o: hlldev_mod.o psb_z_cuda_vect_mod.o psb_cuda_env_mod.o
|
||||
psb_z_cuda_elg_mat_mod.o: elldev_mod.o psb_z_cuda_vect_mod.o
|
||||
psb_c_cuda_hlg_mat_mod.o: hlldev_mod.o psb_c_cuda_vect_mod.o psb_cuda_env_mod.o
|
||||
psb_c_cuda_elg_mat_mod.o: elldev_mod.o psb_c_cuda_vect_mod.o
|
||||
psb_c_cuda_csrg_mat_mod.o psb_c_cuda_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_z_cuda_csrg_mat_mod.o psb_z_cuda_hybg_mat_mod.o: cusparse_mod.o psb_vectordev_mod.o
|
||||
psb_vectordev_mod.o: psb_s_vectordev_mod.o psb_d_vectordev_mod.o psb_c_vectordev_mod.o psb_z_vectordev_mod.o psb_i_vectordev_mod.o
|
||||
psb_i_vectordev_mod.o psb_s_vectordev_mod.o psb_d_vectordev_mod.o psb_c_vectordev_mod.o psb_z_vectordev_mod.o: psb_base_vectordev_mod.o
|
||||
vectordev.o: cuda_util.o vectordev.h
|
||||
@@ -101,22 +101,22 @@ svectordev.o: svectordev.h vectordev.h
|
||||
dvectordev.o: dvectordev.h vectordev.h
|
||||
cvectordev.o: cvectordev.h vectordev.h
|
||||
zvectordev.o: zvectordev.h vectordev.h
|
||||
psb_gpu_env_mod.o: base_cusparse_mod.o
|
||||
psb_gpu_mod.o: psb_gpu_env_mod.o psb_i_gpu_vect_mod.o\
|
||||
psb_d_gpu_vect_mod.o psb_s_gpu_vect_mod.o\
|
||||
psb_z_gpu_vect_mod.o psb_c_gpu_vect_mod.o\
|
||||
psb_d_elg_mat_mod.o psb_d_hlg_mat_mod.o \
|
||||
psb_d_hybg_mat_mod.o psb_d_csrg_mat_mod.o\
|
||||
psb_s_elg_mat_mod.o psb_s_hlg_mat_mod.o \
|
||||
psb_s_hybg_mat_mod.o psb_s_csrg_mat_mod.o\
|
||||
psb_c_elg_mat_mod.o psb_c_hlg_mat_mod.o \
|
||||
psb_c_hybg_mat_mod.o psb_c_csrg_mat_mod.o\
|
||||
psb_z_elg_mat_mod.o psb_z_hlg_mat_mod.o \
|
||||
psb_z_hybg_mat_mod.o psb_z_csrg_mat_mod.o\
|
||||
psb_d_diag_mat_mod.o \
|
||||
psb_d_hdiag_mat_mod.o psb_s_hdiag_mat_mod.o\
|
||||
psb_s_dnsg_mat_mod.o psb_d_dnsg_mat_mod.o \
|
||||
psb_c_dnsg_mat_mod.o psb_z_dnsg_mat_mod.o
|
||||
psb_cuda_env_mod.o: base_cusparse_mod.o
|
||||
psb_cuda_mod.o: psb_cuda_env_mod.o psb_i_cuda_vect_mod.o\
|
||||
psb_d_cuda_vect_mod.o psb_s_cuda_vect_mod.o\
|
||||
psb_z_cuda_vect_mod.o psb_c_cuda_vect_mod.o\
|
||||
psb_d_cuda_elg_mat_mod.o psb_d_cuda_hlg_mat_mod.o \
|
||||
psb_d_cuda_hybg_mat_mod.o psb_d_cuda_csrg_mat_mod.o\
|
||||
psb_s_cuda_elg_mat_mod.o psb_s_cuda_hlg_mat_mod.o \
|
||||
psb_s_cuda_hybg_mat_mod.o psb_s_cuda_csrg_mat_mod.o\
|
||||
psb_c_cuda_elg_mat_mod.o psb_c_cuda_hlg_mat_mod.o \
|
||||
psb_c_cuda_hybg_mat_mod.o psb_c_cuda_csrg_mat_mod.o\
|
||||
psb_z_cuda_elg_mat_mod.o psb_z_cuda_hlg_mat_mod.o \
|
||||
psb_z_cuda_hybg_mat_mod.o psb_z_cuda_csrg_mat_mod.o\
|
||||
psb_d_cuda_diag_mat_mod.o \
|
||||
psb_d_cuda_hdiag_mat_mod.o psb_s_cuda_hdiag_mat_mod.o\
|
||||
psb_s_cuda_dnsg_mat_mod.o psb_d_cuda_dnsg_mat_mod.o \
|
||||
psb_c_cuda_dnsg_mat_mod.o psb_z_cuda_dnsg_mat_mod.o
|
||||
|
||||
iobjs: $(FOBJS)
|
||||
$(MAKE) -C impl objs
|
||||
|
||||
+270
-270
@@ -17,276 +17,276 @@ CDEFINES=$(PSBCDEFINES) $(SPGPU_DEFINES) $(CUDA_DEFINES)
|
||||
FDEFINES=$(PSBFDEFINES) $(SPGPU_DEFINES) $(CUDA_DEFINES)
|
||||
|
||||
OBJS= \
|
||||
psb_d_cp_csrg_from_coo.o \
|
||||
psb_d_cp_csrg_from_fmt.o \
|
||||
psb_d_cp_elg_from_coo.o \
|
||||
psb_d_cp_elg_from_fmt.o \
|
||||
psb_s_cp_csrg_from_coo.o \
|
||||
psb_s_cp_csrg_from_fmt.o \
|
||||
psb_s_csrg_allocate_mnnz.o \
|
||||
psb_s_csrg_csmm.o \
|
||||
psb_s_csrg_csmv.o \
|
||||
psb_s_csrg_mold.o \
|
||||
psb_s_csrg_reallocate_nz.o \
|
||||
psb_s_csrg_scal.o \
|
||||
psb_s_csrg_scals.o \
|
||||
psb_s_csrg_from_gpu.o \
|
||||
psb_s_csrg_to_gpu.o \
|
||||
psb_s_csrg_vect_mv.o \
|
||||
psb_s_csrg_inner_vect_sv.o \
|
||||
psb_d_csrg_allocate_mnnz.o \
|
||||
psb_d_csrg_csmm.o \
|
||||
psb_d_csrg_csmv.o \
|
||||
psb_d_csrg_mold.o \
|
||||
psb_d_csrg_reallocate_nz.o \
|
||||
psb_d_csrg_scal.o \
|
||||
psb_d_csrg_scals.o \
|
||||
psb_d_csrg_from_gpu.o \
|
||||
psb_d_csrg_to_gpu.o \
|
||||
psb_d_csrg_vect_mv.o \
|
||||
psb_d_csrg_inner_vect_sv.o \
|
||||
psb_d_elg_allocate_mnnz.o \
|
||||
psb_d_elg_asb.o \
|
||||
psb_d_elg_csmm.o \
|
||||
psb_d_elg_csmv.o \
|
||||
psb_d_elg_csput.o \
|
||||
psb_d_elg_from_gpu.o \
|
||||
psb_d_elg_inner_vect_sv.o \
|
||||
psb_d_elg_mold.o \
|
||||
psb_d_elg_reallocate_nz.o \
|
||||
psb_d_elg_scal.o \
|
||||
psb_d_elg_scals.o \
|
||||
psb_d_elg_to_gpu.o \
|
||||
psb_d_elg_vect_mv.o \
|
||||
psb_d_mv_csrg_from_coo.o \
|
||||
psb_d_mv_csrg_from_fmt.o \
|
||||
psb_d_mv_elg_from_coo.o \
|
||||
psb_d_mv_elg_from_fmt.o \
|
||||
psb_s_mv_csrg_from_coo.o \
|
||||
psb_s_mv_csrg_from_fmt.o \
|
||||
psb_s_cp_elg_from_coo.o \
|
||||
psb_s_cp_elg_from_fmt.o \
|
||||
psb_s_elg_allocate_mnnz.o \
|
||||
psb_s_elg_asb.o \
|
||||
psb_s_elg_csmm.o \
|
||||
psb_s_elg_csmv.o \
|
||||
psb_s_elg_csput.o \
|
||||
psb_s_elg_inner_vect_sv.o \
|
||||
psb_s_elg_mold.o \
|
||||
psb_s_elg_reallocate_nz.o \
|
||||
psb_s_elg_scal.o \
|
||||
psb_s_elg_scals.o \
|
||||
psb_s_elg_to_gpu.o \
|
||||
psb_s_elg_from_gpu.o \
|
||||
psb_s_elg_vect_mv.o \
|
||||
psb_s_mv_elg_from_coo.o \
|
||||
psb_s_mv_elg_from_fmt.o \
|
||||
psb_s_cp_hlg_from_fmt.o \
|
||||
psb_s_cp_hlg_from_coo.o \
|
||||
psb_d_cp_hlg_from_fmt.o \
|
||||
psb_d_cp_hlg_from_coo.o \
|
||||
psb_d_hlg_allocate_mnnz.o \
|
||||
psb_d_hlg_csmm.o \
|
||||
psb_d_hlg_csmv.o \
|
||||
psb_d_hlg_inner_vect_sv.o \
|
||||
psb_d_hlg_mold.o \
|
||||
psb_d_hlg_reallocate_nz.o \
|
||||
psb_d_hlg_scal.o \
|
||||
psb_d_hlg_scals.o \
|
||||
psb_d_hlg_from_gpu.o \
|
||||
psb_d_hlg_to_gpu.o \
|
||||
psb_d_hlg_vect_mv.o \
|
||||
psb_s_hlg_allocate_mnnz.o \
|
||||
psb_s_hlg_csmm.o \
|
||||
psb_s_hlg_csmv.o \
|
||||
psb_s_hlg_inner_vect_sv.o \
|
||||
psb_s_hlg_mold.o \
|
||||
psb_s_hlg_reallocate_nz.o \
|
||||
psb_s_hlg_scal.o \
|
||||
psb_s_hlg_scals.o \
|
||||
psb_s_hlg_from_gpu.o \
|
||||
psb_s_hlg_to_gpu.o \
|
||||
psb_s_hlg_vect_mv.o \
|
||||
psb_s_mv_hlg_from_coo.o \
|
||||
psb_s_cp_hlg_from_coo.o \
|
||||
psb_s_mv_hlg_from_fmt.o \
|
||||
psb_d_mv_hlg_from_coo.o \
|
||||
psb_d_cp_hlg_from_coo.o \
|
||||
psb_d_mv_hlg_from_fmt.o \
|
||||
psb_s_hybg_allocate_mnnz.o \
|
||||
psb_s_hybg_csmm.o \
|
||||
psb_s_hybg_csmv.o \
|
||||
psb_s_hybg_reallocate_nz.o \
|
||||
psb_s_hybg_scal.o \
|
||||
psb_s_hybg_scals.o \
|
||||
psb_s_hybg_to_gpu.o \
|
||||
psb_s_hybg_vect_mv.o \
|
||||
psb_s_hybg_inner_vect_sv.o \
|
||||
psb_s_cp_hybg_from_coo.o \
|
||||
psb_s_cp_hybg_from_fmt.o \
|
||||
psb_s_mv_hybg_from_fmt.o \
|
||||
psb_s_mv_hybg_from_coo.o \
|
||||
psb_s_hybg_mold.o \
|
||||
psb_d_hybg_allocate_mnnz.o \
|
||||
psb_d_hybg_csmm.o \
|
||||
psb_d_hybg_csmv.o \
|
||||
psb_d_hybg_reallocate_nz.o \
|
||||
psb_d_hybg_scal.o \
|
||||
psb_d_hybg_scals.o \
|
||||
psb_d_hybg_to_gpu.o \
|
||||
psb_d_hybg_vect_mv.o \
|
||||
psb_d_hybg_inner_vect_sv.o \
|
||||
psb_d_cp_hybg_from_coo.o \
|
||||
psb_d_cp_hybg_from_fmt.o \
|
||||
psb_d_mv_hybg_from_fmt.o \
|
||||
psb_d_mv_hybg_from_coo.o \
|
||||
psb_d_hybg_mold.o \
|
||||
psb_z_cp_csrg_from_coo.o \
|
||||
psb_z_cp_csrg_from_fmt.o \
|
||||
psb_z_cp_elg_from_coo.o \
|
||||
psb_z_cp_elg_from_fmt.o \
|
||||
psb_c_cp_csrg_from_coo.o \
|
||||
psb_c_cp_csrg_from_fmt.o \
|
||||
psb_c_csrg_allocate_mnnz.o \
|
||||
psb_c_csrg_csmm.o \
|
||||
psb_c_csrg_csmv.o \
|
||||
psb_c_csrg_mold.o \
|
||||
psb_c_csrg_reallocate_nz.o \
|
||||
psb_c_csrg_scal.o \
|
||||
psb_c_csrg_scals.o \
|
||||
psb_c_csrg_from_gpu.o \
|
||||
psb_c_csrg_to_gpu.o \
|
||||
psb_c_csrg_vect_mv.o \
|
||||
psb_c_csrg_inner_vect_sv.o \
|
||||
psb_z_csrg_allocate_mnnz.o \
|
||||
psb_z_csrg_csmm.o \
|
||||
psb_z_csrg_csmv.o \
|
||||
psb_z_csrg_mold.o \
|
||||
psb_z_csrg_reallocate_nz.o \
|
||||
psb_z_csrg_scal.o \
|
||||
psb_z_csrg_scals.o \
|
||||
psb_z_csrg_from_gpu.o \
|
||||
psb_z_csrg_to_gpu.o \
|
||||
psb_z_csrg_vect_mv.o \
|
||||
psb_z_csrg_inner_vect_sv.o \
|
||||
psb_z_elg_allocate_mnnz.o \
|
||||
psb_z_elg_asb.o \
|
||||
psb_z_elg_csmm.o \
|
||||
psb_z_elg_csmv.o \
|
||||
psb_z_elg_csput.o \
|
||||
psb_z_elg_inner_vect_sv.o \
|
||||
psb_z_elg_mold.o \
|
||||
psb_z_elg_reallocate_nz.o \
|
||||
psb_z_elg_scal.o \
|
||||
psb_z_elg_scals.o \
|
||||
psb_z_elg_to_gpu.o \
|
||||
psb_z_elg_from_gpu.o \
|
||||
psb_z_elg_vect_mv.o \
|
||||
psb_z_mv_csrg_from_coo.o \
|
||||
psb_z_mv_csrg_from_fmt.o \
|
||||
psb_z_mv_elg_from_coo.o \
|
||||
psb_z_mv_elg_from_fmt.o \
|
||||
psb_c_mv_csrg_from_coo.o \
|
||||
psb_c_mv_csrg_from_fmt.o \
|
||||
psb_c_cp_elg_from_coo.o \
|
||||
psb_c_cp_elg_from_fmt.o \
|
||||
psb_c_elg_allocate_mnnz.o \
|
||||
psb_c_elg_asb.o \
|
||||
psb_c_elg_csmm.o \
|
||||
psb_c_elg_csmv.o \
|
||||
psb_c_elg_csput.o \
|
||||
psb_c_elg_inner_vect_sv.o \
|
||||
psb_c_elg_mold.o \
|
||||
psb_c_elg_reallocate_nz.o \
|
||||
psb_c_elg_scal.o \
|
||||
psb_c_elg_scals.o \
|
||||
psb_c_elg_to_gpu.o \
|
||||
psb_c_elg_from_gpu.o \
|
||||
psb_c_elg_vect_mv.o \
|
||||
psb_c_mv_elg_from_coo.o \
|
||||
psb_c_mv_elg_from_fmt.o \
|
||||
psb_c_cp_hlg_from_fmt.o \
|
||||
psb_c_cp_hlg_from_coo.o \
|
||||
psb_z_cp_hlg_from_fmt.o \
|
||||
psb_z_cp_hlg_from_coo.o \
|
||||
psb_z_hlg_allocate_mnnz.o \
|
||||
psb_z_hlg_csmm.o \
|
||||
psb_z_hlg_csmv.o \
|
||||
psb_z_hlg_inner_vect_sv.o \
|
||||
psb_z_hlg_mold.o \
|
||||
psb_z_hlg_reallocate_nz.o \
|
||||
psb_z_hlg_scal.o \
|
||||
psb_z_hlg_scals.o \
|
||||
psb_z_hlg_from_gpu.o \
|
||||
psb_z_hlg_to_gpu.o \
|
||||
psb_z_hlg_vect_mv.o \
|
||||
psb_c_hlg_allocate_mnnz.o \
|
||||
psb_c_hlg_csmm.o \
|
||||
psb_c_hlg_csmv.o \
|
||||
psb_c_hlg_inner_vect_sv.o \
|
||||
psb_c_hlg_mold.o \
|
||||
psb_c_hlg_reallocate_nz.o \
|
||||
psb_c_hlg_scal.o \
|
||||
psb_c_hlg_scals.o \
|
||||
psb_c_hlg_from_gpu.o \
|
||||
psb_c_hlg_to_gpu.o \
|
||||
psb_c_hlg_vect_mv.o \
|
||||
psb_c_mv_hlg_from_coo.o \
|
||||
psb_c_cp_hlg_from_coo.o \
|
||||
psb_c_mv_hlg_from_fmt.o \
|
||||
psb_z_mv_hlg_from_coo.o \
|
||||
psb_z_cp_hlg_from_coo.o \
|
||||
psb_z_mv_hlg_from_fmt.o \
|
||||
psb_c_hybg_allocate_mnnz.o \
|
||||
psb_c_hybg_csmm.o \
|
||||
psb_c_hybg_csmv.o \
|
||||
psb_c_hybg_reallocate_nz.o \
|
||||
psb_c_hybg_scal.o \
|
||||
psb_c_hybg_scals.o \
|
||||
psb_c_hybg_to_gpu.o \
|
||||
psb_c_hybg_vect_mv.o \
|
||||
psb_c_hybg_inner_vect_sv.o \
|
||||
psb_c_cp_hybg_from_coo.o \
|
||||
psb_c_cp_hybg_from_fmt.o \
|
||||
psb_c_mv_hybg_from_fmt.o \
|
||||
psb_c_mv_hybg_from_coo.o \
|
||||
psb_c_hybg_mold.o \
|
||||
psb_z_hybg_allocate_mnnz.o \
|
||||
psb_z_hybg_csmm.o \
|
||||
psb_z_hybg_csmv.o \
|
||||
psb_z_hybg_reallocate_nz.o \
|
||||
psb_z_hybg_scal.o \
|
||||
psb_z_hybg_scals.o \
|
||||
psb_z_hybg_to_gpu.o \
|
||||
psb_z_hybg_vect_mv.o \
|
||||
psb_z_hybg_inner_vect_sv.o \
|
||||
psb_z_cp_hybg_from_coo.o \
|
||||
psb_z_cp_hybg_from_fmt.o \
|
||||
psb_z_mv_hybg_from_fmt.o \
|
||||
psb_z_mv_hybg_from_coo.o \
|
||||
psb_z_hybg_mold.o \
|
||||
psb_d_cp_diag_from_coo.o \
|
||||
psb_d_mv_diag_from_coo.o \
|
||||
psb_d_diag_to_gpu.o \
|
||||
psb_d_diag_csmv.o \
|
||||
psb_d_diag_mold.o \
|
||||
psb_d_diag_vect_mv.o \
|
||||
psb_d_cp_hdiag_from_coo.o \
|
||||
psb_d_mv_hdiag_from_coo.o \
|
||||
psb_d_hdiag_to_gpu.o \
|
||||
psb_d_hdiag_csmv.o \
|
||||
psb_d_hdiag_mold.o \
|
||||
psb_d_hdiag_vect_mv.o \
|
||||
psb_s_cp_hdiag_from_coo.o \
|
||||
psb_s_mv_hdiag_from_coo.o \
|
||||
psb_s_hdiag_to_gpu.o \
|
||||
psb_s_hdiag_csmv.o \
|
||||
psb_s_hdiag_mold.o \
|
||||
psb_s_hdiag_vect_mv.o \
|
||||
psb_s_dnsg_mat_impl.o \
|
||||
psb_d_dnsg_mat_impl.o \
|
||||
psb_c_dnsg_mat_impl.o \
|
||||
psb_z_dnsg_mat_impl.o
|
||||
psb_d_cuda_cp_csrg_from_coo.o \
|
||||
psb_d_cuda_cp_csrg_from_fmt.o \
|
||||
psb_d_cuda_cp_elg_from_coo.o \
|
||||
psb_d_cuda_cp_elg_from_fmt.o \
|
||||
psb_s_cuda_cp_csrg_from_coo.o \
|
||||
psb_s_cuda_cp_csrg_from_fmt.o \
|
||||
psb_s_cuda_csrg_allocate_mnnz.o \
|
||||
psb_s_cuda_csrg_csmm.o \
|
||||
psb_s_cuda_csrg_csmv.o \
|
||||
psb_s_cuda_csrg_mold.o \
|
||||
psb_s_cuda_csrg_reallocate_nz.o \
|
||||
psb_s_cuda_csrg_scal.o \
|
||||
psb_s_cuda_csrg_scals.o \
|
||||
psb_s_cuda_csrg_from_gpu.o \
|
||||
psb_s_cuda_csrg_to_gpu.o \
|
||||
psb_s_cuda_csrg_vect_mv.o \
|
||||
psb_s_cuda_csrg_inner_vect_sv.o \
|
||||
psb_d_cuda_csrg_allocate_mnnz.o \
|
||||
psb_d_cuda_csrg_csmm.o \
|
||||
psb_d_cuda_csrg_csmv.o \
|
||||
psb_d_cuda_csrg_mold.o \
|
||||
psb_d_cuda_csrg_reallocate_nz.o \
|
||||
psb_d_cuda_csrg_scal.o \
|
||||
psb_d_cuda_csrg_scals.o \
|
||||
psb_d_cuda_csrg_from_gpu.o \
|
||||
psb_d_cuda_csrg_to_gpu.o \
|
||||
psb_d_cuda_csrg_vect_mv.o \
|
||||
psb_d_cuda_csrg_inner_vect_sv.o \
|
||||
psb_d_cuda_elg_allocate_mnnz.o \
|
||||
psb_d_cuda_elg_asb.o \
|
||||
psb_d_cuda_elg_csmm.o \
|
||||
psb_d_cuda_elg_csmv.o \
|
||||
psb_d_cuda_elg_csput.o \
|
||||
psb_d_cuda_elg_from_gpu.o \
|
||||
psb_d_cuda_elg_inner_vect_sv.o \
|
||||
psb_d_cuda_elg_mold.o \
|
||||
psb_d_cuda_elg_reallocate_nz.o \
|
||||
psb_d_cuda_elg_scal.o \
|
||||
psb_d_cuda_elg_scals.o \
|
||||
psb_d_cuda_elg_to_gpu.o \
|
||||
psb_d_cuda_elg_vect_mv.o \
|
||||
psb_d_cuda_mv_csrg_from_coo.o \
|
||||
psb_d_cuda_mv_csrg_from_fmt.o \
|
||||
psb_d_cuda_mv_elg_from_coo.o \
|
||||
psb_d_cuda_mv_elg_from_fmt.o \
|
||||
psb_s_cuda_mv_csrg_from_coo.o \
|
||||
psb_s_cuda_mv_csrg_from_fmt.o \
|
||||
psb_s_cuda_cp_elg_from_coo.o \
|
||||
psb_s_cuda_cp_elg_from_fmt.o \
|
||||
psb_s_cuda_elg_allocate_mnnz.o \
|
||||
psb_s_cuda_elg_asb.o \
|
||||
psb_s_cuda_elg_csmm.o \
|
||||
psb_s_cuda_elg_csmv.o \
|
||||
psb_s_cuda_elg_csput.o \
|
||||
psb_s_cuda_elg_inner_vect_sv.o \
|
||||
psb_s_cuda_elg_mold.o \
|
||||
psb_s_cuda_elg_reallocate_nz.o \
|
||||
psb_s_cuda_elg_scal.o \
|
||||
psb_s_cuda_elg_scals.o \
|
||||
psb_s_cuda_elg_to_gpu.o \
|
||||
psb_s_cuda_elg_from_gpu.o \
|
||||
psb_s_cuda_elg_vect_mv.o \
|
||||
psb_s_cuda_mv_elg_from_coo.o \
|
||||
psb_s_cuda_mv_elg_from_fmt.o \
|
||||
psb_s_cuda_cp_hlg_from_fmt.o \
|
||||
psb_s_cuda_cp_hlg_from_coo.o \
|
||||
psb_d_cuda_cp_hlg_from_fmt.o \
|
||||
psb_d_cuda_cp_hlg_from_coo.o \
|
||||
psb_d_cuda_hlg_allocate_mnnz.o \
|
||||
psb_d_cuda_hlg_csmm.o \
|
||||
psb_d_cuda_hlg_csmv.o \
|
||||
psb_d_cuda_hlg_inner_vect_sv.o \
|
||||
psb_d_cuda_hlg_mold.o \
|
||||
psb_d_cuda_hlg_reallocate_nz.o \
|
||||
psb_d_cuda_hlg_scal.o \
|
||||
psb_d_cuda_hlg_scals.o \
|
||||
psb_d_cuda_hlg_from_gpu.o \
|
||||
psb_d_cuda_hlg_to_gpu.o \
|
||||
psb_d_cuda_hlg_vect_mv.o \
|
||||
psb_s_cuda_hlg_allocate_mnnz.o \
|
||||
psb_s_cuda_hlg_csmm.o \
|
||||
psb_s_cuda_hlg_csmv.o \
|
||||
psb_s_cuda_hlg_inner_vect_sv.o \
|
||||
psb_s_cuda_hlg_mold.o \
|
||||
psb_s_cuda_hlg_reallocate_nz.o \
|
||||
psb_s_cuda_hlg_scal.o \
|
||||
psb_s_cuda_hlg_scals.o \
|
||||
psb_s_cuda_hlg_from_gpu.o \
|
||||
psb_s_cuda_hlg_to_gpu.o \
|
||||
psb_s_cuda_hlg_vect_mv.o \
|
||||
psb_s_cuda_mv_hlg_from_coo.o \
|
||||
psb_s_cuda_cp_hlg_from_coo.o \
|
||||
psb_s_cuda_mv_hlg_from_fmt.o \
|
||||
psb_d_cuda_mv_hlg_from_coo.o \
|
||||
psb_d_cuda_cp_hlg_from_coo.o \
|
||||
psb_d_cuda_mv_hlg_from_fmt.o \
|
||||
psb_s_cuda_hybg_allocate_mnnz.o \
|
||||
psb_s_cuda_hybg_csmm.o \
|
||||
psb_s_cuda_hybg_csmv.o \
|
||||
psb_s_cuda_hybg_reallocate_nz.o \
|
||||
psb_s_cuda_hybg_scal.o \
|
||||
psb_s_cuda_hybg_scals.o \
|
||||
psb_s_cuda_hybg_to_gpu.o \
|
||||
psb_s_cuda_hybg_vect_mv.o \
|
||||
psb_s_cuda_hybg_inner_vect_sv.o \
|
||||
psb_s_cuda_cp_hybg_from_coo.o \
|
||||
psb_s_cuda_cp_hybg_from_fmt.o \
|
||||
psb_s_cuda_mv_hybg_from_fmt.o \
|
||||
psb_s_cuda_mv_hybg_from_coo.o \
|
||||
psb_s_cuda_hybg_mold.o \
|
||||
psb_d_cuda_hybg_allocate_mnnz.o \
|
||||
psb_d_cuda_hybg_csmm.o \
|
||||
psb_d_cuda_hybg_csmv.o \
|
||||
psb_d_cuda_hybg_reallocate_nz.o \
|
||||
psb_d_cuda_hybg_scal.o \
|
||||
psb_d_cuda_hybg_scals.o \
|
||||
psb_d_cuda_hybg_to_gpu.o \
|
||||
psb_d_cuda_hybg_vect_mv.o \
|
||||
psb_d_cuda_hybg_inner_vect_sv.o \
|
||||
psb_d_cuda_cp_hybg_from_coo.o \
|
||||
psb_d_cuda_cp_hybg_from_fmt.o \
|
||||
psb_d_cuda_mv_hybg_from_fmt.o \
|
||||
psb_d_cuda_mv_hybg_from_coo.o \
|
||||
psb_d_cuda_hybg_mold.o \
|
||||
psb_z_cuda_cp_csrg_from_coo.o \
|
||||
psb_z_cuda_cp_csrg_from_fmt.o \
|
||||
psb_z_cuda_cp_elg_from_coo.o \
|
||||
psb_z_cuda_cp_elg_from_fmt.o \
|
||||
psb_c_cuda_cp_csrg_from_coo.o \
|
||||
psb_c_cuda_cp_csrg_from_fmt.o \
|
||||
psb_c_cuda_csrg_allocate_mnnz.o \
|
||||
psb_c_cuda_csrg_csmm.o \
|
||||
psb_c_cuda_csrg_csmv.o \
|
||||
psb_c_cuda_csrg_mold.o \
|
||||
psb_c_cuda_csrg_reallocate_nz.o \
|
||||
psb_c_cuda_csrg_scal.o \
|
||||
psb_c_cuda_csrg_scals.o \
|
||||
psb_c_cuda_csrg_from_gpu.o \
|
||||
psb_c_cuda_csrg_to_gpu.o \
|
||||
psb_c_cuda_csrg_vect_mv.o \
|
||||
psb_c_cuda_csrg_inner_vect_sv.o \
|
||||
psb_z_cuda_csrg_allocate_mnnz.o \
|
||||
psb_z_cuda_csrg_csmm.o \
|
||||
psb_z_cuda_csrg_csmv.o \
|
||||
psb_z_cuda_csrg_mold.o \
|
||||
psb_z_cuda_csrg_reallocate_nz.o \
|
||||
psb_z_cuda_csrg_scal.o \
|
||||
psb_z_cuda_csrg_scals.o \
|
||||
psb_z_cuda_csrg_from_gpu.o \
|
||||
psb_z_cuda_csrg_to_gpu.o \
|
||||
psb_z_cuda_csrg_vect_mv.o \
|
||||
psb_z_cuda_csrg_inner_vect_sv.o \
|
||||
psb_z_cuda_elg_allocate_mnnz.o \
|
||||
psb_z_cuda_elg_asb.o \
|
||||
psb_z_cuda_elg_csmm.o \
|
||||
psb_z_cuda_elg_csmv.o \
|
||||
psb_z_cuda_elg_csput.o \
|
||||
psb_z_cuda_elg_inner_vect_sv.o \
|
||||
psb_z_cuda_elg_mold.o \
|
||||
psb_z_cuda_elg_reallocate_nz.o \
|
||||
psb_z_cuda_elg_scal.o \
|
||||
psb_z_cuda_elg_scals.o \
|
||||
psb_z_cuda_elg_to_gpu.o \
|
||||
psb_z_cuda_elg_from_gpu.o \
|
||||
psb_z_cuda_elg_vect_mv.o \
|
||||
psb_z_cuda_mv_csrg_from_coo.o \
|
||||
psb_z_cuda_mv_csrg_from_fmt.o \
|
||||
psb_z_cuda_mv_elg_from_coo.o \
|
||||
psb_z_cuda_mv_elg_from_fmt.o \
|
||||
psb_c_cuda_mv_csrg_from_coo.o \
|
||||
psb_c_cuda_mv_csrg_from_fmt.o \
|
||||
psb_c_cuda_cp_elg_from_coo.o \
|
||||
psb_c_cuda_cp_elg_from_fmt.o \
|
||||
psb_c_cuda_elg_allocate_mnnz.o \
|
||||
psb_c_cuda_elg_asb.o \
|
||||
psb_c_cuda_elg_csmm.o \
|
||||
psb_c_cuda_elg_csmv.o \
|
||||
psb_c_cuda_elg_csput.o \
|
||||
psb_c_cuda_elg_inner_vect_sv.o \
|
||||
psb_c_cuda_elg_mold.o \
|
||||
psb_c_cuda_elg_reallocate_nz.o \
|
||||
psb_c_cuda_elg_scal.o \
|
||||
psb_c_cuda_elg_scals.o \
|
||||
psb_c_cuda_elg_to_gpu.o \
|
||||
psb_c_cuda_elg_from_gpu.o \
|
||||
psb_c_cuda_elg_vect_mv.o \
|
||||
psb_c_cuda_mv_elg_from_coo.o \
|
||||
psb_c_cuda_mv_elg_from_fmt.o \
|
||||
psb_c_cuda_cp_hlg_from_fmt.o \
|
||||
psb_c_cuda_cp_hlg_from_coo.o \
|
||||
psb_z_cuda_cp_hlg_from_fmt.o \
|
||||
psb_z_cuda_cp_hlg_from_coo.o \
|
||||
psb_z_cuda_hlg_allocate_mnnz.o \
|
||||
psb_z_cuda_hlg_csmm.o \
|
||||
psb_z_cuda_hlg_csmv.o \
|
||||
psb_z_cuda_hlg_inner_vect_sv.o \
|
||||
psb_z_cuda_hlg_mold.o \
|
||||
psb_z_cuda_hlg_reallocate_nz.o \
|
||||
psb_z_cuda_hlg_scal.o \
|
||||
psb_z_cuda_hlg_scals.o \
|
||||
psb_z_cuda_hlg_from_gpu.o \
|
||||
psb_z_cuda_hlg_to_gpu.o \
|
||||
psb_z_cuda_hlg_vect_mv.o \
|
||||
psb_c_cuda_hlg_allocate_mnnz.o \
|
||||
psb_c_cuda_hlg_csmm.o \
|
||||
psb_c_cuda_hlg_csmv.o \
|
||||
psb_c_cuda_hlg_inner_vect_sv.o \
|
||||
psb_c_cuda_hlg_mold.o \
|
||||
psb_c_cuda_hlg_reallocate_nz.o \
|
||||
psb_c_cuda_hlg_scal.o \
|
||||
psb_c_cuda_hlg_scals.o \
|
||||
psb_c_cuda_hlg_from_gpu.o \
|
||||
psb_c_cuda_hlg_to_gpu.o \
|
||||
psb_c_cuda_hlg_vect_mv.o \
|
||||
psb_c_cuda_mv_hlg_from_coo.o \
|
||||
psb_c_cuda_cp_hlg_from_coo.o \
|
||||
psb_c_cuda_mv_hlg_from_fmt.o \
|
||||
psb_z_cuda_mv_hlg_from_coo.o \
|
||||
psb_z_cuda_cp_hlg_from_coo.o \
|
||||
psb_z_cuda_mv_hlg_from_fmt.o \
|
||||
psb_c_cuda_hybg_allocate_mnnz.o \
|
||||
psb_c_cuda_hybg_csmm.o \
|
||||
psb_c_cuda_hybg_csmv.o \
|
||||
psb_c_cuda_hybg_reallocate_nz.o \
|
||||
psb_c_cuda_hybg_scal.o \
|
||||
psb_c_cuda_hybg_scals.o \
|
||||
psb_c_cuda_hybg_to_gpu.o \
|
||||
psb_c_cuda_hybg_vect_mv.o \
|
||||
psb_c_cuda_hybg_inner_vect_sv.o \
|
||||
psb_c_cuda_cp_hybg_from_coo.o \
|
||||
psb_c_cuda_cp_hybg_from_fmt.o \
|
||||
psb_c_cuda_mv_hybg_from_fmt.o \
|
||||
psb_c_cuda_mv_hybg_from_coo.o \
|
||||
psb_c_cuda_hybg_mold.o \
|
||||
psb_z_cuda_hybg_allocate_mnnz.o \
|
||||
psb_z_cuda_hybg_csmm.o \
|
||||
psb_z_cuda_hybg_csmv.o \
|
||||
psb_z_cuda_hybg_reallocate_nz.o \
|
||||
psb_z_cuda_hybg_scal.o \
|
||||
psb_z_cuda_hybg_scals.o \
|
||||
psb_z_cuda_hybg_to_gpu.o \
|
||||
psb_z_cuda_hybg_vect_mv.o \
|
||||
psb_z_cuda_hybg_inner_vect_sv.o \
|
||||
psb_z_cuda_cp_hybg_from_coo.o \
|
||||
psb_z_cuda_cp_hybg_from_fmt.o \
|
||||
psb_z_cuda_mv_hybg_from_fmt.o \
|
||||
psb_z_cuda_mv_hybg_from_coo.o \
|
||||
psb_z_cuda_hybg_mold.o \
|
||||
psb_d_cuda_cp_diag_from_coo.o \
|
||||
psb_d_cuda_mv_diag_from_coo.o \
|
||||
psb_d_cuda_diag_to_gpu.o \
|
||||
psb_d_cuda_diag_csmv.o \
|
||||
psb_d_cuda_diag_mold.o \
|
||||
psb_d_cuda_diag_vect_mv.o \
|
||||
psb_d_cuda_cp_hdiag_from_coo.o \
|
||||
psb_d_cuda_mv_hdiag_from_coo.o \
|
||||
psb_d_cuda_hdiag_to_gpu.o \
|
||||
psb_d_cuda_hdiag_csmv.o \
|
||||
psb_d_cuda_hdiag_mold.o \
|
||||
psb_d_cuda_hdiag_vect_mv.o \
|
||||
psb_s_cuda_cp_hdiag_from_coo.o \
|
||||
psb_s_cuda_mv_hdiag_from_coo.o \
|
||||
psb_s_cuda_hdiag_to_gpu.o \
|
||||
psb_s_cuda_hdiag_csmv.o \
|
||||
psb_s_cuda_hdiag_mold.o \
|
||||
psb_s_cuda_hdiag_vect_mv.o \
|
||||
psb_s_cuda_dnsg_mat_impl.o \
|
||||
psb_d_cuda_dnsg_mat_impl.o \
|
||||
psb_c_cuda_dnsg_mat_impl.o \
|
||||
psb_z_cuda_dnsg_mat_impl.o
|
||||
|
||||
|
||||
objs: $(OBJS)
|
||||
|
||||
@@ -29,18 +29,18 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_c_cp_csrg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_csrg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_cp_csrg_from_coo
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_cp_csrg_from_coo
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -59,4 +59,4 @@ subroutine psb_c_cp_csrg_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_csrg_from_coo
|
||||
end subroutine psb_c_cuda_cp_csrg_from_coo
|
||||
@@ -29,19 +29,19 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_c_cp_csrg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_cp_csrg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_cp_csrg_from_fmt
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_cp_csrg_from_fmt
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
!use iso_c_binding
|
||||
implicit none
|
||||
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,4 +58,4 @@ subroutine psb_c_cp_csrg_from_fmt(a,b,info)
|
||||
#endif
|
||||
end select
|
||||
|
||||
end subroutine psb_c_cp_csrg_from_fmt
|
||||
end subroutine psb_c_cuda_cp_csrg_from_fmt
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_cp_diag_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_diag_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_diag_mat_mod, psb_protect_name => psb_c_cp_diag_from_coo
|
||||
use psb_c_cuda_diag_mat_mod, psb_protect_name => psb_c_cuda_cp_diag_from_coo
|
||||
#else
|
||||
use psb_c_diag_mat_mod
|
||||
use psb_c_cuda_diag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -61,4 +61,4 @@ subroutine psb_c_cp_diag_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_diag_from_coo
|
||||
end subroutine psb_c_cuda_cp_diag_from_coo
|
||||
@@ -30,21 +30,21 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_cp_elg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_elg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_cp_elg_from_coo
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_cp_elg_from_coo
|
||||
use psi_ext_util_mod
|
||||
use psb_gpu_env_mod
|
||||
use psb_cuda_env_mod
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,7 +58,7 @@ subroutine psb_c_cp_elg_from_coo(a,b,info)
|
||||
|
||||
info = psb_success_
|
||||
#ifdef HAVE_SPGPU
|
||||
hacksize = max(1,psb_gpu_WarpSize())
|
||||
hacksize = max(1,psb_cuda_WarpSize())
|
||||
#else
|
||||
hacksize = 1
|
||||
#endif
|
||||
@@ -181,4 +181,4 @@ contains
|
||||
|
||||
end subroutine psi_c_count_ell_from_coo
|
||||
|
||||
end subroutine psb_c_cp_elg_from_coo
|
||||
end subroutine psb_c_cuda_cp_elg_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_cp_elg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_cp_elg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_cp_elg_from_fmt
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_cp_elg_from_fmt
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -98,4 +98,4 @@ subroutine psb_c_cp_elg_from_fmt(a,b,info)
|
||||
if (info == psb_success_) call a%mv_from_coo(tmp,info)
|
||||
end select
|
||||
|
||||
end subroutine psb_c_cp_elg_from_fmt
|
||||
end subroutine psb_c_cuda_cp_elg_from_fmt
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_cp_hdiag_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_hdiag_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hdiagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hdiag_mat_mod, psb_protect_name => psb_c_cp_hdiag_from_coo
|
||||
use psb_gpu_env_mod
|
||||
use psb_c_cuda_hdiag_mat_mod, psb_protect_name => psb_c_cuda_cp_hdiag_from_coo
|
||||
use psb_cuda_env_mod
|
||||
#else
|
||||
use psb_c_hdiag_mat_mod
|
||||
use psb_c_cuda_hdiag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -54,7 +54,7 @@ subroutine psb_c_cp_hdiag_from_coo(a,b,info)
|
||||
info = psb_success_
|
||||
|
||||
#ifdef HAVE_SPGPU
|
||||
a%hacksize = psb_gpu_WarpSize()
|
||||
a%hacksize = psb_cuda_WarpSize()
|
||||
#endif
|
||||
|
||||
call a%psb_c_hdia_sparse_mat%cp_from_coo(b,info)
|
||||
@@ -70,4 +70,4 @@ subroutine psb_c_cp_hdiag_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_hdiag_from_coo
|
||||
end subroutine psb_c_cuda_cp_hdiag_from_coo
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_cp_hlg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_hlg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_gpu_env_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_cp_hlg_from_coo
|
||||
use psb_cuda_env_mod
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_cp_hlg_from_coo
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -62,7 +62,7 @@ subroutine psb_c_cp_hlg_from_coo(a,b,info)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
#ifdef HAVE_SPGPU
|
||||
hksz = max(1,psb_gpu_WarpSize())
|
||||
hksz = max(1,psb_cuda_WarpSize())
|
||||
#else
|
||||
hksz = psi_get_hksz()
|
||||
#endif
|
||||
@@ -195,4 +195,4 @@ contains
|
||||
!!$ write(*,*) 'End of psi_comput_hckoff ',info
|
||||
end subroutine psi_compute_hckoff_from_coo
|
||||
|
||||
end subroutine psb_c_cp_hlg_from_coo
|
||||
end subroutine psb_c_cuda_cp_hlg_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_cp_hlg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_cp_hlg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_cp_hlg_from_fmt
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_cp_hlg_from_fmt
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -65,4 +65,4 @@ subroutine psb_c_cp_hlg_from_fmt(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_hlg_from_fmt
|
||||
end subroutine psb_c_cuda_cp_hlg_from_fmt
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_cp_hybg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_hybg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_cp_hybg_from_coo
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_cp_hybg_from_coo
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -60,5 +60,5 @@ subroutine psb_c_cp_hybg_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_hybg_from_coo
|
||||
end subroutine psb_c_cuda_cp_hybg_from_coo
|
||||
#endif
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_cp_hybg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_cp_hybg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_cp_hybg_from_fmt
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_cp_hybg_from_fmt
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,5 +58,5 @@ subroutine psb_c_cp_hybg_from_fmt(a,b,info)
|
||||
#endif
|
||||
end select
|
||||
|
||||
end subroutine psb_c_cp_hybg_from_fmt
|
||||
end subroutine psb_c_cuda_cp_hybg_from_fmt
|
||||
#endif
|
||||
+5
-5
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_allocate_mnnz(m,n,a,nz)
|
||||
subroutine psb_c_cuda_csrg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_allocate_mnnz
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_allocate_mnnz
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m,n
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(in), optional :: nz
|
||||
Integer(Psb_ipk_) :: err_act, info, nz_,ld
|
||||
character(len=20) :: name='allocate_mnz'
|
||||
@@ -65,4 +65,4 @@ subroutine psb_c_csrg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csrg_allocate_mnnz
|
||||
end subroutine psb_c_cuda_csrg_allocate_mnnz
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_csmm
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_csmm
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
||||
complex(psb_spk_), intent(inout) :: y(:,:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -131,4 +131,4 @@ subroutine psb_c_csrg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_csrg_csmm
|
||||
end subroutine psb_c_cuda_csrg_csmm
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_csmv
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_csmv
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
||||
complex(psb_spk_), intent(inout) :: y(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -55,7 +55,7 @@ subroutine psb_c_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpY
|
||||
logical :: tra
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_csrg_csmv'
|
||||
character(len=20) :: name='c_cuda_csrg_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -136,4 +136,4 @@ subroutine psb_c_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_csrg_csmv
|
||||
end subroutine psb_c_cuda_csrg_csmv
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_from_gpu(a,info)
|
||||
subroutine psb_c_cuda_csrg_from_gpu(a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_from_gpu
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_from_gpu
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: m, n, nz
|
||||
@@ -70,4 +70,4 @@ subroutine psb_c_csrg_from_gpu(a,info)
|
||||
call a%set_sync()
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_csrg_from_gpu
|
||||
end subroutine psb_c_cuda_csrg_from_gpu
|
||||
+9
-9
@@ -29,19 +29,19 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_c_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_inner_vect_sv
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_inner_vect_sv
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x, y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -51,7 +51,7 @@ subroutine psb_c_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_csrg_inner_vect_sv'
|
||||
character(len=20) :: name='c_cuda_csrg_inner_vect_sv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_get_erraction(err_act)
|
||||
@@ -83,9 +83,9 @@ subroutine psb_c_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
call y%set_host()
|
||||
else
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= dzero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -133,4 +133,4 @@ subroutine psb_c_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csrg_inner_vect_sv
|
||||
end subroutine psb_c_cuda_csrg_inner_vect_sv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_mold(a,b,info)
|
||||
subroutine psb_c_cuda_csrg_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_mold
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_mold
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_c_csrg_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_csrg_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_csrg_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,4 +62,4 @@ subroutine psb_c_csrg_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csrg_mold
|
||||
end subroutine psb_c_cuda_csrg_mold
|
||||
+6
-6
@@ -30,21 +30,21 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_reallocate_nz(nz,a)
|
||||
subroutine psb_c_cuda_csrg_reallocate_nz(nz,a)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_reallocate_nz
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_reallocate_nz
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: nz
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_) :: m, nzrm,ld
|
||||
Integer(Psb_ipk_) :: err_act, info
|
||||
character(len=20) :: name='c_csrg_reallocate_nz'
|
||||
character(len=20) :: name='c_cuda_csrg_reallocate_nz'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -67,4 +67,4 @@ subroutine psb_c_csrg_reallocate_nz(nz,a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csrg_reallocate_nz
|
||||
end subroutine psb_c_cuda_csrg_reallocate_nz
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_scal(d,a,info,side)
|
||||
subroutine psb_c_cuda_csrg_scal(d,a,info,side)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_scal
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_scal
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character, intent(in), optional :: side
|
||||
@@ -70,4 +70,4 @@ subroutine psb_c_csrg_scal(d,a,info,side)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csrg_scal
|
||||
end subroutine psb_c_cuda_csrg_scal
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_scals(d,a,info)
|
||||
subroutine psb_c_cuda_csrg_scals(d,a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_scals
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_scals
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -68,4 +68,4 @@ subroutine psb_c_csrg_scals(d,a,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csrg_scals
|
||||
end subroutine psb_c_cuda_csrg_scals
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_to_gpu(a,info,nzrm)
|
||||
subroutine psb_c_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_to_gpu
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_to_gpu
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: nzrm
|
||||
|
||||
@@ -322,4 +322,4 @@ subroutine psb_c_csrg_to_gpu(a,info,nzrm)
|
||||
end if
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_csrg_to_gpu
|
||||
end subroutine psb_c_cuda_csrg_to_gpu
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_csrg_vect_mv
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_csrg_vect_mv
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -54,7 +54,7 @@ subroutine psb_c_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_csrg_vect_mv'
|
||||
character(len=20) :: name='c_cuda_csrg_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -83,9 +83,9 @@ subroutine psb_c_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= czero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -122,4 +122,4 @@ subroutine psb_c_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
end subroutine psb_c_csrg_vect_mv
|
||||
end subroutine psb_c_cuda_csrg_vect_mv
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_diag_mat_mod, psb_protect_name => psb_c_diag_csmv
|
||||
use psb_c_cuda_diag_mat_mod, psb_protect_name => psb_c_cuda_diag_csmv
|
||||
#else
|
||||
use psb_c_diag_mat_mod
|
||||
use psb_c_cuda_diag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_diag_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
||||
complex(psb_spk_), intent(inout) :: y(:)
|
||||
integer, intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='c_diag_csmv'
|
||||
character(len=20) :: name='c_cuda_diag_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -133,4 +133,4 @@ subroutine psb_c_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_diag_csmv
|
||||
end subroutine psb_c_cuda_diag_csmv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_diag_mold(a,b,info)
|
||||
subroutine psb_c_cuda_diag_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_c_diag_mat_mod, psb_protect_name => psb_c_diag_mold
|
||||
use psb_c_cuda_diag_mat_mod, psb_protect_name => psb_c_cuda_diag_mold
|
||||
implicit none
|
||||
class(psb_c_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_c_diag_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_diag_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_diag_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,4 +62,4 @@ subroutine psb_c_diag_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_diag_mold
|
||||
end subroutine psb_c_cuda_diag_mold
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_diag_to_gpu(a,info,nzrm)
|
||||
subroutine psb_c_cuda_diag_to_gpu(a,info,nzrm)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_diag_mat_mod, psb_protect_name => psb_c_diag_to_gpu
|
||||
use psb_c_cuda_diag_mat_mod, psb_protect_name => psb_c_cuda_diag_to_gpu
|
||||
#else
|
||||
use psb_c_diag_mat_mod
|
||||
use psb_c_cuda_diag_mat_mod
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(psb_c_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_diag_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: nzrm
|
||||
|
||||
@@ -71,4 +71,4 @@ subroutine psb_c_diag_to_gpu(a,info,nzrm)
|
||||
! if (info /= 0) goto 9999
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_diag_to_gpu
|
||||
end subroutine psb_c_cuda_diag_to_gpu
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_diag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_diag_mat_mod, psb_protect_name => psb_c_diag_vect_mv
|
||||
use psb_c_cuda_diag_mat_mod, psb_protect_name => psb_c_cuda_diag_vect_mv
|
||||
#else
|
||||
use psb_c_diag_mat_mod
|
||||
use psb_c_cuda_diag_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_diag_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -52,7 +52,7 @@ subroutine psb_c_diag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_diag_vect_mv'
|
||||
character(len=20) :: name='c_cuda_diag_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -82,9 +82,9 @@ subroutine psb_c_diag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= dzero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -123,4 +123,4 @@ subroutine psb_c_diag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_diag_vect_mv
|
||||
end subroutine psb_c_cuda_diag_vect_mv
|
||||
@@ -29,18 +29,18 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_c_dnsg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_dnsg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_dnsg_vect_mv
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_dnsg_vect_mv
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_dnsg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -50,7 +50,7 @@ subroutine psb_c_dnsg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
character :: trans_
|
||||
complex(psb_spk_), allocatable :: rx(:), ry(:)
|
||||
Integer(Psb_ipk_) :: err_act, m, n, k
|
||||
character(len=20) :: name='c_dnsg_vect_mv'
|
||||
character(len=20) :: name='c_cuda_dnsg_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -76,9 +76,9 @@ subroutine psb_c_dnsg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
k = a%get_nrows()
|
||||
end if
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (a%is_host()) call a%sync()
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= czero) then
|
||||
@@ -117,21 +117,21 @@ subroutine psb_c_dnsg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_dnsg_vect_mv
|
||||
end subroutine psb_c_cuda_dnsg_vect_mv
|
||||
|
||||
|
||||
subroutine psb_c_dnsg_mold(a,b,info)
|
||||
subroutine psb_c_cuda_dnsg_mold(a,b,info)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_dnsg_mold
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_dnsg_mold
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_dnsg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -145,7 +145,7 @@ subroutine psb_c_dnsg_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_dnsg_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_dnsg_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -158,54 +158,54 @@ subroutine psb_c_dnsg_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_dnsg_mold
|
||||
end subroutine psb_c_cuda_dnsg_mold
|
||||
|
||||
|
||||
!!$
|
||||
!!$ interface
|
||||
!!$ subroutine psb_c_dnsg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
!!$ import :: psb_ipk_, psb_c_dnsg_sparse_mat, psb_spk_, psb_c_base_vect_type
|
||||
!!$ class(psb_c_dnsg_sparse_mat), intent(in) :: a
|
||||
!!$ subroutine psb_c_cuda_dnsg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
!!$ import :: psb_ipk_, psb_c_cuda_dnsg_sparse_mat, psb_spk_, psb_c_base_vect_type
|
||||
!!$ class(psb_c_cuda_dnsg_sparse_mat), intent(in) :: a
|
||||
!!$ complex(psb_spk_), intent(in) :: alpha, beta
|
||||
!!$ class(psb_c_base_vect_type), intent(inout) :: x, y
|
||||
!!$ integer(psb_ipk_), intent(out) :: info
|
||||
!!$ character, optional, intent(in) :: trans
|
||||
!!$ end subroutine psb_c_dnsg_inner_vect_sv
|
||||
!!$ end subroutine psb_c_cuda_dnsg_inner_vect_sv
|
||||
!!$ end interface
|
||||
|
||||
!!$ interface
|
||||
!!$ subroutine psb_c_dnsg_reallocate_nz(nz,a)
|
||||
!!$ import :: psb_c_dnsg_sparse_mat, psb_ipk_
|
||||
!!$ subroutine psb_c_cuda_dnsg_reallocate_nz(nz,a)
|
||||
!!$ import :: psb_c_cuda_dnsg_sparse_mat, psb_ipk_
|
||||
!!$ integer(psb_ipk_), intent(in) :: nz
|
||||
!!$ class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
!!$ end subroutine psb_c_dnsg_reallocate_nz
|
||||
!!$ class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
!!$ end subroutine psb_c_cuda_dnsg_reallocate_nz
|
||||
!!$ end interface
|
||||
!!$
|
||||
!!$ interface
|
||||
!!$ subroutine psb_c_dnsg_allocate_mnnz(m,n,a,nz)
|
||||
!!$ import :: psb_c_dnsg_sparse_mat, psb_ipk_
|
||||
!!$ subroutine psb_c_cuda_dnsg_allocate_mnnz(m,n,a,nz)
|
||||
!!$ import :: psb_c_cuda_dnsg_sparse_mat, psb_ipk_
|
||||
!!$ integer(psb_ipk_), intent(in) :: m,n
|
||||
!!$ class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
!!$ class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: nz
|
||||
!!$ end subroutine psb_c_dnsg_allocate_mnnz
|
||||
!!$ end subroutine psb_c_cuda_dnsg_allocate_mnnz
|
||||
!!$ end interface
|
||||
|
||||
|
||||
subroutine psb_c_dnsg_to_gpu(a,info)
|
||||
subroutine psb_c_cuda_dnsg_to_gpu(a,info)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_dnsg_to_gpu
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_dnsg_to_gpu
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act, pitch, lda
|
||||
logical, parameter :: debug=.false.
|
||||
character(len=20) :: name='c_dnsg_to_gpu'
|
||||
character(len=20) :: name='c_cuda_dnsg_to_gpu'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -226,27 +226,27 @@ subroutine psb_c_dnsg_to_gpu(a,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_dnsg_to_gpu
|
||||
end subroutine psb_c_cuda_dnsg_to_gpu
|
||||
|
||||
|
||||
|
||||
subroutine psb_c_cp_dnsg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_cp_dnsg_from_coo(a,b,info)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_cp_dnsg_from_coo
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_cp_dnsg_from_coo
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_dnsg_cp_from_coo'
|
||||
character(len=20) :: name='c_cuda_dnsg_cp_from_coo'
|
||||
integer(psb_ipk_) :: debug_level, debug_unit
|
||||
logical, parameter :: debug=.false.
|
||||
type(psb_c_coo_sparse_mat) :: tmp
|
||||
@@ -267,27 +267,27 @@ subroutine psb_c_cp_dnsg_from_coo(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_dnsg_from_coo
|
||||
end subroutine psb_c_cuda_cp_dnsg_from_coo
|
||||
|
||||
subroutine psb_c_cp_dnsg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_cp_dnsg_from_fmt(a,b,info)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_cp_dnsg_from_fmt
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_cp_dnsg_from_fmt
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
type(psb_c_coo_sparse_mat) :: tmp
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_dnsg_cp_from_fmt'
|
||||
character(len=20) :: name='c_cuda_dnsg_cp_from_fmt'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -341,29 +341,29 @@ subroutine psb_c_cp_dnsg_from_fmt(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_cp_dnsg_from_fmt
|
||||
end subroutine psb_c_cuda_cp_dnsg_from_fmt
|
||||
|
||||
|
||||
|
||||
subroutine psb_c_mv_dnsg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_dnsg_from_coo(a,b,info)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_mv_dnsg_from_coo
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_mv_dnsg_from_coo
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
logical, parameter :: debug=.false.
|
||||
character(len=20) :: name='c_dnsg_mv_from_coo'
|
||||
character(len=20) :: name='c_cuda_dnsg_mv_from_coo'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -382,28 +382,28 @@ subroutine psb_c_mv_dnsg_from_coo(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_mv_dnsg_from_coo
|
||||
end subroutine psb_c_cuda_mv_dnsg_from_coo
|
||||
|
||||
|
||||
subroutine psb_c_mv_dnsg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_mv_dnsg_from_fmt(a,b,info)
|
||||
use psb_base_mod
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use dnsdev_mod
|
||||
use psb_c_vectordev_mod
|
||||
use psb_c_dnsg_mat_mod, psb_protect_name => psb_c_mv_dnsg_from_fmt
|
||||
use psb_c_cuda_dnsg_mat_mod, psb_protect_name => psb_c_cuda_mv_dnsg_from_fmt
|
||||
#else
|
||||
use psb_c_dnsg_mat_mod
|
||||
use psb_c_cuda_dnsg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_dnsg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
|
||||
type(psb_c_coo_sparse_mat) :: tmp
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_dnsg_cp_from_fmt'
|
||||
character(len=20) :: name='c_cuda_dnsg_cp_from_fmt'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -458,4 +458,4 @@ subroutine psb_c_mv_dnsg_from_fmt(a,b,info)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_mv_dnsg_from_fmt
|
||||
end subroutine psb_c_cuda_mv_dnsg_from_fmt
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_allocate_mnnz(m,n,a,nz)
|
||||
subroutine psb_c_cuda_elg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_allocate_mnnz
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_allocate_mnnz
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m,n
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(in), optional :: nz
|
||||
Integer(Psb_ipk_) :: err_act, info, nz_,ld
|
||||
character(len=20) :: name='allocate_mnz'
|
||||
@@ -110,4 +110,4 @@ subroutine psb_c_elg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_allocate_mnnz
|
||||
end subroutine psb_c_cuda_elg_allocate_mnnz
|
||||
@@ -30,13 +30,13 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_elg_asb(a)
|
||||
subroutine psb_c_cuda_elg_asb(a)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_d_elg_mat_mod, psb_protect_name => psb_d_elg_asb
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_asb
|
||||
implicit none
|
||||
|
||||
class(psb_d_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
|
||||
integer(psb_ipk_) :: err_act, info
|
||||
character(len=20) :: name='elg_asb'
|
||||
@@ -62,4 +62,4 @@ subroutine psb_d_elg_asb(a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_elg_asb
|
||||
end subroutine psb_c_cuda_elg_asb
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_csmm
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_csmm
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
||||
complex(psb_spk_), intent(inout) :: y(:,:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_elg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_elg_csmm'
|
||||
character(len=20) :: name='c_cuda_elg_csmm'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = psb_success_
|
||||
@@ -131,4 +131,4 @@ subroutine psb_c_elg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_elg_csmm
|
||||
end subroutine psb_c_cuda_elg_csmm
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_csmv
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_csmv
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
||||
complex(psb_spk_), intent(inout) :: y(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -133,4 +133,4 @@ subroutine psb_c_elg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_csmv
|
||||
end subroutine psb_c_cuda_elg_csmv
|
||||
@@ -30,26 +30,26 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
subroutine psb_c_cuda_elg_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
|
||||
use psb_base_mod
|
||||
use iso_c_binding
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_csput_a
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_csput_a
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_elg_csput_a'
|
||||
character(len=20) :: name='c_cuda_elg_csput_a'
|
||||
logical, parameter :: debug=.false.
|
||||
integer(psb_ipk_) :: nza, i,j,k, nzl, isza, int_err(5), debug_level, debug_unit
|
||||
real(psb_dpk_) :: t1,t2,t3
|
||||
@@ -120,24 +120,24 @@ subroutine psb_c_elg_csput_a(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_csput_a
|
||||
end subroutine psb_c_cuda_elg_csput_a
|
||||
|
||||
|
||||
|
||||
subroutine psb_c_elg_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
subroutine psb_c_cuda_elg_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
|
||||
use psb_base_mod
|
||||
use iso_c_binding
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_csput_v
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_csput_v
|
||||
use psb_c_cuda_vect_mod
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_vect_type), intent(inout) :: val
|
||||
class(psb_i_base_vect_type), intent(inout) :: ia, ja
|
||||
integer(psb_ipk_), intent(in) :: nz, imin,imax,jmin,jmax
|
||||
@@ -145,7 +145,7 @@ subroutine psb_c_elg_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_elg_csput_v'
|
||||
character(len=20) :: name='c_cuda_elg_csput_v'
|
||||
logical, parameter :: debug=.false.
|
||||
integer(psb_ipk_) :: nza, i,j,k, nzl, isza, int_err(5), debug_level, debug_unit, nrw
|
||||
logical :: gpu_invoked
|
||||
@@ -199,11 +199,11 @@ subroutine psb_c_elg_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
t1=psb_wtime()
|
||||
gpu_invoked = .false.
|
||||
select type (ia)
|
||||
class is (psb_i_vect_gpu)
|
||||
class is (psb_i_vect_cuda)
|
||||
select type (ja)
|
||||
class is (psb_i_vect_gpu)
|
||||
class is (psb_i_vect_cuda)
|
||||
select type (val)
|
||||
class is (psb_c_vect_gpu)
|
||||
class is (psb_c_vect_cuda)
|
||||
if (a%is_host()) call a%sync()
|
||||
if (val%is_host()) call val%sync()
|
||||
if (ia%is_host()) call ia%sync()
|
||||
@@ -245,4 +245,4 @@ subroutine psb_c_elg_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_elg_csput_v
|
||||
end subroutine psb_c_cuda_elg_csput_v
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_s_elg_from_gpu(a,info)
|
||||
subroutine psb_c_cuda_elg_from_gpu(a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_s_elg_mat_mod, psb_protect_name => psb_s_elg_from_gpu
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_from_gpu
|
||||
#else
|
||||
use psb_s_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_s_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: m, nzm, n, pitch,maxrowsize
|
||||
@@ -71,4 +71,4 @@ subroutine psb_s_elg_from_gpu(a,info)
|
||||
call a%set_sync()
|
||||
#endif
|
||||
|
||||
end subroutine psb_s_elg_from_gpu
|
||||
end subroutine psb_c_cuda_elg_from_gpu
|
||||
@@ -30,26 +30,26 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_elg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_inner_vect_sv
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_inner_vect_sv
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x, y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character, optional, intent(in) :: trans
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_elg_inner_vect_sv'
|
||||
character(len=20) :: name='c_cuda_elg_inner_vect_sv'
|
||||
logical, parameter :: debug=.false.
|
||||
complex(psb_spk_), allocatable :: rx(:), ry(:)
|
||||
|
||||
@@ -86,4 +86,4 @@ subroutine psb_c_elg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_inner_vect_sv
|
||||
end subroutine psb_c_cuda_elg_inner_vect_sv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_mold(a,b,info)
|
||||
subroutine psb_c_cuda_elg_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_mold
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_mold
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_c_elg_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_elg_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_elg_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,4 +62,4 @@ subroutine psb_c_elg_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_mold
|
||||
end subroutine psb_c_cuda_elg_mold
|
||||
@@ -30,22 +30,22 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_reallocate_nz(nz,a)
|
||||
subroutine psb_c_cuda_elg_reallocate_nz(nz,a)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_reallocate_nz
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_reallocate_nz
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: nz
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_) :: m, nzrm,ld
|
||||
Integer(Psb_ipk_) :: err_act, info
|
||||
character(len=20) :: name='c_elg_reallocate_nz'
|
||||
character(len=20) :: name='c_cuda_elg_reallocate_nz'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -76,4 +76,4 @@ subroutine psb_c_elg_reallocate_nz(nz,a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_reallocate_nz
|
||||
end subroutine psb_c_cuda_elg_reallocate_nz
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_scal(d,a,info,side)
|
||||
subroutine psb_c_cuda_elg_scal(d,a,info,side)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_scal
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_scal
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character, intent(in), optional :: side
|
||||
@@ -75,4 +75,4 @@ subroutine psb_c_elg_scal(d,a,info,side)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_scal
|
||||
end subroutine psb_c_cuda_elg_scal
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_scals(d,a,info)
|
||||
subroutine psb_c_cuda_elg_scals(d,a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_scals
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_scals
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -70,4 +70,4 @@ subroutine psb_c_elg_scals(d,a,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_scals
|
||||
end subroutine psb_c_cuda_elg_scals
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_to_gpu(a,info,nzrm)
|
||||
subroutine psb_c_cuda_elg_to_gpu(a,info,nzrm)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_to_gpu
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_to_gpu
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: nzrm
|
||||
|
||||
@@ -90,4 +90,4 @@ subroutine psb_c_elg_to_gpu(a,info,nzrm)
|
||||
call a%set_sync()
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_elg_to_gpu
|
||||
end subroutine psb_c_cuda_elg_to_gpu
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_elg_trim(a)
|
||||
subroutine psb_c_cuda_elg_trim(a)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_d_elg_mat_mod, psb_protect_name => psb_d_elg_trim
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_trim
|
||||
implicit none
|
||||
class(psb_d_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
Integer(psb_ipk_) :: err_act, info, nz, m, nzm,ld
|
||||
character(len=20) :: name='trim'
|
||||
logical, parameter :: debug=.false.
|
||||
@@ -59,4 +59,4 @@ subroutine psb_d_elg_trim(a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_elg_trim
|
||||
end subroutine psb_c_cuda_elg_trim
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_elg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_elg_vect_mv
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_elg_vect_mv
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_elg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -52,7 +52,7 @@ subroutine psb_c_elg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_elg_vect_mv'
|
||||
character(len=20) :: name='c_cuda_elg_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -83,9 +83,9 @@ subroutine psb_c_elg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (a%is_host()) call a%sync()
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= czero) then
|
||||
@@ -128,4 +128,4 @@ subroutine psb_c_elg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_elg_vect_mv
|
||||
end subroutine psb_c_cuda_elg_vect_mv
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hdiag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hdiagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hdiag_mat_mod, psb_protect_name => psb_c_hdiag_csmv
|
||||
use psb_c_cuda_hdiag_mat_mod, psb_protect_name => psb_c_cuda_hdiag_csmv
|
||||
#else
|
||||
use psb_c_hdiag_mat_mod
|
||||
use psb_c_cuda_hdiag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hdiag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hdiag_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
||||
complex(psb_spk_), intent(inout) :: y(:)
|
||||
integer, intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_hdiag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='c_hdiag_csmv'
|
||||
character(len=20) :: name='c_cuda_hdiag_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -133,4 +133,4 @@ subroutine psb_c_hdiag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_hdiag_csmv
|
||||
end subroutine psb_c_cuda_hdiag_csmv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hdiag_mold(a,b,info)
|
||||
subroutine psb_c_cuda_hdiag_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_c_hdiag_mat_mod, psb_protect_name => psb_c_hdiag_mold
|
||||
use psb_c_cuda_hdiag_mat_mod, psb_protect_name => psb_c_cuda_hdiag_mold
|
||||
implicit none
|
||||
class(psb_c_hdiag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hdiag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_c_hdiag_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_hdiag_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_hdiag_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,4 +62,4 @@ subroutine psb_c_hdiag_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hdiag_mold
|
||||
end subroutine psb_c_cuda_hdiag_mold
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hdiag_to_gpu(a,info)
|
||||
subroutine psb_c_cuda_hdiag_to_gpu(a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hdiagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hdiag_mat_mod, psb_protect_name => psb_c_hdiag_to_gpu
|
||||
use psb_c_cuda_hdiag_mat_mod, psb_protect_name => psb_c_cuda_hdiag_to_gpu
|
||||
#else
|
||||
use psb_c_hdiag_mat_mod
|
||||
use psb_c_cuda_hdiag_mat_mod
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(psb_c_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hdiag_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: nr, nc, hacksize, hackcount, allocheight
|
||||
#ifdef HAVE_SPGPU
|
||||
@@ -83,4 +83,4 @@ subroutine psb_c_hdiag_to_gpu(a,info)
|
||||
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_hdiag_to_gpu
|
||||
end subroutine psb_c_cuda_hdiag_to_gpu
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hdiagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hdiag_mat_mod, psb_protect_name => psb_c_hdiag_vect_mv
|
||||
use psb_c_cuda_hdiag_mat_mod, psb_protect_name => psb_c_cuda_hdiag_vect_mv
|
||||
#else
|
||||
use psb_c_hdiag_mat_mod
|
||||
use psb_c_cuda_hdiag_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_hdiag_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hdiag_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -52,7 +52,7 @@ subroutine psb_c_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hdiag_vect_mv'
|
||||
character(len=20) :: name='c_cuda_hdiag_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -82,9 +82,9 @@ subroutine psb_c_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= dzero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -123,4 +123,4 @@ subroutine psb_c_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hdiag_vect_mv
|
||||
end subroutine psb_c_cuda_hdiag_vect_mv
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_allocate_mnnz(m,n,a,nz)
|
||||
subroutine psb_c_cuda_hlg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_allocate_mnnz
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_allocate_mnnz
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m,n
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(in), optional :: nz
|
||||
Integer(psb_ipk_) :: err_act, info, nz_,ld
|
||||
character(len=20) :: name='allocate_mnz'
|
||||
@@ -68,4 +68,4 @@ subroutine psb_c_hlg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hlg_allocate_mnnz
|
||||
end subroutine psb_c_cuda_hlg_allocate_mnnz
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_csmm
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_csmm
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
||||
complex(psb_spk_), intent(inout) :: y(:,:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_hlg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hlg_csmm'
|
||||
character(len=20) :: name='c_cuda_hlg_csmm'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = psb_success_
|
||||
@@ -129,4 +129,4 @@ subroutine psb_c_hlg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_hlg_csmm
|
||||
end subroutine psb_c_cuda_hlg_csmm
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_csmv
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_csmv
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
||||
complex(psb_spk_), intent(inout) :: y(:)
|
||||
integer, intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_hlg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='c_hlg_csmv'
|
||||
character(len=20) :: name='c_cuda_hlg_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -132,4 +132,4 @@ subroutine psb_c_hlg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hlg_csmv
|
||||
end subroutine psb_c_cuda_hlg_csmv
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_s_hlg_from_gpu(a,info)
|
||||
subroutine psb_c_cuda_hlg_from_gpu(a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_s_hlg_mat_mod, psb_protect_name => psb_s_hlg_from_gpu
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_from_gpu
|
||||
#else
|
||||
use psb_s_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_s_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: hksize,rows,nzeros,allocsize,hackOffsLength,firstIndex,avgnzr
|
||||
@@ -73,4 +73,4 @@ subroutine psb_s_hlg_from_gpu(a,info)
|
||||
call a%set_sync()
|
||||
#endif
|
||||
|
||||
end subroutine psb_s_hlg_from_gpu
|
||||
end subroutine psb_c_cuda_hlg_from_gpu
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hlg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_inner_vect_sv
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_inner_vect_sv
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x, y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -78,4 +78,4 @@ subroutine psb_c_hlg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hlg_inner_vect_sv
|
||||
end subroutine psb_c_cuda_hlg_inner_vect_sv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_mold(a,b,info)
|
||||
subroutine psb_c_cuda_hlg_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_mold
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_mold
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer, intent(out) :: info
|
||||
Integer :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_c_hlg_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_hlg_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_hlg_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -61,4 +61,4 @@ subroutine psb_c_hlg_mold(a,b,info)
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
end subroutine psb_c_hlg_mold
|
||||
end subroutine psb_c_cuda_hlg_mold
|
||||
@@ -30,22 +30,22 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_reallocate_nz(nz,a)
|
||||
subroutine psb_c_cuda_hlg_reallocate_nz(nz,a)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_reallocate_nz
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_reallocate_nz
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: nz
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
Integer(Psb_ipk_) :: err_act, info
|
||||
character(len=20) :: name='c_hlg_reallocate_nz'
|
||||
character(len=20) :: name='c_cuda_hlg_reallocate_nz'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -64,4 +64,4 @@ subroutine psb_c_hlg_reallocate_nz(nz,a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hlg_reallocate_nz
|
||||
end subroutine psb_c_cuda_hlg_reallocate_nz
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_scal(d,a,info,side)
|
||||
subroutine psb_c_cuda_hlg_scal(d,a,info,side)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_scal
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_scal
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character, intent(in), optional :: side
|
||||
@@ -72,4 +72,4 @@ subroutine psb_c_hlg_scal(d,a,info,side)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hlg_scal
|
||||
end subroutine psb_c_cuda_hlg_scal
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_scals(d,a,info)
|
||||
subroutine psb_c_cuda_hlg_scals(d,a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_scals
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_scals
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -70,4 +70,4 @@ subroutine psb_c_hlg_scals(d,a,info)
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
end subroutine psb_c_hlg_scals
|
||||
end subroutine psb_c_cuda_hlg_scals
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_to_gpu(a,info,nzrm)
|
||||
subroutine psb_c_cuda_hlg_to_gpu(a,info,nzrm)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_to_gpu
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_to_gpu
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: nzrm
|
||||
|
||||
@@ -65,4 +65,4 @@ subroutine psb_c_hlg_to_gpu(a,info,nzrm)
|
||||
! if (info /= 0) goto 9999
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_hlg_to_gpu
|
||||
end subroutine psb_c_cuda_hlg_to_gpu
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_hlg_vect_mv
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_hlg_vect_mv
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_hlg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -52,7 +52,7 @@ subroutine psb_c_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hlg_vect_mv'
|
||||
character(len=20) :: name='c_cuda_hlg_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -83,9 +83,9 @@ subroutine psb_c_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= dzero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -126,4 +126,4 @@ subroutine psb_c_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hlg_vect_mv
|
||||
end subroutine psb_c_cuda_hlg_vect_mv
|
||||
+5
-5
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_allocate_mnnz(m,n,a,nz)
|
||||
subroutine psb_c_cuda_hybg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_allocate_mnnz
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_allocate_mnnz
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m,n
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(in), optional :: nz
|
||||
Integer(Psb_ipk_) :: err_act, info, nz_,ld
|
||||
character(len=20) :: name='allocate_mnz'
|
||||
@@ -65,5 +65,5 @@ subroutine psb_c_hybg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_allocate_mnnz
|
||||
end subroutine psb_c_cuda_hybg_allocate_mnnz
|
||||
#endif
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_csmm
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_csmm
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
||||
complex(psb_spk_), intent(inout) :: y(:,:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_hybg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hybg_csmm'
|
||||
character(len=20) :: name='c_cuda_hybg_csmm'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = psb_success_
|
||||
@@ -131,5 +131,5 @@ subroutine psb_c_hybg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_csmm
|
||||
end subroutine psb_c_cuda_hybg_csmm
|
||||
#endif
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_csmv
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_csmv
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
||||
complex(psb_spk_), intent(inout) :: y(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -54,7 +54,7 @@ subroutine psb_c_hybg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpY
|
||||
logical :: tra
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hybg_csmv'
|
||||
character(len=20) :: name='c_cuda_hybg_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -134,5 +134,5 @@ subroutine psb_c_hybg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_csmv
|
||||
end subroutine psb_c_cuda_hybg_csmv
|
||||
#endif
|
||||
+9
-9
@@ -30,19 +30,19 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hybg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_inner_vect_sv
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_inner_vect_sv
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x, y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -52,7 +52,7 @@ subroutine psb_c_hybg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hybg_inner_vect_sv'
|
||||
character(len=20) :: name='c_cuda_hybg_inner_vect_sv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_get_erraction(err_act)
|
||||
@@ -84,9 +84,9 @@ subroutine psb_c_hybg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
call y%set_host()
|
||||
else
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= czero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -134,5 +134,5 @@ subroutine psb_c_hybg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_inner_vect_sv
|
||||
end subroutine psb_c_cuda_hybg_inner_vect_sv
|
||||
#endif
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_mold(a,b,info)
|
||||
subroutine psb_c_cuda_hybg_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_mold
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_mold
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_c_hybg_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_c_hybg_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_c_cuda_hybg_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,5 +62,5 @@ subroutine psb_c_hybg_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_mold
|
||||
end subroutine psb_c_cuda_hybg_mold
|
||||
#endif
|
||||
+6
-6
@@ -30,21 +30,21 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_reallocate_nz(nz,a)
|
||||
subroutine psb_c_cuda_hybg_reallocate_nz(nz,a)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_reallocate_nz
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_reallocate_nz
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: nz
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_) :: m, nzrm,ld
|
||||
Integer(Psb_ipk_) :: err_act, info
|
||||
character(len=20) :: name='c_hybg_reallocate_nz'
|
||||
character(len=20) :: name='c_cuda_hybg_reallocate_nz'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -67,5 +67,5 @@ subroutine psb_c_hybg_reallocate_nz(nz,a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_reallocate_nz
|
||||
end subroutine psb_c_cuda_hybg_reallocate_nz
|
||||
#endif
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_scal(d,a,info,side)
|
||||
subroutine psb_c_cuda_hybg_scal(d,a,info,side)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_scal
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_scal
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character, intent(in), optional :: side
|
||||
@@ -72,5 +72,5 @@ subroutine psb_c_hybg_scal(d,a,info,side)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_scal
|
||||
end subroutine psb_c_cuda_hybg_scal
|
||||
#endif
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_scals(d,a,info)
|
||||
subroutine psb_c_cuda_hybg_scals(d,a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_scals
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_scals
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
complex(psb_spk_), intent(in) :: d
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -72,5 +72,5 @@ subroutine psb_c_hybg_scals(d,a,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_scals
|
||||
end subroutine psb_c_cuda_hybg_scals
|
||||
#endif
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_to_gpu(a,info,nzrm)
|
||||
subroutine psb_c_cuda_hybg_to_gpu(a,info,nzrm)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_to_gpu
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_to_gpu
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: nzrm
|
||||
|
||||
@@ -150,5 +150,5 @@ subroutine psb_c_hybg_to_gpu(a,info,nzrm)
|
||||
end if
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_hybg_to_gpu
|
||||
end subroutine psb_c_cuda_hybg_to_gpu
|
||||
#endif
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_c_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_hybg_vect_mv
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_hybg_vect_mv
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
use psb_c_gpu_vect_mod
|
||||
use psb_c_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_c_hybg_sparse_mat), intent(in) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(in) :: a
|
||||
complex(psb_spk_), intent(in) :: alpha, beta
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
@@ -53,7 +53,7 @@ subroutine psb_c_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='c_hybg_vect_mv'
|
||||
character(len=20) :: name='c_cuda_hybg_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -83,9 +83,9 @@ subroutine psb_c_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_c_vect_gpu)
|
||||
type is (psb_c_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= czero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -123,5 +123,5 @@ subroutine psb_c_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_hybg_vect_mv
|
||||
end subroutine psb_c_cuda_hybg_vect_mv
|
||||
#endif
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_csrg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_csrg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_mv_csrg_from_coo
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_mv_csrg_from_coo
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -62,4 +62,4 @@ subroutine psb_c_mv_csrg_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_mv_csrg_from_coo
|
||||
end subroutine psb_c_cuda_mv_csrg_from_coo
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_csrg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_mv_csrg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_csrg_mat_mod, psb_protect_name => psb_c_mv_csrg_from_fmt
|
||||
use psb_c_cuda_csrg_mat_mod, psb_protect_name => psb_c_cuda_mv_csrg_from_fmt
|
||||
#else
|
||||
use psb_c_csrg_mat_mod
|
||||
use psb_c_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer, intent(out) :: info
|
||||
|
||||
@@ -60,4 +60,4 @@ subroutine psb_c_mv_csrg_from_fmt(a,b,info)
|
||||
#endif
|
||||
end select
|
||||
|
||||
end subroutine psb_c_mv_csrg_from_fmt
|
||||
end subroutine psb_c_cuda_mv_csrg_from_fmt
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_diag_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_diag_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_diag_mat_mod, psb_protect_name => psb_c_mv_diag_from_coo
|
||||
use psb_c_cuda_diag_mat_mod, psb_protect_name => psb_c_cuda_mv_diag_from_coo
|
||||
#else
|
||||
use psb_c_diag_mat_mod
|
||||
use psb_c_cuda_diag_mat_mod
|
||||
#endif
|
||||
|
||||
implicit none
|
||||
|
||||
class(psb_c_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -66,4 +66,4 @@ subroutine psb_c_mv_diag_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_mv_diag_from_coo
|
||||
end subroutine psb_c_cuda_mv_diag_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_elg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_elg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_mv_elg_from_coo
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_mv_elg_from_coo
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,4 +58,4 @@ subroutine psb_c_mv_elg_from_coo(a,b,info)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_c_mv_elg_from_coo
|
||||
end subroutine psb_c_cuda_mv_elg_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_elg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_mv_elg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_elg_mat_mod, psb_protect_name => psb_c_mv_elg_from_fmt
|
||||
use psb_c_cuda_elg_mat_mod, psb_protect_name => psb_c_cuda_mv_elg_from_fmt
|
||||
#else
|
||||
use psb_c_elg_mat_mod
|
||||
use psb_c_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -96,4 +96,4 @@ subroutine psb_c_mv_elg_from_fmt(a,b,info)
|
||||
if (info == psb_success_) call a%mv_from_coo(tmp,info)
|
||||
end select
|
||||
|
||||
end subroutine psb_c_mv_elg_from_fmt
|
||||
end subroutine psb_c_cuda_mv_elg_from_fmt
|
||||
@@ -30,21 +30,21 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_hdiag_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_hdiag_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hdiagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hdiag_mat_mod, psb_protect_name => psb_c_mv_hdiag_from_coo
|
||||
use psb_gpu_env_mod
|
||||
use psb_c_cuda_hdiag_mat_mod, psb_protect_name => psb_c_cuda_mv_hdiag_from_coo
|
||||
use psb_cuda_env_mod
|
||||
#else
|
||||
use psb_c_hdiag_mat_mod
|
||||
use psb_c_cuda_hdiag_mat_mod
|
||||
#endif
|
||||
|
||||
implicit none
|
||||
|
||||
class(psb_c_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -55,7 +55,7 @@ subroutine psb_c_mv_hdiag_from_coo(a,b,info)
|
||||
|
||||
|
||||
#ifdef HAVE_SPGPU
|
||||
a%hacksize = psb_gpu_WarpSize()
|
||||
a%hacksize = psb_cuda_WarpSize()
|
||||
#endif
|
||||
|
||||
call a%psb_c_hdia_sparse_mat%mv_from_coo(b,info)
|
||||
@@ -71,4 +71,4 @@ subroutine psb_c_mv_hdiag_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_mv_hdiag_from_coo
|
||||
end subroutine psb_c_cuda_mv_hdiag_from_coo
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_hlg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_hlg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_gpu_env_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_mv_hlg_from_coo
|
||||
use psb_cuda_env_mod
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_mv_hlg_from_coo
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,4 +58,4 @@ subroutine psb_c_mv_hlg_from_coo(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_mv_hlg_from_coo
|
||||
end subroutine psb_c_cuda_mv_hlg_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_c_mv_hlg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_mv_hlg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_c_hlg_mat_mod, psb_protect_name => psb_c_mv_hlg_from_fmt
|
||||
use psb_c_cuda_hlg_mat_mod, psb_protect_name => psb_c_cuda_mv_hlg_from_fmt
|
||||
#else
|
||||
use psb_c_hlg_mat_mod
|
||||
use psb_c_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -59,4 +59,4 @@ subroutine psb_c_mv_hlg_from_fmt(a,b,info)
|
||||
if (info == psb_success_) call a%mv_from_coo(tmp,info)
|
||||
end select
|
||||
|
||||
end subroutine psb_c_mv_hlg_from_fmt
|
||||
end subroutine psb_c_cuda_mv_hlg_from_fmt
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_mv_hybg_from_coo(a,b,info)
|
||||
subroutine psb_c_cuda_mv_hybg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_mv_hybg_from_coo
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_mv_hybg_from_coo
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -61,5 +61,5 @@ subroutine psb_c_mv_hybg_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_c_mv_hybg_from_coo
|
||||
end subroutine psb_c_cuda_mv_hybg_from_coo
|
||||
#endif
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_c_mv_hybg_from_fmt(a,b,info)
|
||||
subroutine psb_c_cuda_mv_hybg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_c_hybg_mat_mod, psb_protect_name => psb_c_mv_hybg_from_fmt
|
||||
use psb_c_cuda_hybg_mat_mod, psb_protect_name => psb_c_cuda_mv_hybg_from_fmt
|
||||
#else
|
||||
use psb_c_hybg_mat_mod
|
||||
use psb_c_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_c_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,5 +58,5 @@ subroutine psb_c_mv_hybg_from_fmt(a,b,info)
|
||||
call a%to_gpu(info)
|
||||
#endif
|
||||
end select
|
||||
end subroutine psb_c_mv_hybg_from_fmt
|
||||
end subroutine psb_c_cuda_mv_hybg_from_fmt
|
||||
#endif
|
||||
@@ -29,18 +29,18 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_d_cp_csrg_from_coo(a,b,info)
|
||||
subroutine psb_d_cuda_cp_csrg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_cp_csrg_from_coo
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_cp_csrg_from_coo
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -59,4 +59,4 @@ subroutine psb_d_cp_csrg_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_d_cp_csrg_from_coo
|
||||
end subroutine psb_d_cuda_cp_csrg_from_coo
|
||||
@@ -29,19 +29,19 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_d_cp_csrg_from_fmt(a,b,info)
|
||||
subroutine psb_d_cuda_cp_csrg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_cp_csrg_from_fmt
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_cp_csrg_from_fmt
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
!use iso_c_binding
|
||||
implicit none
|
||||
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,4 +58,4 @@ subroutine psb_d_cp_csrg_from_fmt(a,b,info)
|
||||
#endif
|
||||
end select
|
||||
|
||||
end subroutine psb_d_cp_csrg_from_fmt
|
||||
end subroutine psb_d_cuda_cp_csrg_from_fmt
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_cp_diag_from_coo(a,b,info)
|
||||
subroutine psb_d_cuda_cp_diag_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_diag_mat_mod, psb_protect_name => psb_d_cp_diag_from_coo
|
||||
use psb_d_cuda_diag_mat_mod, psb_protect_name => psb_d_cuda_cp_diag_from_coo
|
||||
#else
|
||||
use psb_d_diag_mat_mod
|
||||
use psb_d_cuda_diag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_diag_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -61,4 +61,4 @@ subroutine psb_d_cp_diag_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_d_cp_diag_from_coo
|
||||
end subroutine psb_d_cuda_cp_diag_from_coo
|
||||
@@ -30,21 +30,21 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_cp_elg_from_coo(a,b,info)
|
||||
subroutine psb_d_cuda_cp_elg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_elg_mat_mod, psb_protect_name => psb_d_cp_elg_from_coo
|
||||
use psb_d_cuda_elg_mat_mod, psb_protect_name => psb_d_cuda_cp_elg_from_coo
|
||||
use psi_ext_util_mod
|
||||
use psb_gpu_env_mod
|
||||
use psb_cuda_env_mod
|
||||
#else
|
||||
use psb_d_elg_mat_mod
|
||||
use psb_d_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,7 +58,7 @@ subroutine psb_d_cp_elg_from_coo(a,b,info)
|
||||
|
||||
info = psb_success_
|
||||
#ifdef HAVE_SPGPU
|
||||
hacksize = max(1,psb_gpu_WarpSize())
|
||||
hacksize = max(1,psb_cuda_WarpSize())
|
||||
#else
|
||||
hacksize = 1
|
||||
#endif
|
||||
@@ -181,4 +181,4 @@ contains
|
||||
|
||||
end subroutine psi_d_count_ell_from_coo
|
||||
|
||||
end subroutine psb_d_cp_elg_from_coo
|
||||
end subroutine psb_d_cuda_cp_elg_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_cp_elg_from_fmt(a,b,info)
|
||||
subroutine psb_d_cuda_cp_elg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_elg_mat_mod, psb_protect_name => psb_d_cp_elg_from_fmt
|
||||
use psb_d_cuda_elg_mat_mod, psb_protect_name => psb_d_cuda_cp_elg_from_fmt
|
||||
#else
|
||||
use psb_d_elg_mat_mod
|
||||
use psb_d_cuda_elg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_elg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -98,4 +98,4 @@ subroutine psb_d_cp_elg_from_fmt(a,b,info)
|
||||
if (info == psb_success_) call a%mv_from_coo(tmp,info)
|
||||
end select
|
||||
|
||||
end subroutine psb_d_cp_elg_from_fmt
|
||||
end subroutine psb_d_cuda_cp_elg_from_fmt
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_cp_hdiag_from_coo(a,b,info)
|
||||
subroutine psb_d_cuda_cp_hdiag_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hdiagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_hdiag_mat_mod, psb_protect_name => psb_d_cp_hdiag_from_coo
|
||||
use psb_gpu_env_mod
|
||||
use psb_d_cuda_hdiag_mat_mod, psb_protect_name => psb_d_cuda_cp_hdiag_from_coo
|
||||
use psb_cuda_env_mod
|
||||
#else
|
||||
use psb_d_hdiag_mat_mod
|
||||
use psb_d_cuda_hdiag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_hdiag_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -54,7 +54,7 @@ subroutine psb_d_cp_hdiag_from_coo(a,b,info)
|
||||
info = psb_success_
|
||||
|
||||
#ifdef HAVE_SPGPU
|
||||
a%hacksize = psb_gpu_WarpSize()
|
||||
a%hacksize = psb_cuda_WarpSize()
|
||||
#endif
|
||||
|
||||
call a%psb_d_hdia_sparse_mat%cp_from_coo(b,info)
|
||||
@@ -70,4 +70,4 @@ subroutine psb_d_cp_hdiag_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_d_cp_hdiag_from_coo
|
||||
end subroutine psb_d_cuda_cp_hdiag_from_coo
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_cp_hlg_from_coo(a,b,info)
|
||||
subroutine psb_d_cuda_cp_hlg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_gpu_env_mod
|
||||
use psb_d_hlg_mat_mod, psb_protect_name => psb_d_cp_hlg_from_coo
|
||||
use psb_cuda_env_mod
|
||||
use psb_d_cuda_hlg_mat_mod, psb_protect_name => psb_d_cuda_cp_hlg_from_coo
|
||||
#else
|
||||
use psb_d_hlg_mat_mod
|
||||
use psb_d_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -62,7 +62,7 @@ subroutine psb_d_cp_hlg_from_coo(a,b,info)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
#ifdef HAVE_SPGPU
|
||||
hksz = max(1,psb_gpu_WarpSize())
|
||||
hksz = max(1,psb_cuda_WarpSize())
|
||||
#else
|
||||
hksz = psi_get_hksz()
|
||||
#endif
|
||||
@@ -195,4 +195,4 @@ contains
|
||||
!!$ write(*,*) 'End of psi_comput_hckoff ',info
|
||||
end subroutine psi_compute_hckoff_from_coo
|
||||
|
||||
end subroutine psb_d_cp_hlg_from_coo
|
||||
end subroutine psb_d_cuda_cp_hlg_from_coo
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_cp_hlg_from_fmt(a,b,info)
|
||||
subroutine psb_d_cuda_cp_hlg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use hlldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_hlg_mat_mod, psb_protect_name => psb_d_cp_hlg_from_fmt
|
||||
use psb_d_cuda_hlg_mat_mod, psb_protect_name => psb_d_cuda_cp_hlg_from_fmt
|
||||
#else
|
||||
use psb_d_hlg_mat_mod
|
||||
use psb_d_cuda_hlg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_hlg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -65,4 +65,4 @@ subroutine psb_d_cp_hlg_from_fmt(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_d_cp_hlg_from_fmt
|
||||
end subroutine psb_d_cuda_cp_hlg_from_fmt
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_d_cp_hybg_from_coo(a,b,info)
|
||||
subroutine psb_d_cuda_cp_hybg_from_coo(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_hybg_mat_mod, psb_protect_name => psb_d_cp_hybg_from_coo
|
||||
use psb_d_cuda_hybg_mat_mod, psb_protect_name => psb_d_cuda_cp_hybg_from_coo
|
||||
#else
|
||||
use psb_d_hybg_mat_mod
|
||||
use psb_d_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -60,5 +60,5 @@ subroutine psb_d_cp_hybg_from_coo(a,b,info)
|
||||
info = psb_err_alloc_dealloc_
|
||||
return
|
||||
|
||||
end subroutine psb_d_cp_hybg_from_coo
|
||||
end subroutine psb_d_cuda_cp_hybg_from_coo
|
||||
#endif
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
|
||||
subroutine psb_d_cp_hybg_from_fmt(a,b,info)
|
||||
subroutine psb_d_cuda_cp_hybg_from_fmt(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_hybg_mat_mod, psb_protect_name => psb_d_cp_hybg_from_fmt
|
||||
use psb_d_cuda_hybg_mat_mod, psb_protect_name => psb_d_cuda_cp_hybg_from_fmt
|
||||
#else
|
||||
use psb_d_hybg_mat_mod
|
||||
use psb_d_cuda_hybg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(psb_d_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_hybg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -58,5 +58,5 @@ subroutine psb_d_cp_hybg_from_fmt(a,b,info)
|
||||
#endif
|
||||
end select
|
||||
|
||||
end subroutine psb_d_cp_hybg_from_fmt
|
||||
end subroutine psb_d_cuda_cp_hybg_from_fmt
|
||||
#endif
|
||||
+5
-5
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_allocate_mnnz(m,n,a,nz)
|
||||
subroutine psb_d_cuda_csrg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_allocate_mnnz
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_allocate_mnnz
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m,n
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(in), optional :: nz
|
||||
Integer(Psb_ipk_) :: err_act, info, nz_,ld
|
||||
character(len=20) :: name='allocate_mnz'
|
||||
@@ -65,4 +65,4 @@ subroutine psb_d_csrg_allocate_mnnz(m,n,a,nz)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csrg_allocate_mnnz
|
||||
end subroutine psb_d_cuda_csrg_allocate_mnnz
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_d_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_csmm
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_csmm
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
||||
real(psb_dpk_), intent(inout) :: y(:,:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -131,4 +131,4 @@ subroutine psb_d_csrg_csmm(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_d_csrg_csmm
|
||||
end subroutine psb_d_cuda_csrg_csmm
|
||||
@@ -30,19 +30,19 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_d_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_csmv
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_csmv
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
||||
real(psb_dpk_), intent(inout) :: y(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -55,7 +55,7 @@ subroutine psb_d_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpY
|
||||
logical :: tra
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='d_csrg_csmv'
|
||||
character(len=20) :: name='d_cuda_csrg_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -136,4 +136,4 @@ subroutine psb_d_csrg_csmv(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_d_csrg_csmv
|
||||
end subroutine psb_d_cuda_csrg_csmv
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_s_csrg_from_gpu(a,info)
|
||||
subroutine psb_d_cuda_csrg_from_gpu(a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_s_csrg_mat_mod, psb_protect_name => psb_s_csrg_from_gpu
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_from_gpu
|
||||
#else
|
||||
use psb_s_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_s_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: m, n, nz
|
||||
@@ -70,4 +70,4 @@ subroutine psb_s_csrg_from_gpu(a,info)
|
||||
call a%set_sync()
|
||||
#endif
|
||||
|
||||
end subroutine psb_s_csrg_from_gpu
|
||||
end subroutine psb_d_cuda_csrg_from_gpu
|
||||
+9
-9
@@ -29,19 +29,19 @@
|
||||
! POSSIBILITY OF SUCH DAMAGE.
|
||||
!
|
||||
|
||||
subroutine psb_d_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_d_cuda_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_inner_vect_sv
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_inner_vect_sv
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
use psb_d_gpu_vect_mod
|
||||
use psb_d_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
real(psb_dpk_), intent(in) :: alpha, beta
|
||||
class(psb_d_base_vect_type), intent(inout) :: x, y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
@@ -51,7 +51,7 @@ subroutine psb_d_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='d_csrg_inner_vect_sv'
|
||||
character(len=20) :: name='d_cuda_csrg_inner_vect_sv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_get_erraction(err_act)
|
||||
@@ -83,9 +83,9 @@ subroutine psb_d_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
call y%set_host()
|
||||
else
|
||||
select type (xx => x)
|
||||
type is (psb_d_vect_gpu)
|
||||
type is (psb_d_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_d_vect_gpu)
|
||||
type is (psb_d_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= dzero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -133,4 +133,4 @@ subroutine psb_d_csrg_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csrg_inner_vect_sv
|
||||
end subroutine psb_d_cuda_csrg_inner_vect_sv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_mold(a,b,info)
|
||||
subroutine psb_d_cuda_csrg_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_mold
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_mold
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_d_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_d_csrg_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_d_csrg_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_d_cuda_csrg_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,4 +62,4 @@ subroutine psb_d_csrg_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csrg_mold
|
||||
end subroutine psb_d_cuda_csrg_mold
|
||||
+6
-6
@@ -30,21 +30,21 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_reallocate_nz(nz,a)
|
||||
subroutine psb_d_cuda_csrg_reallocate_nz(nz,a)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_reallocate_nz
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_reallocate_nz
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: nz
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_) :: m, nzrm,ld
|
||||
Integer(Psb_ipk_) :: err_act, info
|
||||
character(len=20) :: name='d_csrg_reallocate_nz'
|
||||
character(len=20) :: name='d_cuda_csrg_reallocate_nz'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -67,4 +67,4 @@ subroutine psb_d_csrg_reallocate_nz(nz,a)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csrg_reallocate_nz
|
||||
end subroutine psb_d_cuda_csrg_reallocate_nz
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_scal(d,a,info,side)
|
||||
subroutine psb_d_cuda_csrg_scal(d,a,info,side)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_scal
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_scal
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
real(psb_dpk_), intent(in) :: d(:)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
character, intent(in), optional :: side
|
||||
@@ -70,4 +70,4 @@ subroutine psb_d_csrg_scal(d,a,info,side)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csrg_scal
|
||||
end subroutine psb_d_cuda_csrg_scal
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_scals(d,a,info)
|
||||
subroutine psb_d_cuda_csrg_scals(d,a,info)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_scals
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_scals
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
real(psb_dpk_), intent(in) :: d
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
@@ -68,4 +68,4 @@ subroutine psb_d_csrg_scals(d,a,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csrg_scals
|
||||
end subroutine psb_d_cuda_csrg_scals
|
||||
@@ -30,17 +30,17 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_to_gpu(a,info,nzrm)
|
||||
subroutine psb_d_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_to_gpu
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_to_gpu
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(inout) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(inout) :: a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: nzrm
|
||||
|
||||
@@ -322,4 +322,4 @@ subroutine psb_d_csrg_to_gpu(a,info,nzrm)
|
||||
end if
|
||||
#endif
|
||||
|
||||
end subroutine psb_d_csrg_to_gpu
|
||||
end subroutine psb_d_cuda_csrg_to_gpu
|
||||
@@ -30,20 +30,20 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_d_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use cusparse_mod
|
||||
use elldev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_csrg_mat_mod, psb_protect_name => psb_d_csrg_vect_mv
|
||||
use psb_d_cuda_csrg_mat_mod, psb_protect_name => psb_d_cuda_csrg_vect_mv
|
||||
#else
|
||||
use psb_d_csrg_mat_mod
|
||||
use psb_d_cuda_csrg_mat_mod
|
||||
#endif
|
||||
use psb_d_gpu_vect_mod
|
||||
use psb_d_cuda_vect_mod
|
||||
implicit none
|
||||
class(psb_d_csrg_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_csrg_sparse_mat), intent(in) :: a
|
||||
real(psb_dpk_), intent(in) :: alpha, beta
|
||||
class(psb_d_base_vect_type), intent(inout) :: x
|
||||
class(psb_d_base_vect_type), intent(inout) :: y
|
||||
@@ -54,7 +54,7 @@ subroutine psb_d_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
logical :: tra
|
||||
character :: trans_
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
character(len=20) :: name='d_csrg_vect_mv'
|
||||
character(len=20) :: name='d_cuda_csrg_vect_mv'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
@@ -83,9 +83,9 @@ subroutine psb_d_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
else
|
||||
if (a%is_host()) call a%sync()
|
||||
select type (xx => x)
|
||||
type is (psb_d_vect_gpu)
|
||||
type is (psb_d_vect_cuda)
|
||||
select type(yy => y)
|
||||
type is (psb_d_vect_gpu)
|
||||
type is (psb_d_vect_cuda)
|
||||
if (xx%is_host()) call xx%sync()
|
||||
if (beta /= dzero) then
|
||||
if (yy%is_host()) call yy%sync()
|
||||
@@ -122,4 +122,4 @@ subroutine psb_d_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
end subroutine psb_d_csrg_vect_mv
|
||||
end subroutine psb_d_cuda_csrg_vect_mv
|
||||
@@ -30,18 +30,18 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
subroutine psb_d_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
|
||||
use psb_base_mod
|
||||
#ifdef HAVE_SPGPU
|
||||
use diagdev_mod
|
||||
use psb_vectordev_mod
|
||||
use psb_d_diag_mat_mod, psb_protect_name => psb_d_diag_csmv
|
||||
use psb_d_cuda_diag_mat_mod, psb_protect_name => psb_d_cuda_diag_csmv
|
||||
#else
|
||||
use psb_d_diag_mat_mod
|
||||
use psb_d_cuda_diag_mat_mod
|
||||
#endif
|
||||
implicit none
|
||||
class(psb_d_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_diag_sparse_mat), intent(in) :: a
|
||||
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
||||
real(psb_dpk_), intent(inout) :: y(:)
|
||||
integer, intent(out) :: info
|
||||
@@ -53,7 +53,7 @@ subroutine psb_d_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
type(c_ptr) :: gpX, gpY
|
||||
logical :: tra
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='d_diag_csmv'
|
||||
character(len=20) :: name='d_cuda_diag_csmv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
@@ -133,4 +133,4 @@ subroutine psb_d_diag_csmv(alpha,a,x,beta,y,info,trans)
|
||||
return
|
||||
|
||||
|
||||
end subroutine psb_d_diag_csmv
|
||||
end subroutine psb_d_cuda_diag_csmv
|
||||
@@ -30,12 +30,12 @@
|
||||
!
|
||||
|
||||
|
||||
subroutine psb_d_diag_mold(a,b,info)
|
||||
subroutine psb_d_cuda_diag_mold(a,b,info)
|
||||
|
||||
use psb_base_mod
|
||||
use psb_d_diag_mat_mod, psb_protect_name => psb_d_diag_mold
|
||||
use psb_d_cuda_diag_mat_mod, psb_protect_name => psb_d_cuda_diag_mold
|
||||
implicit none
|
||||
class(psb_d_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_d_cuda_diag_sparse_mat), intent(in) :: a
|
||||
class(psb_d_base_sparse_mat), intent(inout), allocatable :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
Integer(Psb_ipk_) :: err_act
|
||||
@@ -49,7 +49,7 @@ subroutine psb_d_diag_mold(a,b,info)
|
||||
call b%free()
|
||||
deallocate(b,stat=info)
|
||||
end if
|
||||
if (info == 0) allocate(psb_d_diag_sparse_mat :: b, stat=info)
|
||||
if (info == 0) allocate(psb_d_cuda_diag_sparse_mat :: b, stat=info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
@@ -62,4 +62,4 @@ subroutine psb_d_diag_mold(a,b,info)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_diag_mold
|
||||
end subroutine psb_d_cuda_diag_mold
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user