|
|
|
|
@ -1537,12 +1537,14 @@ contains
|
|
|
|
|
|
|
|
|
|
end subroutine c_cuda_multi_bld_x
|
|
|
|
|
|
|
|
|
|
subroutine c_cuda_multi_bld_n(x,m,n)
|
|
|
|
|
subroutine c_cuda_multi_bld_n(x,m,n,scratch)
|
|
|
|
|
integer(psb_ipk_), intent(in) :: m,n
|
|
|
|
|
class(psb_c_multivect_cuda), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_) :: info
|
|
|
|
|
logical, intent(in), optional :: scratch
|
|
|
|
|
|
|
|
|
|
call x%all(m,n,info)
|
|
|
|
|
call x%asb(m,n,info,scratch=scratch)
|
|
|
|
|
if (info /= 0) then
|
|
|
|
|
call psb_errpush(info,'c_cuda_multi_bld_n',i_err=(/m,n,n,n,n/))
|
|
|
|
|
end if
|
|
|
|
|
@ -1938,7 +1940,7 @@ contains
|
|
|
|
|
call x%set_host()
|
|
|
|
|
end subroutine c_cuda_multi_zero
|
|
|
|
|
|
|
|
|
|
subroutine c_cuda_multi_asb(m,n, x, info)
|
|
|
|
|
subroutine c_cuda_multi_asb(m,n, x, info, scratch)
|
|
|
|
|
use psi_serial_mod
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
@ -1946,12 +1948,14 @@ contains
|
|
|
|
|
class(psb_c_multivect_cuda), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
integer(psb_ipk_) :: nd, nc
|
|
|
|
|
logical, intent(in), optional :: scratch
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
|
|
|
|
|
x%m_nrows = m
|
|
|
|
|
x%m_ncols = n
|
|
|
|
|
if (x%is_host()) then
|
|
|
|
|
call x%psb_c_base_multivect_type%asb(m,n,info)
|
|
|
|
|
call x%psb_c_base_multivect_type%asb(m,n,info,scratch)
|
|
|
|
|
if (info == psb_success_) call x%sync_space(info)
|
|
|
|
|
else if (x%is_dev()) then
|
|
|
|
|
nd = getMultiVecDevicePitch(x%deviceVect)
|
|
|
|
|
@ -2088,11 +2092,11 @@ contains
|
|
|
|
|
call x%set_sync()
|
|
|
|
|
end subroutine c_cuda_multi_vect_finalize
|
|
|
|
|
|
|
|
|
|
subroutine c_cuda_multi_ins(n,irl,val,dupl,x,info)
|
|
|
|
|
subroutine c_cuda_multi_ins(n,irl,val,dupl,x,maxr,info)
|
|
|
|
|
use psi_serial_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_multivect_cuda), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(in) :: n, dupl
|
|
|
|
|
integer(psb_ipk_), intent(in) :: n, dupl,maxr
|
|
|
|
|
integer(psb_ipk_), intent(in) :: irl(:)
|
|
|
|
|
complex(psb_spk_), intent(in) :: val(:,:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
@ -2101,7 +2105,7 @@ contains
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
if (x%is_dev()) call x%sync()
|
|
|
|
|
call x%psb_c_base_multivect_type%ins(n,irl,val,dupl,info)
|
|
|
|
|
call x%psb_c_base_multivect_type%ins(n,irl,val,dupl,maxr,info)
|
|
|
|
|
call x%set_host()
|
|
|
|
|
|
|
|
|
|
end subroutine c_cuda_multi_ins
|
|
|
|
|
|