|
|
|
@ -83,8 +83,8 @@ module psb_i_cuda_vect_mod
|
|
|
|
procedure, nopass :: device_wait => i_cuda_device_wait
|
|
|
|
procedure, nopass :: device_wait => i_cuda_device_wait
|
|
|
|
procedure, pass(x) :: free_buffer => i_cuda_free_buffer
|
|
|
|
procedure, pass(x) :: free_buffer => i_cuda_free_buffer
|
|
|
|
procedure, pass(x) :: maybe_free_buffer => i_cuda_maybe_free_buffer
|
|
|
|
procedure, pass(x) :: maybe_free_buffer => i_cuda_maybe_free_buffer
|
|
|
|
|
|
|
|
|
|
|
|
procedure, pass(x) :: check_addr => i_cuda_check_addr
|
|
|
|
procedure, pass(x) :: check_addr => i_cuda_check_addr
|
|
|
|
|
|
|
|
|
|
|
|
final :: i_cuda_vect_finalize
|
|
|
|
final :: i_cuda_vect_finalize
|
|
|
|
end type psb_i_vect_cuda
|
|
|
|
end type psb_i_vect_cuda
|
|
|
|
|
|
|
|
|
|
|
|
@ -213,7 +213,6 @@ contains
|
|
|
|
end select
|
|
|
|
end select
|
|
|
|
end subroutine i_cuda_check_addr
|
|
|
|
end subroutine i_cuda_check_addr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine i_cuda_gthzv_x(i,n,idx,x,y)
|
|
|
|
subroutine i_cuda_gthzv_x(i,n,idx,x,y)
|
|
|
|
use psb_cuda_env_mod
|
|
|
|
use psb_cuda_env_mod
|
|
|
|
use psi_serial_mod
|
|
|
|
use psi_serial_mod
|
|
|
|
@ -811,12 +810,12 @@ contains
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
info = 0
|
|
|
|
|
|
|
|
if (allocated(x%v)) deallocate(x%v, stat=info)
|
|
|
|
if (c_associated(x%deviceVect)) then
|
|
|
|
if (c_associated(x%deviceVect)) then
|
|
|
|
!!$ write(0,*)'d_cuda_free Calling freeMultiVecDevice'
|
|
|
|
!!$ write(0,*)'d_cuda_free Calling freeMultiVecDevice'
|
|
|
|
call freeMultiVecDevice(x%deviceVect)
|
|
|
|
call freeMultiVecDevice(x%deviceVect)
|
|
|
|
x%deviceVect=c_null_ptr
|
|
|
|
x%deviceVect=c_null_ptr
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
if (allocated(x%v)) deallocate(x%v, stat=info)
|
|
|
|
|
|
|
|
call x%free_buffer(info)
|
|
|
|
call x%free_buffer(info)
|
|
|
|
call x%set_sync()
|
|
|
|
call x%set_sync()
|
|
|
|
end subroutine i_cuda_free
|
|
|
|
end subroutine i_cuda_free
|
|
|
|
|