Merge updates from V4

oacc_loloum
sfilippone 5 months ago
parent fbb974fb8b
commit f783478df3

@ -13,8 +13,6 @@ LIBNAME=libpsb_openacc.a
OBJS= \
psb_s_oacc_csr_vect_mv.o \
psb_s_oacc_csr_inner_vect_sv.o \
psb_s_oacc_csr_csmm.o \
psb_s_oacc_csr_csmv.o \
psb_s_oacc_csr_scals.o \
psb_s_oacc_csr_scal.o \
psb_s_oacc_csr_allocate_mnnz.o \
@ -28,8 +26,6 @@ psb_s_oacc_mlt_v_2.o \
psb_s_oacc_mlt_v.o \
psb_d_oacc_csr_vect_mv.o \
psb_d_oacc_csr_inner_vect_sv.o \
psb_d_oacc_csr_csmm.o \
psb_d_oacc_csr_csmv.o \
psb_d_oacc_csr_scals.o \
psb_d_oacc_csr_scal.o \
psb_d_oacc_csr_allocate_mnnz.o \
@ -43,8 +39,6 @@ psb_d_oacc_mlt_v_2.o \
psb_d_oacc_mlt_v.o \
psb_c_oacc_csr_vect_mv.o \
psb_c_oacc_csr_inner_vect_sv.o \
psb_c_oacc_csr_csmm.o \
psb_c_oacc_csr_csmv.o \
psb_c_oacc_csr_scals.o \
psb_c_oacc_csr_scal.o \
psb_c_oacc_csr_allocate_mnnz.o \
@ -58,8 +52,6 @@ psb_c_oacc_mlt_v_2.o \
psb_c_oacc_mlt_v.o \
psb_z_oacc_csr_vect_mv.o \
psb_z_oacc_csr_inner_vect_sv.o \
psb_z_oacc_csr_csmm.o \
psb_z_oacc_csr_csmv.o \
psb_z_oacc_csr_scals.o \
psb_z_oacc_csr_scal.o \
psb_z_oacc_csr_allocate_mnnz.o \
@ -73,8 +65,6 @@ psb_z_oacc_mlt_v_2.o \
psb_z_oacc_mlt_v.o \
psb_s_oacc_ell_vect_mv.o \
psb_s_oacc_ell_inner_vect_sv.o \
psb_s_oacc_ell_csmm.o \
psb_s_oacc_ell_csmv.o \
psb_s_oacc_ell_scals.o \
psb_s_oacc_ell_scal.o \
psb_s_oacc_ell_reallocate_nz.o \
@ -93,14 +83,10 @@ psb_s_oacc_hll_allocate_mnnz.o \
psb_s_oacc_hll_reallocate_nz.o \
psb_s_oacc_hll_scal.o \
psb_s_oacc_hll_scals.o \
psb_s_oacc_hll_csmv.o \
psb_s_oacc_hll_csmm.o \
psb_s_oacc_hll_inner_vect_sv.o \
psb_s_oacc_hll_vect_mv.o \
psb_d_oacc_ell_vect_mv.o \
psb_d_oacc_ell_inner_vect_sv.o \
psb_d_oacc_ell_csmm.o \
psb_d_oacc_ell_csmv.o \
psb_d_oacc_ell_scals.o \
psb_d_oacc_ell_scal.o \
psb_d_oacc_ell_reallocate_nz.o \
@ -119,14 +105,10 @@ psb_d_oacc_hll_allocate_mnnz.o \
psb_d_oacc_hll_reallocate_nz.o \
psb_d_oacc_hll_scal.o \
psb_d_oacc_hll_scals.o \
psb_d_oacc_hll_csmv.o \
psb_d_oacc_hll_csmm.o \
psb_d_oacc_hll_inner_vect_sv.o \
psb_d_oacc_hll_vect_mv.o \
psb_c_oacc_ell_vect_mv.o \
psb_c_oacc_ell_inner_vect_sv.o \
psb_c_oacc_ell_csmm.o \
psb_c_oacc_ell_csmv.o \
psb_c_oacc_ell_scals.o \
psb_c_oacc_ell_scal.o \
psb_c_oacc_ell_reallocate_nz.o \
@ -145,14 +127,10 @@ psb_c_oacc_hll_allocate_mnnz.o \
psb_c_oacc_hll_reallocate_nz.o \
psb_c_oacc_hll_scal.o \
psb_c_oacc_hll_scals.o \
psb_c_oacc_hll_csmv.o \
psb_c_oacc_hll_csmm.o \
psb_c_oacc_hll_inner_vect_sv.o \
psb_c_oacc_hll_vect_mv.o \
psb_z_oacc_ell_vect_mv.o \
psb_z_oacc_ell_inner_vect_sv.o \
psb_z_oacc_ell_csmm.o \
psb_z_oacc_ell_csmv.o \
psb_z_oacc_ell_scals.o \
psb_z_oacc_ell_scal.o \
psb_z_oacc_ell_reallocate_nz.o \
@ -171,25 +149,127 @@ psb_z_oacc_hll_allocate_mnnz.o \
psb_z_oacc_hll_reallocate_nz.o \
psb_z_oacc_hll_scal.o \
psb_z_oacc_hll_scals.o \
psb_z_oacc_hll_csmv.o \
psb_z_oacc_hll_csmm.o \
psb_z_oacc_hll_inner_vect_sv.o \
psb_z_oacc_hll_vect_mv.o \
psb_z_oacc_ell_vect_mv.o \
psb_z_oacc_ell_inner_vect_sv.o \
psb_z_oacc_ell_scals.o \
psb_z_oacc_ell_scal.o \
psb_z_oacc_ell_reallocate_nz.o \
psb_z_oacc_ell_allocate_mnnz.o \
psb_z_oacc_ell_cp_from_coo.o \
psb_z_oacc_ell_cp_from_fmt.o \
psb_z_oacc_ell_mv_from_coo.o \
psb_z_oacc_ell_mv_from_fmt.o \
psb_z_oacc_ell_mold.o \
psb_z_oacc_hll_mold.o \
psb_z_oacc_hll_mv_from_fmt.o \
psb_z_oacc_hll_mv_from_coo.o \
psb_z_oacc_hll_cp_from_fmt.o \
psb_z_oacc_hll_cp_from_coo.o \
psb_z_oacc_hll_allocate_mnnz.o \
psb_z_oacc_hll_reallocate_nz.o \
psb_z_oacc_hll_scal.o \
psb_z_oacc_hll_scals.o \
psb_z_oacc_hll_inner_vect_sv.o \
psb_z_oacc_hll_vect_mv.o
objs: $(OBJS)
lib: objs
ar cur ../$(LIBNAME) $(OBJS)
psb_s_oacc_csr_vect_mv.o psb_s_oacc_csr_inner_vect_sv.o \
psb_s_oacc_csr_scals.o \
psb_s_oacc_csr_scal.o psb_s_oacc_csr_allocate_mnnz.o \
psb_s_oacc_csr_reallocate_nz.o psb_s_oacc_csr_cp_from_coo.o \
psb_s_oacc_csr_cp_from_fmt.o psb_s_oacc_csr_mv_from_coo.o \
psb_s_oacc_csr_mv_from_fmt.o psb_s_oacc_csr_mold.o: $(UP)/psb_s_oacc_csr_mat_mod.o $(UP)/psb_s_oacc_vect_mod.o
#psb_d_oacc_csr_vect_mv.o psb_d_oacc_csr_inner_vect_sv.o \
psb_d_oacc_csr_csmm.o psb_d_oacc_csr_csmv.o psb_d_oacc_csr_scals.o \
psb_s_oacc_ell_vect_mv.o psb_s_oacc_ell_inner_vect_sv.o \
psb_s_oacc_ell_scals.o \
psb_s_oacc_ell_scal.o psb_s_oacc_ell_allocate_mnnz.o \
psb_s_oacc_ell_reallocate_nz.o psb_s_oacc_ell_cp_from_coo.o \
psb_s_oacc_ell_cp_from_fmt.o psb_s_oacc_ell_mv_from_coo.o \
psb_s_oacc_ell_mv_from_fmt.o psb_s_oacc_ell_mold.o: $(UP)/psb_s_oacc_ell_mat_mod.o $(UP)/psb_s_oacc_vect_mod.o
psb_s_oacc_hll_vect_mv.o psb_s_oacc_hll_inner_vect_sv.o \
psb_s_oacc_hll_scals.o \
psb_s_oacc_hll_scal.o psb_s_oacc_hll_allocate_mnnz.o \
psb_s_oacc_hll_reallocate_nz.o psb_s_oacc_hll_cp_from_coo.o \
psb_s_oacc_hll_cp_from_fmt.o psb_s_oacc_hll_mv_from_coo.o \
psb_s_oacc_hll_mv_from_fmt.o psb_s_oacc_hll_mold.o: $(UP)/psb_s_oacc_hll_mat_mod.o $(UP)/psb_s_oacc_vect_mod.o
psb_d_oacc_csr_vect_mv.o psb_d_oacc_csr_inner_vect_sv.o \
psb_d_oacc_csr_scals.o \
psb_d_oacc_csr_scal.o psb_d_oacc_csr_allocate_mnnz.o \
psb_d_oacc_csr_reallocate_nz.o psb_d_oacc_csr_cp_from_coo.o \
psb_d_oacc_csr_cp_from_fmt.o psb_d_oacc_csr_mv_from_coo.o \
psb_d_oacc_csr_mv_from_fmt.o psb_d_oacc_csr_mold.o: $(UP)/psb_d_oacc_csr_mat_mod.o
psb_d_oacc_csr_mv_from_fmt.o psb_d_oacc_csr_mold.o: $(UP)/psb_d_oacc_csr_mat_mod.o $(UP)/psb_d_oacc_vect_mod.o
psb_d_oacc_ell_vect_mv.o psb_d_oacc_ell_inner_vect_sv.o \
psb_d_oacc_ell_scals.o \
psb_d_oacc_ell_scal.o psb_d_oacc_ell_allocate_mnnz.o \
psb_d_oacc_ell_reallocate_nz.o psb_d_oacc_ell_cp_from_coo.o \
psb_d_oacc_ell_cp_from_fmt.o psb_d_oacc_ell_mv_from_coo.o \
psb_d_oacc_ell_mv_from_fmt.o psb_d_oacc_ell_mold.o: $(UP)/psb_d_oacc_ell_mat_mod.o $(UP)/psb_d_oacc_vect_mod.o
psb_d_oacc_hll_vect_mv.o psb_d_oacc_hll_inner_vect_sv.o \
psb_d_oacc_hll_scals.o \
psb_d_oacc_hll_scal.o psb_d_oacc_hll_allocate_mnnz.o \
psb_d_oacc_hll_reallocate_nz.o psb_d_oacc_hll_cp_from_coo.o \
psb_d_oacc_hll_cp_from_fmt.o psb_d_oacc_hll_mv_from_coo.o \
psb_d_oacc_hll_mv_from_fmt.o psb_d_oacc_hll_mold.o: $(UP)/psb_d_oacc_hll_mat_mod.o $(UP)/psb_d_oacc_vect_mod.o
psb_c_oacc_csr_vect_mv.o psb_c_oacc_csr_inner_vect_sv.o \
psb_c_oacc_csr_scals.o \
psb_c_oacc_csr_scal.o psb_c_oacc_csr_allocate_mnnz.o \
psb_c_oacc_csr_reallocate_nz.o psb_c_oacc_csr_cp_from_coo.o \
psb_c_oacc_csr_cp_from_fmt.o psb_c_oacc_csr_mv_from_coo.o \
psb_c_oacc_csr_mv_from_fmt.o psb_c_oacc_csr_mold.o: $(UP)/psb_c_oacc_csr_mat_mod.o $(UP)/psb_c_oacc_vect_mod.o
psb_c_oacc_ell_vect_mv.o psb_c_oacc_ell_inner_vect_sv.o \
psb_c_oacc_ell_scals.o \
psb_c_oacc_ell_scal.o psb_c_oacc_ell_allocate_mnnz.o \
psb_c_oacc_ell_reallocate_nz.o psb_c_oacc_ell_cp_from_coo.o \
psb_c_oacc_ell_cp_from_fmt.o psb_c_oacc_ell_mv_from_coo.o \
psb_c_oacc_ell_mv_from_fmt.o psb_c_oacc_ell_mold.o: $(UP)/psb_c_oacc_ell_mat_mod.o $(UP)/psb_c_oacc_vect_mod.o
psb_c_oacc_hll_vect_mv.o psb_c_oacc_hll_inner_vect_sv.o \
psb_c_oacc_hll_scals.o \
psb_c_oacc_hll_scal.o psb_c_oacc_hll_allocate_mnnz.o \
psb_c_oacc_hll_reallocate_nz.o psb_c_oacc_hll_cp_from_coo.o \
psb_c_oacc_hll_cp_from_fmt.o psb_c_oacc_hll_mv_from_coo.o \
psb_c_oacc_hll_mv_from_fmt.o psb_c_oacc_hll_mold.o: $(UP)/psb_c_oacc_hll_mat_mod.o $(UP)/psb_c_oacc_vect_mod.o
psb_z_oacc_csr_vect_mv.o psb_z_oacc_csr_inner_vect_sv.o \
psb_z_oacc_csr_scals.o \
psb_z_oacc_csr_scal.o psb_z_oacc_csr_allocate_mnnz.o \
psb_z_oacc_csr_reallocate_nz.o psb_z_oacc_csr_cp_from_coo.o \
psb_z_oacc_csr_cp_from_fmt.o psb_z_oacc_csr_mv_from_coo.o \
psb_z_oacc_csr_mv_from_fmt.o psb_z_oacc_csr_mold.o: $(UP)/psb_z_oacc_csr_mat_mod.o $(UP)/psb_z_oacc_vect_mod.o
psb_z_oacc_ell_vect_mv.o psb_z_oacc_ell_inner_vect_sv.o \
psb_z_oacc_ell_scals.o \
psb_z_oacc_ell_scal.o psb_z_oacc_ell_allocate_mnnz.o \
psb_z_oacc_ell_reallocate_nz.o psb_z_oacc_ell_cp_from_coo.o \
psb_z_oacc_ell_cp_from_fmt.o psb_z_oacc_ell_mv_from_coo.o \
psb_z_oacc_ell_mv_from_fmt.o psb_z_oacc_ell_mold.o: $(UP)/psb_z_oacc_ell_mat_mod.o $(UP)/psb_z_oacc_vect_mod.o
psb_z_oacc_hll_vect_mv.o psb_z_oacc_hll_inner_vect_sv.o \
psb_z_oacc_hll_scals.o \
psb_z_oacc_hll_scal.o psb_z_oacc_hll_allocate_mnnz.o \
psb_z_oacc_hll_reallocate_nz.o psb_z_oacc_hll_cp_from_coo.o \
psb_z_oacc_hll_cp_from_fmt.o psb_z_oacc_hll_mv_from_coo.o \
psb_z_oacc_hll_mv_from_fmt.o psb_z_oacc_hll_mold.o: $(UP)/psb_z_oacc_hll_mat_mod.o $(UP)/psb_z_oacc_vect_mod.o
#psb_d_oacc_mlt_v_2.o psb_d_oacc_mlt_v.o: $(UP)/psb_d_oacc_vect_mod.o
psb_s_oacc_mlt_v_2.o psb_s_oacc_mlt_v.o: $(UP)/psb_s_oacc_vect_mod.o
psb_d_oacc_mlt_v_2.o psb_d_oacc_mlt_v.o: $(UP)/psb_d_oacc_vect_mod.o
psb_c_oacc_mlt_v_2.o psb_c_oacc_mlt_v.o: $(UP)/psb_c_oacc_vect_mod.o
psb_z_oacc_mlt_v_2.o psb_z_oacc_mlt_v.o: $(UP)/psb_z_oacc_vect_mod.o
clean:

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -21,14 +23,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_c_vect_oacc)
select type (yy => y)
class is (psb_c_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_c_csr_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, alpha, val, ja, irp, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nzt, nc
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -18,19 +20,40 @@ contains
nzt = a%nzt
nc = size(a%ja,2)
if ((n /= size(x%v)) .or. (m /= size(y%v))) then
write(0,*) 'Size error ', m, n, size(x%v), size(y%v)
write(0,*) 'oellmv Size error ', m, n, size(x%v), size(y%v)
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_c_vect_oacc)
select type (yy => y)
class is (psb_c_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_c_ell_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, nc, alpha, val, ja, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nhacks, hksz
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -23,14 +25,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_c_vect_oacc)
select type (yy => y)
class is (psb_c_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_c_hll_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, nhacks, hksz, alpha, val, ja, hkoffs, x, beta, y, info)

