|
|
|
@ -106,6 +106,7 @@ module psb_c_base_vect_mod
|
|
|
|
|
procedure, nopass :: use_buffer => c_base_use_buffer
|
|
|
|
|
procedure, pass(x) :: new_buffer => c_base_new_buffer
|
|
|
|
|
procedure, nopass :: device_wait => c_base_device_wait
|
|
|
|
|
procedure, pass(x) :: maybe_free_buffer => c_base_maybe_free_buffer
|
|
|
|
|
procedure, pass(x) :: free_buffer => c_base_free_buffer
|
|
|
|
|
procedure, pass(x) :: new_comid => c_base_new_comid
|
|
|
|
|
procedure, pass(x) :: free_comid => c_base_free_comid
|
|
|
|
@ -450,7 +451,6 @@ contains
|
|
|
|
|
call x%sync()
|
|
|
|
|
end subroutine c_base_asb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_free:
|
|
|
|
|
!! \memberof psb_c_base_vect_type
|
|
|
|
@ -477,6 +477,63 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_free_buffer:
|
|
|
|
|
!! \memberof psb_c_base_vect_type
|
|
|
|
|
!! \brief Free aux buffer
|
|
|
|
|
!!
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
subroutine c_base_free_buffer(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
if (allocated(x%combuf)) &
|
|
|
|
|
& deallocate(x%combuf,stat=info)
|
|
|
|
|
end subroutine c_base_free_buffer
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_maybe_free_buffer:
|
|
|
|
|
!! \memberof psb_c_base_vect_type
|
|
|
|
|
!! \brief Conditionally Free aux buffer
|
|
|
|
|
!!
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
subroutine c_base_maybe_free_buffer(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
if (psb_get_maybe_free_buffer())&
|
|
|
|
|
& call x%free_buffer(info)
|
|
|
|
|
|
|
|
|
|
end subroutine c_base_maybe_free_buffer
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_free_comid:
|
|
|
|
|
!! \memberof psb_c_base_vect_type
|
|
|
|
|
!! \brief Free aux MPI communication id buffer
|
|
|
|
|
!!
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
subroutine c_base_free_comid(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
if (allocated(x%comid)) &
|
|
|
|
|
& deallocate(x%comid,stat=info)
|
|
|
|
|
end subroutine c_base_free_comid
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! The base version of SYNC & friends does nothing, it's just
|
|
|
|
|
! a placeholder.
|
|
|
|
@ -1229,27 +1286,6 @@ contains
|
|
|
|
|
end subroutine c_base_new_comid
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine c_base_free_buffer(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
if (allocated(x%combuf)) &
|
|
|
|
|
& deallocate(x%combuf,stat=info)
|
|
|
|
|
end subroutine c_base_free_buffer
|
|
|
|
|
|
|
|
|
|
subroutine c_base_free_comid(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
if (allocated(x%comid)) &
|
|
|
|
|
& deallocate(x%comid,stat=info)
|
|
|
|
|
end subroutine c_base_free_comid
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! shortcut alpha=1 beta=0
|
|
|
|
|
!
|
|
|
|
@ -1447,6 +1483,7 @@ module psb_c_base_multivect_mod
|
|
|
|
|
procedure, nopass :: use_buffer => c_base_mlv_use_buffer
|
|
|
|
|
procedure, pass(x) :: new_buffer => c_base_mlv_new_buffer
|
|
|
|
|
procedure, nopass :: device_wait => c_base_mlv_device_wait
|
|
|
|
|
procedure, pass(x) :: maybe_free_buffer => c_base_mlv_maybe_free_buffer
|
|
|
|
|
procedure, pass(x) :: free_buffer => c_base_mlv_free_buffer
|
|
|
|
|
procedure, pass(x) :: new_comid => c_base_mlv_new_comid
|
|
|
|
|
procedure, pass(x) :: free_comid => c_base_mlv_free_comid
|
|
|
|
@ -2469,6 +2506,19 @@ contains
|
|
|
|
|
end subroutine c_base_mlv_new_comid
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine c_base_mlv_maybe_free_buffer(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_multivect_type), intent(inout) :: x
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
if (psb_get_maybe_free_buffer())&
|
|
|
|
|
& call x%free_buffer(info)
|
|
|
|
|
|
|
|
|
|
end subroutine c_base_mlv_maybe_free_buffer
|
|
|
|
|
|
|
|
|
|
subroutine c_base_mlv_free_buffer(x,info)
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
implicit none
|
|
|
|
|