|
|
|
|
@ -115,6 +115,7 @@ module psb_c_base_vect_mod
|
|
|
|
|
procedure, pass(x) :: is_bld => c_base_is_bld
|
|
|
|
|
procedure, pass(x) :: is_upd => c_base_is_upd
|
|
|
|
|
procedure, pass(x) :: is_asb => c_base_is_asb
|
|
|
|
|
procedure, pass(x) :: base_cpy => c_base_cpy
|
|
|
|
|
!
|
|
|
|
|
! Sync: centerpiece of handling of external storage.
|
|
|
|
|
! Any derived class having extra storage upon sync
|
|
|
|
|
@ -686,7 +687,7 @@ contains
|
|
|
|
|
end select
|
|
|
|
|
call psb_move_alloc(vv,x%v,info)
|
|
|
|
|
if (allocated(x%iv)) deallocate(x%iv,stat=info)
|
|
|
|
|
else if (x%is_upd().or.scratch_) then
|
|
|
|
|
else if (x%is_upd().or.x%is_asb().or.scratch_) then
|
|
|
|
|
if (x%get_nrows() < n) &
|
|
|
|
|
& call psb_realloc(n,x%v,info)
|
|
|
|
|
if (info /= 0) &
|
|
|
|
|
@ -700,7 +701,9 @@ contains
|
|
|
|
|
& call psb_realloc(n,x%v,info)
|
|
|
|
|
if (info /= 0) &
|
|
|
|
|
& call psb_errpush(psb_err_alloc_dealloc_,'vect_asb')
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
call x%set_host()
|
|
|
|
|
call x%set_asb()
|
|
|
|
|
call x%sync()
|
|
|
|
|
end subroutine c_base_asb_m
|
|
|
|
|
|
|
|
|
|
@ -767,7 +770,7 @@ contains
|
|
|
|
|
end select
|
|
|
|
|
call psb_move_alloc(vv,x%v,info)
|
|
|
|
|
if (allocated(x%iv)) deallocate(x%iv,stat=info)
|
|
|
|
|
else if (x%is_upd().or.scratch_) then
|
|
|
|
|
else if (x%is_upd().or.x%is_asb().or.scratch_) then
|
|
|
|
|
if (x%get_nrows() < n) &
|
|
|
|
|
& call psb_realloc(n,x%v,info)
|
|
|
|
|
if (info /= 0) &
|
|
|
|
|
@ -782,6 +785,8 @@ contains
|
|
|
|
|
if (info /= 0) &
|
|
|
|
|
& call psb_errpush(psb_err_alloc_dealloc_,'vect_asb')
|
|
|
|
|
end if
|
|
|
|
|
call x%set_host()
|
|
|
|
|
call x%set_asb()
|
|
|
|
|
call x%sync()
|
|
|
|
|
end subroutine c_base_asb_e
|
|
|
|
|
|
|
|
|
|
@ -1063,6 +1068,24 @@ contains
|
|
|
|
|
res = .true.
|
|
|
|
|
end function c_base_is_sync
|
|
|
|
|
|
|
|
|
|
!> Function base_cpy:
|
|
|
|
|
!! \memberof psb_d_base_vect_type
|
|
|
|
|
!! \brief base_cpy: copy base contents
|
|
|
|
|
!! \param y returned variable
|
|
|
|
|
!!
|
|
|
|
|
subroutine c_base_cpy(x, y)
|
|
|
|
|
use psi_serial_mod
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(in) :: x
|
|
|
|
|
class(psb_c_base_vect_type), intent(out) :: y
|
|
|
|
|
|
|
|
|
|
if (allocated(x%v)) call y%bld(x%v)
|
|
|
|
|
call y%set_state(x%get_state())
|
|
|
|
|
call y%set_dupl(x%get_dupl())
|
|
|
|
|
call y%set_ncfs(x%get_ncfs())
|
|
|
|
|
if (allocated(x%iv)) y%iv = x%iv
|
|
|
|
|
end subroutine c_base_cpy
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Size info.
|
|
|
|
|
|