@ -9,10 +9,11 @@ subroutine psb_c_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
integer(psb_ipk_), intent(out) :: info
character(len=1), intent(in), optional :: conjgx, conjgy
integer(psb_ipk_) :: i, n
logical :: conjgx_, conjgy_
logical :: conjgx_, conjgy_, device_done
conjgx_ = .false.
conjgy_ = .false.
device_done = .false.
if (present(conjgx)) conjgx_ = (psb_toupper(conjgx) == 'C')
if (present(conjgy)) conjgy_ = (psb_toupper(conjgy) == 'C')
@ -27,31 +28,10 @@ subroutine psb_c_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
if ((beta /= czero) .and. (z%is_host())) call z%sync()
call c_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
call z%set_dev()
class default
if (xx%is_dev()) call xx%sync()
if (yy%is_dev()) call yy%sync()
if ((beta /= czero) .and. (z%is_dev())) call z%sync()
!call c_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
if (conjgx_.and.conjgy_) then
do i = 1, n
z%v(i) = alpha * conjg(xx%v(i)) * conjg(yy%v(i)) + beta * z%v(i)
end do
else if (conjgx_.and.(.not.conjgy_)) then
do i = 1, n
z%v(i) = alpha * conjg(xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else if ((.not.conjgx_).and.(conjgy_)) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * conjg(yy%v(i)) + beta * z%v(i)
end do
else
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
end if
call z%set_host()
device_done = .true.
end select
class default
end select
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
if ((beta /= czero) .and. (z%is_dev())) call z%sync()
@ -73,13 +53,14 @@ subroutine psb_c_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
end do
end if
call z%set_host()
end select
end if
contains
subroutine c_inner_oacc_mlt_v_2(n,alpha, x, y, beta, z, info, conjgx, conjgy)
implicit none
integer(psb_ipk_), intent(in) :: n
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(inout) :: x(:), y(:), z(:)
complex(psb_spk_), intent(in) :: alpha, beta
complex(psb_spk_), intent(inout) :: x(:), y(:), z(:)
integer(psb_ipk_), intent(out) :: info
logical, intent(in) :: conjgx, conjgy

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -21,14 +23,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_d_vect_oacc)
select type (yy => y)
class is (psb_d_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_d_csr_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, alpha, val, ja, irp, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nzt, nc
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -18,19 +20,40 @@ contains
nzt = a%nzt
nc = size(a%ja,2)
if ((n /= size(x%v)) .or. (m /= size(y%v))) then
write(0,*) 'Size error ', m, n, size(x%v), size(y%v)
write(0,*) 'oellmv Size error ', m, n, size(x%v), size(y%v)
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_d_vect_oacc)
select type (yy => y)
class is (psb_d_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_d_ell_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, nc, alpha, val, ja, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nhacks, hksz
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -23,14 +25,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_d_vect_oacc)
select type (yy => y)
class is (psb_d_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_d_hll_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, nhacks, hksz, alpha, val, ja, hkoffs, x, beta, y, info)

