|
|
@ -1340,6 +1340,7 @@ module psb_c_base_multivect_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
|
|
|
|
use psb_c_base_vect_mod
|
|
|
|
|
|
|
|
|
|
|
|
!> \namespace psb_base_mod \class psb_c_base_vect_type
|
|
|
|
!> \namespace psb_base_mod \class psb_c_base_vect_type
|
|
|
|
!! The psb_c_base_vect_type
|
|
|
|
!! The psb_c_base_vect_type
|
|
|
@ -1440,9 +1441,9 @@ module psb_c_base_multivect_mod
|
|
|
|
!!$ ! May have to be reworked.
|
|
|
|
!!$ ! May have to be reworked.
|
|
|
|
!!$ !
|
|
|
|
!!$ !
|
|
|
|
procedure, pass(x) :: gthab => c_base_mlv_gthab
|
|
|
|
procedure, pass(x) :: gthab => c_base_mlv_gthab
|
|
|
|
!!$ procedure, pass(x) :: gthzv => c_base_mlv_gthzv
|
|
|
|
procedure, pass(x) :: gthzv => c_base_mlv_gthzv
|
|
|
|
!!$ procedure, pass(x) :: gthzv_x => c_base_mlv_gthzv_x
|
|
|
|
procedure, pass(x) :: gthzv_x => c_base_mlv_gthzv_x
|
|
|
|
!!$ generic, public :: gth => gthab, gthzv, gthzv_x
|
|
|
|
generic, public :: gth => gthab, gthzv, gthzv_x
|
|
|
|
!!$ procedure, pass(y) :: sctb => c_base_mlv_sctb
|
|
|
|
!!$ procedure, pass(y) :: sctb => c_base_mlv_sctb
|
|
|
|
!!$ procedure, pass(y) :: sctb_x => c_base_mlv_sctb_x
|
|
|
|
!!$ procedure, pass(y) :: sctb_x => c_base_mlv_sctb_x
|
|
|
|
!!$ generic, public :: sct => sctb, sctb_x
|
|
|
|
!!$ generic, public :: sct => sctb, sctb_x
|
|
|
@ -2435,46 +2436,53 @@ contains
|
|
|
|
call psi_gth(n,nc,idx,alpha,x%v,beta,y)
|
|
|
|
call psi_gth(n,nc,idx,alpha,x%v,beta,y)
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine c_base_mlv_gthab
|
|
|
|
end subroutine c_base_mlv_gthab
|
|
|
|
!!$ !
|
|
|
|
!
|
|
|
|
!!$ ! shortcut alpha=1 beta=0
|
|
|
|
! shortcut alpha=1 beta=0
|
|
|
|
!!$ !
|
|
|
|
!
|
|
|
|
!!$ !> Function base_mlv_gthzv
|
|
|
|
!> Function base_mlv_gthzv
|
|
|
|
!!$ !! \memberof psb_c_base_multivect_type
|
|
|
|
!! \memberof psb_c_base_multivect_type
|
|
|
|
!!$ !! \brief gather into an array special alpha=1 beta=0
|
|
|
|
!! \brief gather into an array special alpha=1 beta=0
|
|
|
|
!!$ !! Y = X(IDX(:))
|
|
|
|
!! Y = X(IDX(:))
|
|
|
|
!!$ !! \param n how many entries to consider
|
|
|
|
!! \param n how many entries to consider
|
|
|
|
!!$ !! \param idx(:) indices
|
|
|
|
!! \param idx(:) indices
|
|
|
|
!!$ subroutine c_base_mlv_gthzv_x(i,n,idx,x,y)
|
|
|
|
subroutine c_base_mlv_gthzv_x(i,n,idx,x,y)
|
|
|
|
!!$ use psi_serial_mod
|
|
|
|
use psi_serial_mod
|
|
|
|
!!$ integer(psb_ipk_) :: i,n
|
|
|
|
integer(psb_ipk_) :: i,n
|
|
|
|
!!$ class(psb_c_base_multivect_type) :: idx
|
|
|
|
class(psb_i_base_vect_type) :: idx
|
|
|
|
!!$ complex(psb_spk_) :: y(:)
|
|
|
|
complex(psb_spk_) :: y(:)
|
|
|
|
!!$ class(psb_c_base_multivect_type) :: x
|
|
|
|
class(psb_c_base_multivect_type) :: x
|
|
|
|
!!$
|
|
|
|
|
|
|
|
!!$ call x%gth(n,idx%v(i:),y)
|
|
|
|
call x%sync()
|
|
|
|
!!$
|
|
|
|
call x%gth(n,idx%v(i:),y)
|
|
|
|
!!$ end subroutine c_base_mlv_gthzv_x
|
|
|
|
|
|
|
|
!!$
|
|
|
|
end subroutine c_base_mlv_gthzv_x
|
|
|
|
!!$ !
|
|
|
|
|
|
|
|
!!$ ! shortcut alpha=1 beta=0
|
|
|
|
!
|
|
|
|
!!$ !
|
|
|
|
! shortcut alpha=1 beta=0
|
|
|
|
!!$ !> Function base_mlv_gthzv
|
|
|
|
!
|
|
|
|
!!$ !! \memberof psb_c_base_multivect_type
|
|
|
|
!> Function base_mlv_gthzv
|
|
|
|
!!$ !! \brief gather into an array special alpha=1 beta=0
|
|
|
|
!! \memberof psb_c_base_multivect_type
|
|
|
|
!!$ !! Y = X(IDX(:))
|
|
|
|
!! \brief gather into an array special alpha=1 beta=0
|
|
|
|
!!$ !! \param n how many entries to consider
|
|
|
|
!! Y = X(IDX(:))
|
|
|
|
!!$ !! \param idx(:) indices
|
|
|
|
!! \param n how many entries to consider
|
|
|
|
!!$ subroutine c_base_mlv_gthzv(n,idx,x,y)
|
|
|
|
!! \param idx(:) indices
|
|
|
|
!!$ use psi_serial_mod
|
|
|
|
subroutine c_base_mlv_gthzv(n,idx,x,y)
|
|
|
|
!!$ integer(psb_ipk_) :: n, idx(:)
|
|
|
|
use psi_serial_mod
|
|
|
|
!!$ complex(psb_spk_) :: y(:)
|
|
|
|
integer(psb_ipk_) :: n, idx(:)
|
|
|
|
!!$ class(psb_c_base_multivect_type) :: x
|
|
|
|
complex(psb_spk_) :: y(:)
|
|
|
|
!!$
|
|
|
|
class(psb_c_base_multivect_type) :: x
|
|
|
|
!!$ call x%sync()
|
|
|
|
integer(psb_ipk_) :: nc
|
|
|
|
!!$ call psi_gth(n,idx,x%v,y)
|
|
|
|
|
|
|
|
!!$
|
|
|
|
call x%sync()
|
|
|
|
!!$ end subroutine c_base_mlv_gthzv
|
|
|
|
if (.not.allocated(x%v)) then
|
|
|
|
!!$
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
nc = psb_size(x%v,2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psi_gth(n,nc,idx,x%v,y)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine c_base_mlv_gthzv
|
|
|
|
|
|
|
|
|
|
|
|
!!$ !
|
|
|
|
!!$ !
|
|
|
|
!!$ ! Scatter:
|
|
|
|
!!$ ! Scatter:
|
|
|
|
!!$ ! Y(IDX(:)) = beta*Y(IDX(:)) + X(:)
|
|
|
|
!!$ ! Y(IDX(:)) = beta*Y(IDX(:)) + X(:)
|
|
|
|