Optional argument in GETROW.

psblas-3.5-maint
Salvatore Filippone 7 years ago
parent cee05fc021
commit 6c6d2c71ee

@ -316,7 +316,7 @@ module psb_c_base_mat_mod
! !
interface interface
subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_
class(psb_c_base_sparse_mat), intent(in) :: a class(psb_c_base_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -327,7 +327,7 @@ module psb_c_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale, chksz
end subroutine psb_c_base_csgetrow end subroutine psb_c_base_csgetrow
end interface end interface
@ -355,7 +355,7 @@ module psb_c_base_mat_mod
! !
interface interface
subroutine psb_c_base_csgetblk(imin,imax,a,b,info,& subroutine psb_c_base_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_c_base_sparse_mat, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_base_sparse_mat, psb_c_coo_sparse_mat, psb_spk_
class(psb_c_base_sparse_mat), intent(in) :: a class(psb_c_base_sparse_mat), intent(in) :: a
class(psb_c_coo_sparse_mat), intent(inout) :: b class(psb_c_coo_sparse_mat), intent(inout) :: b
@ -364,7 +364,7 @@ module psb_c_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_c_base_csgetblk end subroutine psb_c_base_csgetblk
end interface end interface
@ -1550,7 +1550,7 @@ module psb_c_base_mat_mod
!! \see psb_c_base_mat_mod::psb_c_base_csgetrow !! \see psb_c_base_mat_mod::psb_c_base_csgetrow
interface interface
subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
class(psb_c_coo_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -1561,7 +1561,7 @@ module psb_c_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_c_coo_csgetrow end subroutine psb_c_coo_csgetrow
end interface end interface

@ -313,7 +313,7 @@ module psb_c_csc_mat_mod
!! \see psb_c_base_mat_mod::psb_c_base_csgetrow !! \see psb_c_base_mat_mod::psb_c_base_csgetrow
interface interface
subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_csc_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -324,27 +324,27 @@ module psb_c_csc_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_c_csc_csgetrow end subroutine psb_c_csc_csgetrow
end interface end interface
!> \memberof psb_c_csc_sparse_mat !!$ !> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetblk !!$ !! \see psb_c_base_mat_mod::psb_c_base_csgetblk
interface !!$ interface
subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_, psb_c_coo_sparse_mat !!$ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_, psb_c_coo_sparse_mat
class(psb_c_csc_sparse_mat), intent(in) :: a !!$ class(psb_c_csc_sparse_mat), intent(in) :: a
class(psb_c_coo_sparse_mat), intent(inout) :: b !!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_c_csc_csgetblk !!$ end subroutine psb_c_csc_csgetblk
end interface !!$ end interface
!!$
!> \memberof psb_c_csc_sparse_mat !> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssv !! \see psb_c_base_mat_mod::psb_c_base_cssv
interface interface

@ -405,7 +405,7 @@ module psb_c_csr_mat_mod
!! \see psb_c_base_mat_mod::psb_c_base_csgetrow !! \see psb_c_base_mat_mod::psb_c_base_csgetrow
interface interface
subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -416,26 +416,26 @@ module psb_c_csr_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_c_csr_csgetrow end subroutine psb_c_csr_csgetrow
end interface end interface
!!$
!> \memberof psb_c_csr_sparse_mat !!$ !> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetblk !!$ !! \see psb_c_base_mat_mod::psb_c_base_csgetblk
interface !!$ interface
subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_, psb_c_coo_sparse_mat !!$ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_, psb_c_coo_sparse_mat
class(psb_c_csr_sparse_mat), intent(in) :: a !!$ class(psb_c_csr_sparse_mat), intent(in) :: a
class(psb_c_coo_sparse_mat), intent(inout) :: b !!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
end subroutine psb_c_csr_csgetblk !!$ end subroutine psb_c_csr_csgetblk
end interface !!$ end interface
!> \memberof psb_c_csr_sparse_mat !> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssv !! \see psb_c_base_mat_mod::psb_c_base_cssv

@ -450,7 +450,7 @@ module psb_c_mat_mod
interface interface
subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_cspmat_type, psb_spk_ import :: psb_ipk_, psb_cspmat_type, psb_spk_
class(psb_cspmat_type), intent(in) :: a class(psb_cspmat_type), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -461,7 +461,7 @@ module psb_c_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_c_csgetrow end subroutine psb_c_csgetrow
end interface end interface

@ -316,7 +316,7 @@ module psb_d_base_mat_mod
! !
interface interface
subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_
class(psb_d_base_sparse_mat), intent(in) :: a class(psb_d_base_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -327,7 +327,7 @@ module psb_d_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale, chksz
end subroutine psb_d_base_csgetrow end subroutine psb_d_base_csgetrow
end interface end interface
@ -355,7 +355,7 @@ module psb_d_base_mat_mod
! !
interface interface
subroutine psb_d_base_csgetblk(imin,imax,a,b,info,& subroutine psb_d_base_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_base_sparse_mat, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_base_sparse_mat, psb_d_coo_sparse_mat, psb_dpk_
class(psb_d_base_sparse_mat), intent(in) :: a class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b class(psb_d_coo_sparse_mat), intent(inout) :: b
@ -364,7 +364,7 @@ module psb_d_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_base_csgetblk end subroutine psb_d_base_csgetblk
end interface end interface
@ -1550,7 +1550,7 @@ module psb_d_base_mat_mod
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow !! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
class(psb_d_coo_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -1561,7 +1561,7 @@ module psb_d_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_coo_csgetrow end subroutine psb_d_coo_csgetrow
end interface end interface

@ -313,7 +313,7 @@ module psb_d_csc_mat_mod
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow !! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_csc_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -324,27 +324,27 @@ module psb_d_csc_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_csc_csgetrow end subroutine psb_d_csc_csgetrow
end interface end interface
!> \memberof psb_d_csc_sparse_mat !!$ !> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetblk !!$ !! \see psb_d_base_mat_mod::psb_d_base_csgetblk
interface !!$ interface
subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat !!$ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat
class(psb_d_csc_sparse_mat), intent(in) :: a !!$ class(psb_d_csc_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b !!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_csc_csgetblk !!$ end subroutine psb_d_csc_csgetblk
end interface !!$ end interface
!!$
!> \memberof psb_d_csc_sparse_mat !> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssv !! \see psb_d_base_mat_mod::psb_d_base_cssv
interface interface

@ -405,7 +405,7 @@ module psb_d_csr_mat_mod
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow !! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -416,26 +416,26 @@ module psb_d_csr_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_csr_csgetrow end subroutine psb_d_csr_csgetrow
end interface end interface
!!$
!> \memberof psb_d_csr_sparse_mat !!$ !> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetblk !!$ !! \see psb_d_base_mat_mod::psb_d_base_csgetblk
interface !!$ interface
subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat !!$ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a !!$ class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b !!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
end subroutine psb_d_csr_csgetblk !!$ end subroutine psb_d_csr_csgetblk
end interface !!$ end interface
!> \memberof psb_d_csr_sparse_mat !> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssv !! \see psb_d_base_mat_mod::psb_d_base_cssv

@ -450,7 +450,7 @@ module psb_d_mat_mod
interface interface
subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_dspmat_type, psb_dpk_ import :: psb_ipk_, psb_dspmat_type, psb_dpk_
class(psb_dspmat_type), intent(in) :: a class(psb_dspmat_type), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -461,7 +461,7 @@ module psb_d_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_d_csgetrow end subroutine psb_d_csgetrow
end interface end interface

@ -316,7 +316,7 @@ module psb_s_base_mat_mod
! !
interface interface
subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_
class(psb_s_base_sparse_mat), intent(in) :: a class(psb_s_base_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -327,7 +327,7 @@ module psb_s_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale, chksz
end subroutine psb_s_base_csgetrow end subroutine psb_s_base_csgetrow
end interface end interface
@ -355,7 +355,7 @@ module psb_s_base_mat_mod
! !
interface interface
subroutine psb_s_base_csgetblk(imin,imax,a,b,info,& subroutine psb_s_base_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_s_base_sparse_mat, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_base_sparse_mat, psb_s_coo_sparse_mat, psb_spk_
class(psb_s_base_sparse_mat), intent(in) :: a class(psb_s_base_sparse_mat), intent(in) :: a
class(psb_s_coo_sparse_mat), intent(inout) :: b class(psb_s_coo_sparse_mat), intent(inout) :: b
@ -364,7 +364,7 @@ module psb_s_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_s_base_csgetblk end subroutine psb_s_base_csgetblk
end interface end interface
@ -1550,7 +1550,7 @@ module psb_s_base_mat_mod
!! \see psb_s_base_mat_mod::psb_s_base_csgetrow !! \see psb_s_base_mat_mod::psb_s_base_csgetrow
interface interface
subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
class(psb_s_coo_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -1561,7 +1561,7 @@ module psb_s_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_s_coo_csgetrow end subroutine psb_s_coo_csgetrow
end interface end interface

@ -313,7 +313,7 @@ module psb_s_csc_mat_mod
!! \see psb_s_base_mat_mod::psb_s_base_csgetrow !! \see psb_s_base_mat_mod::psb_s_base_csgetrow
interface interface
subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_csc_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -324,27 +324,27 @@ module psb_s_csc_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_s_csc_csgetrow end subroutine psb_s_csc_csgetrow
end interface end interface
!> \memberof psb_s_csc_sparse_mat !!$ !> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetblk !!$ !! \see psb_s_base_mat_mod::psb_s_base_csgetblk
interface !!$ interface
subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_, psb_s_coo_sparse_mat !!$ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
class(psb_s_csc_sparse_mat), intent(in) :: a !!$ class(psb_s_csc_sparse_mat), intent(in) :: a
class(psb_s_coo_sparse_mat), intent(inout) :: b !!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_s_csc_csgetblk !!$ end subroutine psb_s_csc_csgetblk
end interface !!$ end interface
!!$
!> \memberof psb_s_csc_sparse_mat !> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssv !! \see psb_s_base_mat_mod::psb_s_base_cssv
interface interface

@ -405,7 +405,7 @@ module psb_s_csr_mat_mod
!! \see psb_s_base_mat_mod::psb_s_base_csgetrow !! \see psb_s_base_mat_mod::psb_s_base_csgetrow
interface interface
subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -416,26 +416,26 @@ module psb_s_csr_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_s_csr_csgetrow end subroutine psb_s_csr_csgetrow
end interface end interface
!!$
!> \memberof psb_s_csr_sparse_mat !!$ !> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetblk !!$ !! \see psb_s_base_mat_mod::psb_s_base_csgetblk
interface !!$ interface
subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_, psb_s_coo_sparse_mat !!$ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
class(psb_s_csr_sparse_mat), intent(in) :: a !!$ class(psb_s_csr_sparse_mat), intent(in) :: a
class(psb_s_coo_sparse_mat), intent(inout) :: b !!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
end subroutine psb_s_csr_csgetblk !!$ end subroutine psb_s_csr_csgetblk
end interface !!$ end interface
!> \memberof psb_s_csr_sparse_mat !> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssv !! \see psb_s_base_mat_mod::psb_s_base_cssv

@ -450,7 +450,7 @@ module psb_s_mat_mod
interface interface
subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_sspmat_type, psb_spk_ import :: psb_ipk_, psb_sspmat_type, psb_spk_
class(psb_sspmat_type), intent(in) :: a class(psb_sspmat_type), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -461,7 +461,7 @@ module psb_s_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_s_csgetrow end subroutine psb_s_csgetrow
end interface end interface

@ -316,7 +316,7 @@ module psb_z_base_mat_mod
! !
interface interface
subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_
class(psb_z_base_sparse_mat), intent(in) :: a class(psb_z_base_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -327,7 +327,7 @@ module psb_z_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale, chksz
end subroutine psb_z_base_csgetrow end subroutine psb_z_base_csgetrow
end interface end interface
@ -355,7 +355,7 @@ module psb_z_base_mat_mod
! !
interface interface
subroutine psb_z_base_csgetblk(imin,imax,a,b,info,& subroutine psb_z_base_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_z_base_sparse_mat, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_base_sparse_mat, psb_z_coo_sparse_mat, psb_dpk_
class(psb_z_base_sparse_mat), intent(in) :: a class(psb_z_base_sparse_mat), intent(in) :: a
class(psb_z_coo_sparse_mat), intent(inout) :: b class(psb_z_coo_sparse_mat), intent(inout) :: b
@ -364,7 +364,7 @@ module psb_z_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_z_base_csgetblk end subroutine psb_z_base_csgetblk
end interface end interface
@ -1550,7 +1550,7 @@ module psb_z_base_mat_mod
!! \see psb_z_base_mat_mod::psb_z_base_csgetrow !! \see psb_z_base_mat_mod::psb_z_base_csgetrow
interface interface
subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
class(psb_z_coo_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -1561,7 +1561,7 @@ module psb_z_base_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_z_coo_csgetrow end subroutine psb_z_coo_csgetrow
end interface end interface

@ -313,7 +313,7 @@ module psb_z_csc_mat_mod
!! \see psb_z_base_mat_mod::psb_z_base_csgetrow !! \see psb_z_base_mat_mod::psb_z_base_csgetrow
interface interface
subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_csc_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -324,27 +324,27 @@ module psb_z_csc_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_z_csc_csgetrow end subroutine psb_z_csc_csgetrow
end interface end interface
!> \memberof psb_z_csc_sparse_mat !!$ !> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetblk !!$ !! \see psb_z_base_mat_mod::psb_z_base_csgetblk
interface !!$ interface
subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale,chksz)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat !!$ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat
class(psb_z_csc_sparse_mat), intent(in) :: a !!$ class(psb_z_csc_sparse_mat), intent(in) :: a
class(psb_z_coo_sparse_mat), intent(inout) :: b !!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_z_csc_csgetblk !!$ end subroutine psb_z_csc_csgetblk
end interface !!$ end interface
!!$
!> \memberof psb_z_csc_sparse_mat !> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssv !! \see psb_z_base_mat_mod::psb_z_base_cssv
interface interface

@ -405,7 +405,7 @@ module psb_z_csr_mat_mod
!! \see psb_z_base_mat_mod::psb_z_base_csgetrow !! \see psb_z_base_mat_mod::psb_z_base_csgetrow
interface interface
subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_csr_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -416,26 +416,26 @@ module psb_z_csr_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_z_csr_csgetrow end subroutine psb_z_csr_csgetrow
end interface end interface
!!$
!> \memberof psb_z_csr_sparse_mat !!$ !> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetblk !!$ !! \see psb_z_base_mat_mod::psb_z_base_csgetblk
interface !!$ interface
subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,& !!$ subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat !!$ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat
class(psb_z_csr_sparse_mat), intent(in) :: a !!$ class(psb_z_csr_sparse_mat), intent(in) :: a
class(psb_z_coo_sparse_mat), intent(inout) :: b !!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
end subroutine psb_z_csr_csgetblk !!$ end subroutine psb_z_csr_csgetblk
end interface !!$ end interface
!> \memberof psb_z_csr_sparse_mat !> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssv !! \see psb_z_base_mat_mod::psb_z_base_cssv

@ -450,7 +450,7 @@ module psb_z_mat_mod
interface interface
subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
import :: psb_ipk_, psb_zspmat_type, psb_dpk_ import :: psb_ipk_, psb_zspmat_type, psb_dpk_
class(psb_zspmat_type), intent(in) :: a class(psb_zspmat_type), intent(in) :: a
integer(psb_ipk_), intent(in) :: imin,imax integer(psb_ipk_), intent(in) :: imin,imax
@ -461,7 +461,7 @@ module psb_z_mat_mod
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
end subroutine psb_z_csgetrow end subroutine psb_z_csgetrow
end interface end interface

@ -406,7 +406,7 @@ subroutine psb_c_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
end subroutine psb_c_base_csput_v end subroutine psb_c_base_csput_v
subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -422,7 +422,7 @@ subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'

@ -2259,7 +2259,7 @@ end subroutine psb_c_coo_csgetptn
! The output is guaranteed to be sorted ! The output is guaranteed to be sorted
! !
subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2276,9 +2276,9 @@ subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2321,13 +2321,18 @@ subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2352,7 +2357,7 @@ subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2368,7 +2373,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
complex(psb_spk_), allocatable, intent(inout) :: val(:) complex(psb_spk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append,chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
@ -2452,11 +2457,13 @@ contains
nzt = jp - ip +1 nzt = jp - ip +1
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=ip,jp do i=ip,jp
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
@ -2488,11 +2495,13 @@ contains
nrd = max(a%get_nrows(),1) nrd = max(a%get_nrows(),1)
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1) nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
k = 0 k = 0
do i=1, a%get_nzeros() do i=1, a%get_nzeros()
@ -2501,10 +2510,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = iren(a%ia(i)) ia(nzin_+k) = iren(a%ia(i))
@ -2519,11 +2530,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = (a%ia(i)) ia(nzin_+k) = (a%ia(i))

@ -1686,7 +1686,7 @@ end subroutine psb_c_csc_csgetptn
subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -1704,7 +1704,7 @@ subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
@ -2557,60 +2557,60 @@ end subroutine psb_c_csc_reallocate_nz
subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_csgetblk !!$ use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_csgetblk
implicit none !!$ implicit none
!!$
class(psb_c_csc_sparse_mat), intent(in) :: a !!$ class(psb_c_csc_sparse_mat), intent(in) :: a
class(psb_c_coo_sparse_mat), intent(inout) :: b !!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_c_csc_csgetblk !!$end subroutine psb_c_csc_csgetblk
subroutine psb_c_csc_reinit(a,clear) subroutine psb_c_csc_reinit(a,clear)
use psb_error_mod use psb_error_mod

@ -1999,7 +1999,7 @@ end subroutine psb_c_csr_csgetptn
subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2017,9 +2017,9 @@ subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2063,13 +2063,18 @@ subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2094,7 +2099,7 @@ subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2109,7 +2114,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
complex(psb_spk_), allocatable, intent(inout) :: val(:) complex(psb_spk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append, chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
@ -2142,11 +2147,13 @@ contains
nzt = (a%irp(lrw+1)-a%irp(irw)) nzt = (a%irp(lrw+1)-a%irp(irw))
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=irw, lrw do i=irw, lrw
@ -2178,60 +2185,60 @@ contains
end subroutine psb_c_csr_csgetrow end subroutine psb_c_csr_csgetrow
subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_csgetblk !!$ use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_csgetblk
implicit none !!$ implicit none
!!$
class(psb_c_csr_sparse_mat), intent(in) :: a !!$ class(psb_c_csr_sparse_mat), intent(in) :: a
class(psb_c_coo_sparse_mat), intent(inout) :: b !!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_c_csr_csgetblk !!$end subroutine psb_c_csr_csgetblk
! !
! CSR implementation of tril/triu ! CSR implementation of tril/triu

@ -793,7 +793,7 @@ end subroutine psb_c_csgetptn
subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -810,7 +810,7 @@ subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -826,7 +826,7 @@ subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
call a%a%csget(imin,imax,nz,ia,ja,val,info,& call a%a%csget(imin,imax,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -406,7 +406,7 @@ subroutine psb_d_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
end subroutine psb_d_base_csput_v end subroutine psb_d_base_csput_v
subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -422,7 +422,7 @@ subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'

@ -2259,7 +2259,7 @@ end subroutine psb_d_coo_csgetptn
! The output is guaranteed to be sorted ! The output is guaranteed to be sorted
! !
subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2276,9 +2276,9 @@ subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2321,13 +2321,18 @@ subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2352,7 +2357,7 @@ subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2368,7 +2373,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
real(psb_dpk_), allocatable, intent(inout) :: val(:) real(psb_dpk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append,chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
@ -2452,11 +2457,13 @@ contains
nzt = jp - ip +1 nzt = jp - ip +1
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=ip,jp do i=ip,jp
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
@ -2488,11 +2495,13 @@ contains
nrd = max(a%get_nrows(),1) nrd = max(a%get_nrows(),1)
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1) nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
k = 0 k = 0
do i=1, a%get_nzeros() do i=1, a%get_nzeros()
@ -2501,10 +2510,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = iren(a%ia(i)) ia(nzin_+k) = iren(a%ia(i))
@ -2519,11 +2530,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = (a%ia(i)) ia(nzin_+k) = (a%ia(i))

@ -1686,7 +1686,7 @@ end subroutine psb_d_csc_csgetptn
subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -1704,7 +1704,7 @@ subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
@ -2557,60 +2557,60 @@ end subroutine psb_d_csc_reallocate_nz
subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_csgetblk !!$ use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_csgetblk
implicit none !!$ implicit none
!!$
class(psb_d_csc_sparse_mat), intent(in) :: a !!$ class(psb_d_csc_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b !!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_d_csc_csgetblk !!$end subroutine psb_d_csc_csgetblk
subroutine psb_d_csc_reinit(a,clear) subroutine psb_d_csc_reinit(a,clear)
use psb_error_mod use psb_error_mod

@ -1999,7 +1999,7 @@ end subroutine psb_d_csr_csgetptn
subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2017,9 +2017,9 @@ subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2063,13 +2063,18 @@ subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2094,7 +2099,7 @@ subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2109,7 +2114,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
real(psb_dpk_), allocatable, intent(inout) :: val(:) real(psb_dpk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append, chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
@ -2142,11 +2147,13 @@ contains
nzt = (a%irp(lrw+1)-a%irp(irw)) nzt = (a%irp(lrw+1)-a%irp(irw))
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=irw, lrw do i=irw, lrw
@ -2178,60 +2185,60 @@ contains
end subroutine psb_d_csr_csgetrow end subroutine psb_d_csr_csgetrow
subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_csgetblk !!$ use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_csgetblk
implicit none !!$ implicit none
!!$
class(psb_d_csr_sparse_mat), intent(in) :: a !!$ class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b !!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_d_csr_csgetblk !!$end subroutine psb_d_csr_csgetblk
! !
! CSR implementation of tril/triu ! CSR implementation of tril/triu

@ -793,7 +793,7 @@ end subroutine psb_d_csgetptn
subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -810,7 +810,7 @@ subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -826,7 +826,7 @@ subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
call a%a%csget(imin,imax,nz,ia,ja,val,info,& call a%a%csget(imin,imax,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -406,7 +406,7 @@ subroutine psb_s_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
end subroutine psb_s_base_csput_v end subroutine psb_s_base_csput_v
subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -422,7 +422,7 @@ subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'

@ -2259,7 +2259,7 @@ end subroutine psb_s_coo_csgetptn
! The output is guaranteed to be sorted ! The output is guaranteed to be sorted
! !
subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2276,9 +2276,9 @@ subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2321,13 +2321,18 @@ subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2352,7 +2357,7 @@ subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2368,7 +2373,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
real(psb_spk_), allocatable, intent(inout) :: val(:) real(psb_spk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append,chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
@ -2452,11 +2457,13 @@ contains
nzt = jp - ip +1 nzt = jp - ip +1
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=ip,jp do i=ip,jp
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
@ -2488,11 +2495,13 @@ contains
nrd = max(a%get_nrows(),1) nrd = max(a%get_nrows(),1)
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1) nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
k = 0 k = 0
do i=1, a%get_nzeros() do i=1, a%get_nzeros()
@ -2501,10 +2510,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = iren(a%ia(i)) ia(nzin_+k) = iren(a%ia(i))
@ -2519,11 +2530,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = (a%ia(i)) ia(nzin_+k) = (a%ia(i))

@ -1686,7 +1686,7 @@ end subroutine psb_s_csc_csgetptn
subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -1704,7 +1704,7 @@ subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
@ -2557,60 +2557,60 @@ end subroutine psb_s_csc_reallocate_nz
subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_csgetblk !!$ use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_csgetblk
implicit none !!$ implicit none
!!$
class(psb_s_csc_sparse_mat), intent(in) :: a !!$ class(psb_s_csc_sparse_mat), intent(in) :: a
class(psb_s_coo_sparse_mat), intent(inout) :: b !!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_s_csc_csgetblk !!$end subroutine psb_s_csc_csgetblk
subroutine psb_s_csc_reinit(a,clear) subroutine psb_s_csc_reinit(a,clear)
use psb_error_mod use psb_error_mod

@ -1999,7 +1999,7 @@ end subroutine psb_s_csr_csgetptn
subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2017,9 +2017,9 @@ subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2063,13 +2063,18 @@ subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2094,7 +2099,7 @@ subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2109,7 +2114,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
real(psb_spk_), allocatable, intent(inout) :: val(:) real(psb_spk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append, chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
@ -2142,11 +2147,13 @@ contains
nzt = (a%irp(lrw+1)-a%irp(irw)) nzt = (a%irp(lrw+1)-a%irp(irw))
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=irw, lrw do i=irw, lrw
@ -2178,60 +2185,60 @@ contains
end subroutine psb_s_csr_csgetrow end subroutine psb_s_csr_csgetrow
subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_csgetblk !!$ use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_csgetblk
implicit none !!$ implicit none
!!$
class(psb_s_csr_sparse_mat), intent(in) :: a !!$ class(psb_s_csr_sparse_mat), intent(in) :: a
class(psb_s_coo_sparse_mat), intent(inout) :: b !!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_s_csr_csgetblk !!$end subroutine psb_s_csr_csgetblk
! !
! CSR implementation of tril/triu ! CSR implementation of tril/triu

@ -793,7 +793,7 @@ end subroutine psb_s_csgetptn
subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -810,7 +810,7 @@ subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -826,7 +826,7 @@ subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
call a%a%csget(imin,imax,nz,ia,ja,val,info,& call a%a%csget(imin,imax,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

@ -406,7 +406,7 @@ subroutine psb_z_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
end subroutine psb_z_base_csput_v end subroutine psb_z_base_csput_v
subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -422,7 +422,7 @@ subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'

@ -2259,7 +2259,7 @@ end subroutine psb_z_coo_csgetptn
! The output is guaranteed to be sorted ! The output is guaranteed to be sorted
! !
subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2276,9 +2276,9 @@ subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2321,13 +2321,18 @@ subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2352,7 +2357,7 @@ subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2368,7 +2373,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
complex(psb_dpk_), allocatable, intent(inout) :: val(:) complex(psb_dpk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append,chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
@ -2452,11 +2457,13 @@ contains
nzt = jp - ip +1 nzt = jp - ip +1
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=ip,jp do i=ip,jp
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
@ -2488,11 +2495,13 @@ contains
nrd = max(a%get_nrows(),1) nrd = max(a%get_nrows(),1)
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1) nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
k = 0 k = 0
do i=1, a%get_nzeros() do i=1, a%get_nzeros()
@ -2501,10 +2510,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = iren(a%ia(i)) ia(nzin_+k) = iren(a%ia(i))
@ -2519,11 +2530,12 @@ contains
k = k + 1 k = k + 1
if (k > nzt) then if (k > nzt) then
nzt = k + nzt nzt = k + nzt
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info /= psb_success_) return if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
end if
end if end if
val(nzin_+k) = a%val(i) val(nzin_+k) = a%val(i)
ia(nzin_+k) = (a%ia(i)) ia(nzin_+k) = (a%ia(i))

@ -1686,7 +1686,7 @@ end subroutine psb_z_csc_csgetptn
subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -1704,7 +1704,7 @@ subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
@ -2557,60 +2557,60 @@ end subroutine psb_z_csc_reallocate_nz
subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_csgetblk !!$ use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_csgetblk
implicit none !!$ implicit none
!!$
class(psb_z_csc_sparse_mat), intent(in) :: a !!$ class(psb_z_csc_sparse_mat), intent(in) :: a
class(psb_z_coo_sparse_mat), intent(inout) :: b !!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_z_csc_csgetblk !!$end subroutine psb_z_csc_csgetblk
subroutine psb_z_csc_reinit(a,clear) subroutine psb_z_csc_reinit(a,clear)
use psb_error_mod use psb_error_mod

@ -1999,7 +1999,7 @@ end subroutine psb_z_csr_csgetptn
subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -2017,9 +2017,9 @@ subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
logical :: append_, rscale_, cscale_ logical :: append_, rscale_, cscale_, chksz_
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -2063,13 +2063,18 @@ subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
else else
cscale_ = .false. cscale_ = .false.
endif endif
if (present(chksz)) then
chksz_ = chksz
else
chksz_ = .true.
endif
if ((rscale_.or.cscale_).and.(present(iren))) then if ((rscale_.or.cscale_).and.(present(iren))) then
info = psb_err_many_optional_arg_ info = psb_err_many_optional_arg_
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)') call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
goto 9999 goto 9999
end if end if
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,& call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
& iren) & iren)
if (rscale_) then if (rscale_) then
@ -2094,7 +2099,7 @@ subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
contains contains
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,& subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
& iren) & iren)
use psb_const_mod use psb_const_mod
@ -2109,7 +2114,7 @@ contains
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:) integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
complex(psb_dpk_), allocatable, intent(inout) :: val(:) complex(psb_dpk_), allocatable, intent(inout) :: val(:)
integer(psb_ipk_), intent(in) :: nzin integer(psb_ipk_), intent(in) :: nzin
logical, intent(in) :: append logical, intent(in) :: append, chksz
integer(psb_ipk_) :: info integer(psb_ipk_) :: info
integer(psb_ipk_), optional :: iren(:) integer(psb_ipk_), optional :: iren(:)
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
@ -2142,11 +2147,13 @@ contains
nzt = (a%irp(lrw+1)-a%irp(irw)) nzt = (a%irp(lrw+1)-a%irp(irw))
nz = 0 nz = 0
call psb_ensure_size(nzin_+nzt,ia,info) if (chksz) then
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info) call psb_ensure_size(nzin_+nzt,ia,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info) if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
if (info /= psb_success_) return
if (info /= psb_success_) return
end if
if (present(iren)) then if (present(iren)) then
do i=irw, lrw do i=irw, lrw
@ -2178,60 +2185,60 @@ contains
end subroutine psb_z_csr_csgetrow end subroutine psb_z_csr_csgetrow
subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,& !!$subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) !!$ & jmin,jmax,iren,append,rscale,cscale)
! Output is always in COO format !!$ ! Output is always in COO format
use psb_error_mod !!$ use psb_error_mod
use psb_const_mod !!$ use psb_const_mod
use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_csgetblk !!$ use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_csgetblk
implicit none !!$ implicit none
!!$
class(psb_z_csr_sparse_mat), intent(in) :: a !!$ class(psb_z_csr_sparse_mat), intent(in) :: a
class(psb_z_coo_sparse_mat), intent(inout) :: b !!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(in) :: imin,imax !!$ integer(psb_ipk_), intent(in) :: imin,imax
integer(psb_ipk_),intent(out) :: info !!$ integer(psb_ipk_),intent(out) :: info
logical, intent(in), optional :: append !!$ logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) !!$ integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax !!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
logical, intent(in), optional :: rscale,cscale !!$ logical, intent(in), optional :: rscale,cscale
integer(psb_ipk_) :: err_act, nzin, nzout !!$ integer(psb_ipk_) :: err_act, nzin, nzout
integer(psb_ipk_) :: ierr(5) !!$ integer(psb_ipk_) :: ierr(5)
character(len=20) :: name='csget' !!$ character(len=20) :: name='csget'
logical :: append_ !!$ logical :: append_
logical, parameter :: debug=.false. !!$ logical, parameter :: debug=.false.
!!$
call psb_erractionsave(err_act) !!$ call psb_erractionsave(err_act)
info = psb_success_ !!$ info = psb_success_
!!$
if (present(append)) then !!$ if (present(append)) then
append_ = append !!$ append_ = append
else !!$ else
append_ = .false. !!$ append_ = .false.
endif !!$ endif
if (append_) then !!$ if (append_) then
nzin = a%get_nzeros() !!$ nzin = a%get_nzeros()
else !!$ else
nzin = 0 !!$ nzin = 0
endif !!$ endif
!!$
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,& !!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
& jmin=jmin, jmax=jmax, iren=iren, append=append_, & !!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
& nzin=nzin, rscale=rscale, cscale=cscale) !!$ & nzin=nzin, rscale=rscale, cscale=cscale)
!!$
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call b%set_nzeros(nzin+nzout) !!$ call b%set_nzeros(nzin+nzout)
call b%fix(info) !!$ call b%fix(info)
if (info /= psb_success_) goto 9999 !!$ if (info /= psb_success_) goto 9999
!!$
call psb_erractionrestore(err_act) !!$ call psb_erractionrestore(err_act)
return !!$ return
!!$
9999 call psb_error_handler(err_act) !!$9999 call psb_error_handler(err_act)
!!$
return !!$ return
!!$
end subroutine psb_z_csr_csgetblk !!$end subroutine psb_z_csr_csgetblk
! !
! CSR implementation of tril/triu ! CSR implementation of tril/triu

@ -793,7 +793,7 @@ end subroutine psb_z_csgetptn
subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
! Output is always in COO format ! Output is always in COO format
use psb_error_mod use psb_error_mod
use psb_const_mod use psb_const_mod
@ -810,7 +810,7 @@ subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
logical, intent(in), optional :: append logical, intent(in), optional :: append
integer(psb_ipk_), intent(in), optional :: iren(:) integer(psb_ipk_), intent(in), optional :: iren(:)
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
logical, intent(in), optional :: rscale,cscale logical, intent(in), optional :: rscale,cscale,chksz
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20) :: name='csget' character(len=20) :: name='csget'
@ -826,7 +826,7 @@ subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
call a%a%csget(imin,imax,nz,ia,ja,val,info,& call a%a%csget(imin,imax,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)

Loading…
Cancel
Save