@ -9,10 +9,11 @@ subroutine psb_d_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
integer(psb_ipk_), intent(out) :: info
character(len=1), intent(in), optional :: conjgx, conjgy
integer(psb_ipk_) :: i, n
logical :: conjgx_, conjgy_
logical :: conjgx_, conjgy_, device_done
conjgx_ = .false.
conjgy_ = .false.
device_done = .false.
if (present(conjgx)) conjgx_ = (psb_toupper(conjgx) == 'C')
if (present(conjgy)) conjgy_ = (psb_toupper(conjgy) == 'C')
@ -27,31 +28,10 @@ subroutine psb_d_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
if ((beta /= dzero) .and. (z%is_host())) call z%sync()
call d_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
call z%set_dev()
class default
if (xx%is_dev()) call xx%sync()
if (yy%is_dev()) call yy%sync()
if ((beta /= dzero) .and. (z%is_dev())) call z%sync()
!call d_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
if (conjgx_.and.conjgy_) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else if (conjgx_.and.(.not.conjgy_)) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else if ((.not.conjgx_).and.(conjgy_)) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
end if
call z%set_host()
device_done = .true.
end select
class default
end select
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
if ((beta /= dzero) .and. (z%is_dev())) call z%sync()
@ -73,13 +53,14 @@ subroutine psb_d_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
end do
end if
call z%set_host()
end select
end if
contains
subroutine d_inner_oacc_mlt_v_2(n,alpha, x, y, beta, z, info, conjgx, conjgy)
implicit none
integer(psb_ipk_), intent(in) :: n
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(inout) :: x(:), y(:), z(:)
real(psb_dpk_), intent(in) :: alpha, beta
real(psb_dpk_), intent(inout) :: x(:), y(:), z(:)
integer(psb_ipk_), intent(out) :: info
logical, intent(in) :: conjgx, conjgy

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -21,14 +23,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_s_vect_oacc)
select type (yy => y)
class is (psb_s_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_s_csr_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, alpha, val, ja, irp, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nzt, nc
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -18,19 +20,40 @@ contains
nzt = a%nzt
nc = size(a%ja,2)
if ((n /= size(x%v)) .or. (m /= size(y%v))) then
write(0,*) 'Size error ', m, n, size(x%v), size(y%v)
write(0,*) 'oellmv Size error ', m, n, size(x%v), size(y%v)
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_s_vect_oacc)
select type (yy => y)
class is (psb_s_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_s_ell_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, nc, alpha, val, ja, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nhacks, hksz
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -23,14 +25,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_s_vect_oacc)
select type (yy => y)
class is (psb_s_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_s_hll_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, nhacks, hksz, alpha, val, ja, hkoffs, x, beta, y, info)

