|
|
|
@ -124,15 +124,15 @@ subroutine psb_s_cuda_hlg_multivect_mv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
use hlldev_mod
|
|
|
|
|
use psb_vectordev_mod
|
|
|
|
|
use psb_s_cuda_hlg_mat_mod, psb_protect_name => psb_s_cuda_hlg_multivect_mv
|
|
|
|
|
use psb_s_cuda_vect_mod
|
|
|
|
|
use psb_s_cuda_multivect_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_cuda_hlg_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_), intent(in) :: alpha, beta
|
|
|
|
|
class(psb_s_base_vect_type), intent(inout) :: x
|
|
|
|
|
class(psb_s_base_vect_type), intent(inout) :: y
|
|
|
|
|
class(psb_s_base_multivect_type), intent(inout) :: x
|
|
|
|
|
class(psb_s_base_multivect_type), intent(inout) :: y
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
real(psb_spk_), allocatable :: rx(:), ry(:)
|
|
|
|
|
real(psb_spk_), allocatable :: rx(:,:), ry(:,:)
|
|
|
|
|
logical :: tra
|
|
|
|
|
character :: trans_
|
|
|
|
|
Integer(Psb_ipk_) :: err_act
|
|
|
|
@ -156,18 +156,18 @@ subroutine psb_s_cuda_hlg_multivect_mv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
tra = (psb_toupper(trans_) == 'T').or.(psb_toupper(trans_)=='C')
|
|
|
|
|
if (tra) then
|
|
|
|
|
if (.not.x%is_host()) call x%sync()
|
|
|
|
|
if (beta /= szero) then
|
|
|
|
|
if (beta /= dzero) then
|
|
|
|
|
if (.not.y%is_host()) call y%sync()
|
|
|
|
|
end if
|
|
|
|
|
if (a%is_dev()) call a%sync()
|
|
|
|
|
call a%psb_s_hll_sparse_mat%spmm(alpha,x,beta,y,info,trans)
|
|
|
|
|
call a%psb_d_hll_sparse_mat%spmm(alpha,x,beta,y,info,trans)
|
|
|
|
|
call y%set_host()
|
|
|
|
|
else
|
|
|
|
|
if (a%is_host()) call a%sync()
|
|
|
|
|
select type (xx => x)
|
|
|
|
|
type is (psb_s_vect_cuda)
|
|
|
|
|
type is (psb_s_multivect_cuda)
|
|
|
|
|
select type(yy => y)
|
|
|
|
|
type is (psb_s_vect_cuda)
|
|
|
|
|
type is (psb_s_multivect_cuda)
|
|
|
|
|
if (xx%is_host()) call xx%sync()
|
|
|
|
|
if (beta /= dzero) then
|
|
|
|
|
if (yy%is_host()) call yy%sync()
|
|
|
|
|