Improve cuda%zero()

This commit is contained in:
sfilippone
2024-02-20 14:04:23 +01:00
parent 0e269ed641
commit b5d5f97661
5 changed files with 15 additions and 5 deletions
+3 -1
View File
@@ -668,7 +668,9 @@ contains
use psi_serial_mod
implicit none
class(psb_c_vect_cuda), intent(inout) :: x
! Since we are overwriting, make sure to do it
! on the GPU side
call x%set_dev()
call x%set_scal(czero)
end subroutine c_cuda_zero
+3 -1
View File
@@ -668,7 +668,9 @@ contains
use psi_serial_mod
implicit none
class(psb_d_vect_cuda), intent(inout) :: x
! Since we are overwriting, make sure to do it
! on the GPU side
call x%set_dev()
call x%set_scal(dzero)
end subroutine d_cuda_zero
+3 -1
View File
@@ -650,7 +650,9 @@ contains
use psi_serial_mod
implicit none
class(psb_i_vect_cuda), intent(inout) :: x
! Since we are overwriting, make sure to do it
! on the GPU side
call x%set_dev()
call x%set_scal(izero)
end subroutine i_cuda_zero
+3 -1
View File
@@ -668,7 +668,9 @@ contains
use psi_serial_mod
implicit none
class(psb_s_vect_cuda), intent(inout) :: x
! Since we are overwriting, make sure to do it
! on the GPU side
call x%set_dev()
call x%set_scal(szero)
end subroutine s_cuda_zero
+3 -1
View File
@@ -668,7 +668,9 @@ contains
use psi_serial_mod
implicit none
class(psb_z_vect_cuda), intent(inout) :: x
! Since we are overwriting, make sure to do it
! on the GPU side
call x%set_dev()
call x%set_scal(zzero)
end subroutine z_cuda_zero