@ -9,10 +9,11 @@ subroutine psb_s_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
integer(psb_ipk_), intent(out) :: info
character(len=1), intent(in), optional :: conjgx, conjgy
integer(psb_ipk_) :: i, n
logical :: conjgx_, conjgy_
logical :: conjgx_, conjgy_, device_done
conjgx_ = .false.
conjgy_ = .false.
device_done = .false.
if (present(conjgx)) conjgx_ = (psb_toupper(conjgx) == 'C')
if (present(conjgy)) conjgy_ = (psb_toupper(conjgy) == 'C')
@ -27,31 +28,10 @@ subroutine psb_s_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
if ((beta /= szero) .and. (z%is_host())) call z%sync()
call s_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
call z%set_dev()
class default
if (xx%is_dev()) call xx%sync()
if (yy%is_dev()) call yy%sync()
if ((beta /= szero) .and. (z%is_dev())) call z%sync()
!call s_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
if (conjgx_.and.conjgy_) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else if (conjgx_.and.(.not.conjgy_)) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else if ((.not.conjgx_).and.(conjgy_)) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
end if
call z%set_host()
device_done = .true.
end select
class default
end select
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
if ((beta /= szero) .and. (z%is_dev())) call z%sync()
@ -73,13 +53,14 @@ subroutine psb_s_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
end do
end if
call z%set_host()
end select
end if
contains
subroutine s_inner_oacc_mlt_v_2(n,alpha, x, y, beta, z, info, conjgx, conjgy)
implicit none
integer(psb_ipk_), intent(in) :: n
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(inout) :: x(:), y(:), z(:)
real(psb_spk_), intent(in) :: alpha, beta
real(psb_spk_), intent(inout) :: x(:), y(:), z(:)
integer(psb_ipk_), intent(out) :: info
logical, intent(in) :: conjgx, conjgy

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -21,14 +23,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_z_vect_oacc)
select type (yy => y)
class is (psb_z_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, alpha, a%val, a%ja, a%irp, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_z_csr_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, alpha, val, ja, irp, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nzt, nc
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -18,19 +20,40 @@ contains
nzt = a%nzt
nc = size(a%ja,2)
if ((n /= size(x%v)) .or. (m /= size(y%v))) then
write(0,*) 'Size error ', m, n, size(x%v), size(y%v)
write(0,*) 'oellmv Size error ', m, n, size(x%v), size(y%v)
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_z_vect_oacc)
select type (yy => y)
class is (psb_z_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, n, nc, alpha, a%val, a%ja, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_z_ell_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, n, nc, alpha, val, ja, x, beta, y, info)

