Fix CUDA implementation of %set_scal and %zero

This commit is contained in:
sfilippone
2024-02-02 15:27:42 +01:00
parent 097d63147a
commit 6433dc797e
5 changed files with 5 additions and 15 deletions
+1 -3
View File
@@ -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()
+1 -3
View File
@@ -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()
+1 -3
View File
@@ -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()
+1 -3
View File
@@ -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()
+1 -3
View File
@@ -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()