Fix CUDA implementation of %set_scal and %zero

repack-nvid
sfilippone 1 year ago
parent 097d63147a
commit 6433dc797e

@ -668,8 +668,7 @@ contains
implicit none
class(psb_c_vect_cuda), intent(inout) :: x
if (allocated(x%v)) x%v=czero
call x%set_host()
call x%set_scal(czero)
end subroutine c_cuda_zero
subroutine c_cuda_asb_m(n, x, info)
@ -807,7 +806,6 @@ contains
if (present(first)) first_ = max(1,first)
if (present(last)) last_ = min(last,last_)
if (x%is_host()) call x%sync()
info = setScalDevice(val,first_,last_,1,x%deviceVect)
call x%set_dev()

@ -668,8 +668,7 @@ contains
implicit none
class(psb_d_vect_cuda), intent(inout) :: x
if (allocated(x%v)) x%v=dzero
call x%set_host()
call x%set_scal(dzero)
end subroutine d_cuda_zero
subroutine d_cuda_asb_m(n, x, info)
@ -807,7 +806,6 @@ contains
if (present(first)) first_ = max(1,first)
if (present(last)) last_ = min(last,last_)
if (x%is_host()) call x%sync()
info = setScalDevice(val,first_,last_,1,x%deviceVect)
call x%set_dev()

@ -651,8 +651,7 @@ contains
implicit none
class(psb_i_vect_cuda), intent(inout) :: x
if (allocated(x%v)) x%v=izero
call x%set_host()
call x%set_scal(izero)
end subroutine i_cuda_zero
subroutine i_cuda_asb_m(n, x, info)
@ -790,7 +789,6 @@ contains
if (present(first)) first_ = max(1,first)
if (present(last)) last_ = min(last,last_)
if (x%is_host()) call x%sync()
info = setScalDevice(val,first_,last_,1,x%deviceVect)
call x%set_dev()

@ -668,8 +668,7 @@ contains
implicit none
class(psb_s_vect_cuda), intent(inout) :: x
if (allocated(x%v)) x%v=szero
call x%set_host()
call x%set_scal(szero)
end subroutine s_cuda_zero
subroutine s_cuda_asb_m(n, x, info)
@ -807,7 +806,6 @@ contains
if (present(first)) first_ = max(1,first)
if (present(last)) last_ = min(last,last_)
if (x%is_host()) call x%sync()
info = setScalDevice(val,first_,last_,1,x%deviceVect)
call x%set_dev()

@ -668,8 +668,7 @@ contains
implicit none
class(psb_z_vect_cuda), intent(inout) :: x
if (allocated(x%v)) x%v=zzero
call x%set_host()
call x%set_scal(zzero)
end subroutine z_cuda_zero
subroutine z_cuda_asb_m(n, x, info)
@ -807,7 +806,6 @@ contains
if (present(first)) first_ = max(1,first)
if (present(last)) last_ = min(last,last_)
if (x%is_host()) call x%sync()
info = setScalDevice(val,first_,last_,1,x%deviceVect)
call x%set_dev()

Loading…
Cancel
Save