@ -11,6 +11,8 @@ contains
character, optional, intent(in) :: trans
integer(psb_ipk_) :: m, n, nhacks, hksz
character :: trans_
logical :: device_done, tra
info = psb_success_
m = a%get_nrows()
@ -23,14 +25,35 @@ contains
info = psb_err_invalid_mat_state_
return
end if
device_done = .false.
if (present(trans)) then
trans_ = trans
else
trans_ = 'N'
end if
tra = (psb_toupper(trans_) == 'T') .or. (psb_toupper(trans_) == 'C')
if (a%is_host()) call a%sync()
if (x%is_host()) call x%sync()
if (y%is_host()) call y%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
if (.not.tra) then
select type(xx => x)
class is (psb_z_vect_oacc)
select type (yy => y)
class is (psb_z_vect_oacc)
if (a%is_host()) call a%sync()
if (xx%is_host()) call xx%sync()
if (yy%is_host()) call yy%sync()
call inner_spmv(m, nhacks, hksz, alpha, a%val, a%ja, a%hkoffs, x%v, beta, y%v, info)
call y%set_dev()
device_done = .true.
end select
end select
end if
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
call a%psb_z_hll_sparse_mat%spmm(alpha, x%v, beta, y%v, info, trans)
call y%set_host()
end if
contains
subroutine inner_spmv(m, nhacks, hksz, alpha, val, ja, hkoffs, x, beta, y, info)

@ -9,10 +9,11 @@ subroutine psb_z_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
integer(psb_ipk_), intent(out) :: info
character(len=1), intent(in), optional :: conjgx, conjgy
integer(psb_ipk_) :: i, n
logical :: conjgx_, conjgy_
logical :: conjgx_, conjgy_, device_done
conjgx_ = .false.
conjgy_ = .false.
device_done = .false.
if (present(conjgx)) conjgx_ = (psb_toupper(conjgx) == 'C')
if (present(conjgy)) conjgy_ = (psb_toupper(conjgy) == 'C')
@ -27,31 +28,10 @@ subroutine psb_z_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
if ((beta /= zzero) .and. (z%is_host())) call z%sync()
call z_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
call z%set_dev()
class default
if (xx%is_dev()) call xx%sync()
if (yy%is_dev()) call yy%sync()
if ((beta /= zzero) .and. (z%is_dev())) call z%sync()
!call z_inner_oacc_mlt_v_2(n,alpha, xx%v, yy%v, beta, z%v, info, conjgx_, conjgy_)
if (conjgx_.and.conjgy_) then
do i = 1, n
z%v(i) = alpha * conjg(xx%v(i)) * conjg(yy%v(i)) + beta * z%v(i)
end do
else if (conjgx_.and.(.not.conjgy_)) then
do i = 1, n
z%v(i) = alpha * conjg(xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
else if ((.not.conjgx_).and.(conjgy_)) then
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * conjg(yy%v(i)) + beta * z%v(i)
end do
else
do i = 1, n
z%v(i) = alpha * (xx%v(i)) * (yy%v(i)) + beta * z%v(i)
end do
end if
call z%set_host()
device_done = .true.
end select
class default
end select
if (.not.device_done) then
if (x%is_dev()) call x%sync()
if (y%is_dev()) call y%sync()
if ((beta /= zzero) .and. (z%is_dev())) call z%sync()
@ -73,13 +53,14 @@ subroutine psb_z_oacc_mlt_v_2(alpha, x, y, beta, z, info, conjgx, conjgy)
end do
end if
call z%set_host()
end select
end if
contains
subroutine z_inner_oacc_mlt_v_2(n,alpha, x, y, beta, z, info, conjgx, conjgy)
implicit none
integer(psb_ipk_), intent(in) :: n
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(inout) :: x(:), y(:), z(:)
complex(psb_dpk_), intent(in) :: alpha, beta
complex(psb_dpk_), intent(inout) :: x(:), y(:), z(:)
integer(psb_ipk_), intent(out) :: info
logical, intent(in) :: conjgx, conjgy

@ -4,7 +4,6 @@ module psb_c_oacc_csr_mat_mod
use openacc
use psb_c_mat_mod
use psb_c_oacc_vect_mod
!use oaccsparse_mod
integer(psb_ipk_), parameter, private :: is_host = -1
integer(psb_ipk_), parameter, private :: is_sync = 0
@ -17,8 +16,6 @@ module psb_c_oacc_csr_mat_mod
procedure, pass(a) :: sizeof => c_oacc_csr_sizeof
procedure, pass(a) :: vect_mv => psb_c_oacc_csr_vect_mv
procedure, pass(a) :: in_vect_sv => psb_c_oacc_csr_inner_vect_sv
procedure, pass(a) :: csmm => psb_c_oacc_csr_csmm
procedure, pass(a) :: csmv => psb_c_oacc_csr_csmv
procedure, pass(a) :: scals => psb_c_oacc_csr_scals
procedure, pass(a) :: scalv => psb_c_oacc_csr_scal
procedure, pass(a) :: reallocate_nz => psb_c_oacc_csr_reallocate_nz
@ -93,26 +90,6 @@ module psb_c_oacc_csr_mat_mod
end subroutine psb_c_oacc_csr_inner_vect_sv
end interface
interface
module subroutine psb_c_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
class(psb_c_oacc_csr_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
character, optional, intent(in) :: trans
end subroutine psb_c_oacc_csr_csmm
end interface
interface
module subroutine psb_c_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
class(psb_c_oacc_csr_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
character, optional, intent(in) :: trans
end subroutine psb_c_oacc_csr_csmv
end interface
interface
module subroutine psb_c_oacc_csr_scals(d, a, info)
class(psb_c_oacc_csr_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_c_oacc_ell_mat_mod
procedure, pass(a) :: free => c_oacc_ell_free
procedure, pass(a) :: vect_mv => psb_c_oacc_ell_vect_mv
procedure, pass(a) :: in_vect_sv => psb_c_oacc_ell_inner_vect_sv
procedure, pass(a) :: csmm => psb_c_oacc_ell_csmm
procedure, pass(a) :: csmv => psb_c_oacc_ell_csmv
procedure, pass(a) :: scals => psb_c_oacc_ell_scals
procedure, pass(a) :: scalv => psb_c_oacc_ell_scal
procedure, pass(a) :: reallocate_nz => psb_c_oacc_ell_reallocate_nz
@ -92,26 +90,6 @@ module psb_c_oacc_ell_mat_mod
end subroutine psb_c_oacc_ell_inner_vect_sv
end interface
interface
module subroutine psb_c_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
class(psb_c_oacc_ell_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
character, optional, intent(in) :: trans
end subroutine psb_c_oacc_ell_csmm
end interface
interface
module subroutine psb_c_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
class(psb_c_oacc_ell_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
character, optional, intent(in) :: trans
end subroutine psb_c_oacc_ell_csmv
end interface
interface
module subroutine psb_c_oacc_ell_scals(d, a, info)
class(psb_c_oacc_ell_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_c_oacc_hll_mat_mod
procedure, pass(a) :: free => c_oacc_hll_free
procedure, pass(a) :: vect_mv => psb_c_oacc_hll_vect_mv
procedure, pass(a) :: in_vect_sv => psb_c_oacc_hll_inner_vect_sv
procedure, pass(a) :: csmm => psb_c_oacc_hll_csmm
procedure, pass(a) :: csmv => psb_c_oacc_hll_csmv
procedure, pass(a) :: scals => psb_c_oacc_hll_scals
procedure, pass(a) :: scalv => psb_c_oacc_hll_scal
procedure, pass(a) :: reallocate_nz => psb_c_oacc_hll_reallocate_nz
@ -92,26 +90,6 @@ module psb_c_oacc_hll_mat_mod
end subroutine psb_c_oacc_hll_inner_vect_sv
end interface
interface
module subroutine psb_c_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
class(psb_c_oacc_hll_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
character, optional, intent(in) :: trans
end subroutine psb_c_oacc_hll_csmm
end interface
interface
module subroutine psb_c_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
class(psb_c_oacc_hll_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
character, optional, intent(in) :: trans
end subroutine psb_c_oacc_hll_csmv
end interface
interface
module subroutine psb_c_oacc_hll_scals(d, a, info)
class(psb_c_oacc_hll_sparse_mat), intent(inout) :: a

@ -4,7 +4,6 @@ module psb_d_oacc_csr_mat_mod
use openacc
use psb_d_mat_mod
use psb_d_oacc_vect_mod
!use oaccsparse_mod
integer(psb_ipk_), parameter, private :: is_host = -1
integer(psb_ipk_), parameter, private :: is_sync = 0
@ -17,8 +16,6 @@ module psb_d_oacc_csr_mat_mod
procedure, pass(a) :: sizeof => d_oacc_csr_sizeof
procedure, pass(a) :: vect_mv => psb_d_oacc_csr_vect_mv
procedure, pass(a) :: in_vect_sv => psb_d_oacc_csr_inner_vect_sv
procedure, pass(a) :: csmm => psb_d_oacc_csr_csmm
procedure, pass(a) :: csmv => psb_d_oacc_csr_csmv
procedure, pass(a) :: scals => psb_d_oacc_csr_scals
procedure, pass(a) :: scalv => psb_d_oacc_csr_scal
procedure, pass(a) :: reallocate_nz => psb_d_oacc_csr_reallocate_nz
@ -93,26 +90,6 @@ module psb_d_oacc_csr_mat_mod
end subroutine psb_d_oacc_csr_inner_vect_sv
end interface
interface
module subroutine psb_d_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
class(psb_d_oacc_csr_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
character, optional, intent(in) :: trans
end subroutine psb_d_oacc_csr_csmm
end interface
interface
module subroutine psb_d_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
class(psb_d_oacc_csr_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
character, optional, intent(in) :: trans
end subroutine psb_d_oacc_csr_csmv
end interface
interface
module subroutine psb_d_oacc_csr_scals(d, a, info)
class(psb_d_oacc_csr_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_d_oacc_ell_mat_mod
procedure, pass(a) :: free => d_oacc_ell_free
procedure, pass(a) :: vect_mv => psb_d_oacc_ell_vect_mv
procedure, pass(a) :: in_vect_sv => psb_d_oacc_ell_inner_vect_sv
procedure, pass(a) :: csmm => psb_d_oacc_ell_csmm
procedure, pass(a) :: csmv => psb_d_oacc_ell_csmv
procedure, pass(a) :: scals => psb_d_oacc_ell_scals
procedure, pass(a) :: scalv => psb_d_oacc_ell_scal
procedure, pass(a) :: reallocate_nz => psb_d_oacc_ell_reallocate_nz
@ -92,26 +90,6 @@ module psb_d_oacc_ell_mat_mod
end subroutine psb_d_oacc_ell_inner_vect_sv
end interface
interface
module subroutine psb_d_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
class(psb_d_oacc_ell_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
character, optional, intent(in) :: trans
end subroutine psb_d_oacc_ell_csmm
end interface
interface
module subroutine psb_d_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
class(psb_d_oacc_ell_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
character, optional, intent(in) :: trans
end subroutine psb_d_oacc_ell_csmv
end interface
interface
module subroutine psb_d_oacc_ell_scals(d, a, info)
class(psb_d_oacc_ell_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_d_oacc_hll_mat_mod
procedure, pass(a) :: free => d_oacc_hll_free
procedure, pass(a) :: vect_mv => psb_d_oacc_hll_vect_mv
procedure, pass(a) :: in_vect_sv => psb_d_oacc_hll_inner_vect_sv
procedure, pass(a) :: csmm => psb_d_oacc_hll_csmm
procedure, pass(a) :: csmv => psb_d_oacc_hll_csmv
procedure, pass(a) :: scals => psb_d_oacc_hll_scals
procedure, pass(a) :: scalv => psb_d_oacc_hll_scal
procedure, pass(a) :: reallocate_nz => psb_d_oacc_hll_reallocate_nz
@ -92,26 +90,6 @@ module psb_d_oacc_hll_mat_mod
end subroutine psb_d_oacc_hll_inner_vect_sv
end interface
interface
module subroutine psb_d_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
class(psb_d_oacc_hll_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
character, optional, intent(in) :: trans
end subroutine psb_d_oacc_hll_csmm
end interface
interface
module subroutine psb_d_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
class(psb_d_oacc_hll_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
character, optional, intent(in) :: trans
end subroutine psb_d_oacc_hll_csmv
end interface
interface
module subroutine psb_d_oacc_hll_scals(d, a, info)
class(psb_d_oacc_hll_sparse_mat), intent(inout) :: a

@ -4,7 +4,6 @@ module psb_s_oacc_csr_mat_mod
use openacc
use psb_s_mat_mod
use psb_s_oacc_vect_mod
!use oaccsparse_mod
integer(psb_ipk_), parameter, private :: is_host = -1
integer(psb_ipk_), parameter, private :: is_sync = 0
@ -17,8 +16,6 @@ module psb_s_oacc_csr_mat_mod
procedure, pass(a) :: sizeof => s_oacc_csr_sizeof
procedure, pass(a) :: vect_mv => psb_s_oacc_csr_vect_mv
procedure, pass(a) :: in_vect_sv => psb_s_oacc_csr_inner_vect_sv
procedure, pass(a) :: csmm => psb_s_oacc_csr_csmm
procedure, pass(a) :: csmv => psb_s_oacc_csr_csmv
procedure, pass(a) :: scals => psb_s_oacc_csr_scals
procedure, pass(a) :: scalv => psb_s_oacc_csr_scal
procedure, pass(a) :: reallocate_nz => psb_s_oacc_csr_reallocate_nz
@ -93,26 +90,6 @@ module psb_s_oacc_csr_mat_mod
end subroutine psb_s_oacc_csr_inner_vect_sv
end interface
interface
module subroutine psb_s_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
class(psb_s_oacc_csr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_s_oacc_csr_csmm
end interface
interface
module subroutine psb_s_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
class(psb_s_oacc_csr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_s_oacc_csr_csmv
end interface
interface
module subroutine psb_s_oacc_csr_scals(d, a, info)
class(psb_s_oacc_csr_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_s_oacc_ell_mat_mod
procedure, pass(a) :: free => s_oacc_ell_free
procedure, pass(a) :: vect_mv => psb_s_oacc_ell_vect_mv
procedure, pass(a) :: in_vect_sv => psb_s_oacc_ell_inner_vect_sv
procedure, pass(a) :: csmm => psb_s_oacc_ell_csmm
procedure, pass(a) :: csmv => psb_s_oacc_ell_csmv
procedure, pass(a) :: scals => psb_s_oacc_ell_scals
procedure, pass(a) :: scalv => psb_s_oacc_ell_scal
procedure, pass(a) :: reallocate_nz => psb_s_oacc_ell_reallocate_nz
@ -92,26 +90,6 @@ module psb_s_oacc_ell_mat_mod
end subroutine psb_s_oacc_ell_inner_vect_sv
end interface
interface
module subroutine psb_s_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
class(psb_s_oacc_ell_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_s_oacc_ell_csmm
end interface
interface
module subroutine psb_s_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
class(psb_s_oacc_ell_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_s_oacc_ell_csmv
end interface
interface
module subroutine psb_s_oacc_ell_scals(d, a, info)
class(psb_s_oacc_ell_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_s_oacc_hll_mat_mod
procedure, pass(a) :: free => s_oacc_hll_free
procedure, pass(a) :: vect_mv => psb_s_oacc_hll_vect_mv
procedure, pass(a) :: in_vect_sv => psb_s_oacc_hll_inner_vect_sv
procedure, pass(a) :: csmm => psb_s_oacc_hll_csmm
procedure, pass(a) :: csmv => psb_s_oacc_hll_csmv
procedure, pass(a) :: scals => psb_s_oacc_hll_scals
procedure, pass(a) :: scalv => psb_s_oacc_hll_scal
procedure, pass(a) :: reallocate_nz => psb_s_oacc_hll_reallocate_nz
@ -92,26 +90,6 @@ module psb_s_oacc_hll_mat_mod
end subroutine psb_s_oacc_hll_inner_vect_sv
end interface
interface
module subroutine psb_s_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
class(psb_s_oacc_hll_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_s_oacc_hll_csmm
end interface
interface
module subroutine psb_s_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
class(psb_s_oacc_hll_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_s_oacc_hll_csmv
end interface
interface
module subroutine psb_s_oacc_hll_scals(d, a, info)
class(psb_s_oacc_hll_sparse_mat), intent(inout) :: a

@ -4,7 +4,6 @@ module psb_z_oacc_csr_mat_mod
use openacc
use psb_z_mat_mod
use psb_z_oacc_vect_mod
!use oaccsparse_mod
integer(psb_ipk_), parameter, private :: is_host = -1
integer(psb_ipk_), parameter, private :: is_sync = 0
@ -17,8 +16,6 @@ module psb_z_oacc_csr_mat_mod
procedure, pass(a) :: sizeof => z_oacc_csr_sizeof
procedure, pass(a) :: vect_mv => psb_z_oacc_csr_vect_mv
procedure, pass(a) :: in_vect_sv => psb_z_oacc_csr_inner_vect_sv
procedure, pass(a) :: csmm => psb_z_oacc_csr_csmm
procedure, pass(a) :: csmv => psb_z_oacc_csr_csmv
procedure, pass(a) :: scals => psb_z_oacc_csr_scals
procedure, pass(a) :: scalv => psb_z_oacc_csr_scal
procedure, pass(a) :: reallocate_nz => psb_z_oacc_csr_reallocate_nz
@ -93,26 +90,6 @@ module psb_z_oacc_csr_mat_mod
end subroutine psb_z_oacc_csr_inner_vect_sv
end interface
interface
module subroutine psb_z_oacc_csr_csmm(alpha, a, x, beta, y, info, trans)
class(psb_z_oacc_csr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_z_oacc_csr_csmm
end interface
interface
module subroutine psb_z_oacc_csr_csmv(alpha, a, x, beta, y, info, trans)
class(psb_z_oacc_csr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_z_oacc_csr_csmv
end interface
interface
module subroutine psb_z_oacc_csr_scals(d, a, info)
class(psb_z_oacc_csr_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_z_oacc_ell_mat_mod
procedure, pass(a) :: free => z_oacc_ell_free
procedure, pass(a) :: vect_mv => psb_z_oacc_ell_vect_mv
procedure, pass(a) :: in_vect_sv => psb_z_oacc_ell_inner_vect_sv
procedure, pass(a) :: csmm => psb_z_oacc_ell_csmm
procedure, pass(a) :: csmv => psb_z_oacc_ell_csmv
procedure, pass(a) :: scals => psb_z_oacc_ell_scals
procedure, pass(a) :: scalv => psb_z_oacc_ell_scal
procedure, pass(a) :: reallocate_nz => psb_z_oacc_ell_reallocate_nz
@ -92,26 +90,6 @@ module psb_z_oacc_ell_mat_mod
end subroutine psb_z_oacc_ell_inner_vect_sv
end interface
interface
module subroutine psb_z_oacc_ell_csmm(alpha, a, x, beta, y, info, trans)
class(psb_z_oacc_ell_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_z_oacc_ell_csmm
end interface
interface
module subroutine psb_z_oacc_ell_csmv(alpha, a, x, beta, y, info, trans)
class(psb_z_oacc_ell_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_z_oacc_ell_csmv
end interface
interface
module subroutine psb_z_oacc_ell_scals(d, a, info)
class(psb_z_oacc_ell_sparse_mat), intent(inout) :: a

@ -26,8 +26,6 @@ module psb_z_oacc_hll_mat_mod
procedure, pass(a) :: free => z_oacc_hll_free
procedure, pass(a) :: vect_mv => psb_z_oacc_hll_vect_mv
procedure, pass(a) :: in_vect_sv => psb_z_oacc_hll_inner_vect_sv
procedure, pass(a) :: csmm => psb_z_oacc_hll_csmm
procedure, pass(a) :: csmv => psb_z_oacc_hll_csmv
procedure, pass(a) :: scals => psb_z_oacc_hll_scals
procedure, pass(a) :: scalv => psb_z_oacc_hll_scal
procedure, pass(a) :: reallocate_nz => psb_z_oacc_hll_reallocate_nz
@ -92,26 +90,6 @@ module psb_z_oacc_hll_mat_mod
end subroutine psb_z_oacc_hll_inner_vect_sv
end interface
interface
module subroutine psb_z_oacc_hll_csmm(alpha, a, x, beta, y, info, trans)
class(psb_z_oacc_hll_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_z_oacc_hll_csmm
end interface
interface
module subroutine psb_z_oacc_hll_csmv(alpha, a, x, beta, y, info, trans)
class(psb_z_oacc_hll_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
end subroutine psb_z_oacc_hll_csmv
end interface
interface
module subroutine psb_z_oacc_hll_scals(d, a, info)
class(psb_z_oacc_hll_sparse_mat), intent(inout) :: a

Loading…
Cancel
Save