|
|
|
|
@ -276,6 +276,9 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: clone => psb_lc_base_clone
|
|
|
|
|
procedure, pass(a) :: make_nonunit => psb_lc_base_make_nonunit
|
|
|
|
|
procedure, pass(a) :: clean_zeros => psb_lc_base_clean_zeros
|
|
|
|
|
procedure, pass(a) :: scals => psb_lc_base_scals
|
|
|
|
|
procedure, pass(a) :: scalv => psb_lc_base_scal
|
|
|
|
|
generic, public :: scal => scals, scalv
|
|
|
|
|
!
|
|
|
|
|
! Convert internal indices
|
|
|
|
|
!
|
|
|
|
|
@ -296,31 +299,6 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: transc_1mat => psb_lc_base_transc_1mat
|
|
|
|
|
procedure, pass(a) :: transc_2mat => psb_lc_base_transc_2mat
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Computational methods: defined here but not implemented.
|
|
|
|
|
!
|
|
|
|
|
procedure, pass(a) :: vect_mv => psb_lc_base_vect_mv
|
|
|
|
|
procedure, pass(a) :: csmv => psb_lc_base_csmv
|
|
|
|
|
procedure, pass(a) :: csmm => psb_lc_base_csmm
|
|
|
|
|
generic, public :: spmm => csmm, csmv, vect_mv
|
|
|
|
|
procedure, pass(a) :: in_vect_sv => psb_lc_base_inner_vect_sv
|
|
|
|
|
procedure, pass(a) :: inner_cssv => psb_lc_base_inner_cssv
|
|
|
|
|
procedure, pass(a) :: inner_cssm => psb_lc_base_inner_cssm
|
|
|
|
|
generic, public :: inner_spsm => inner_cssm, inner_cssv, in_vect_sv
|
|
|
|
|
procedure, pass(a) :: vect_cssv => psb_lc_base_vect_cssv
|
|
|
|
|
procedure, pass(a) :: cssv => psb_lc_base_cssv
|
|
|
|
|
procedure, pass(a) :: cssm => psb_lc_base_cssm
|
|
|
|
|
generic, public :: spsm => cssm, cssv, vect_cssv
|
|
|
|
|
procedure, pass(a) :: scals => psb_lc_base_scals
|
|
|
|
|
procedure, pass(a) :: scalv => psb_lc_base_scal
|
|
|
|
|
generic, public :: scal => scals, scalv
|
|
|
|
|
procedure, pass(a) :: maxval => psb_lc_base_maxval
|
|
|
|
|
procedure, pass(a) :: spnmi => psb_lc_base_csnmi
|
|
|
|
|
procedure, pass(a) :: spnm1 => psb_lc_base_csnm1
|
|
|
|
|
procedure, pass(a) :: rowsum => psb_lc_base_rowsum
|
|
|
|
|
procedure, pass(a) :: arwsum => psb_lc_base_arwsum
|
|
|
|
|
procedure, pass(a) :: colsum => psb_lc_base_colsum
|
|
|
|
|
procedure, pass(a) :: aclsum => psb_lc_base_aclsum
|
|
|
|
|
end type psb_lc_base_sparse_mat
|
|
|
|
|
|
|
|
|
|
private :: lc_base_mat_sync, lc_base_mat_is_host, lc_base_mat_is_dev, &
|
|
|
|
|
@ -388,6 +366,8 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: set_by_cols => lc_coo_set_by_cols
|
|
|
|
|
procedure, pass(a) :: set_sort_status => lc_coo_set_sort_status
|
|
|
|
|
procedure, pass(a) :: get_sort_status => lc_coo_get_sort_status
|
|
|
|
|
procedure, pass(a) :: scals => psb_lc_coo_scals
|
|
|
|
|
procedure, pass(a) :: scalv => psb_lc_coo_scal
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! This is COO specific
|
|
|
|
|
@ -402,22 +382,6 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: transp_1mat => lc_coo_transp_1mat
|
|
|
|
|
procedure, pass(a) :: transc_1mat => lc_coo_transc_1mat
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Computational methods.
|
|
|
|
|
!
|
|
|
|
|
procedure, pass(a) :: csmm => psb_lc_coo_csmm
|
|
|
|
|
procedure, pass(a) :: csmv => psb_lc_coo_csmv
|
|
|
|
|
procedure, pass(a) :: inner_cssm => psb_lc_coo_cssm
|
|
|
|
|
procedure, pass(a) :: inner_cssv => psb_lc_coo_cssv
|
|
|
|
|
procedure, pass(a) :: scals => psb_lc_coo_scals
|
|
|
|
|
procedure, pass(a) :: scalv => psb_lc_coo_scal
|
|
|
|
|
procedure, pass(a) :: maxval => psb_lc_coo_maxval
|
|
|
|
|
procedure, pass(a) :: spnmi => psb_lc_coo_csnmi
|
|
|
|
|
procedure, pass(a) :: spnm1 => psb_lc_coo_csnm1
|
|
|
|
|
procedure, pass(a) :: rowsum => psb_lc_coo_rowsum
|
|
|
|
|
procedure, pass(a) :: arwsum => psb_lc_coo_arwsum
|
|
|
|
|
procedure, pass(a) :: colsum => psb_lc_coo_colsum
|
|
|
|
|
procedure, pass(a) :: aclsum => psb_lc_coo_aclsum
|
|
|
|
|
|
|
|
|
|
end type psb_lc_coo_sparse_mat
|
|
|
|
|
|
|
|
|
|
@ -2756,6 +2720,43 @@ module psb_c_base_mat_mod
|
|
|
|
|
end subroutine psb_lc_base_clean_zeros
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_scals:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Scale a matrix by a single scalar value
|
|
|
|
|
!!
|
|
|
|
|
!! \param d Scaling factor
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_scals(d,a,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: d
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_base_scals
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_scal:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Scale a matrix by a vector
|
|
|
|
|
!!
|
|
|
|
|
!! \param d(:) Scaling vector
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param side [L] Scale on the Left (rows) or on the Right (columns)
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_scal(d,a,info,side)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: d(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, intent(in), optional :: side
|
|
|
|
|
end subroutine psb_lc_base_scal
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function transp:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
@ -2816,554 +2817,119 @@ module psb_c_base_mat_mod
|
|
|
|
|
end subroutine psb_lc_base_transc_1mat
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
! == ===============
|
|
|
|
|
!
|
|
|
|
|
!> Function csmm:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Product by a dense rank 2 array.
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x(:,:) the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y(:,:) the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!!
|
|
|
|
|
! COO interfaces
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_csmm(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
! == ===============
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_reallocate_nz
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_reallocate_nz(nz,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:,:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_base_csmm
|
|
|
|
|
integer(psb_lpk_), intent(in) :: nz
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
end subroutine psb_lc_coo_reallocate_nz
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!> Function csmv:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Product by a dense rank 1 array.
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x(:) the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y(:) the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_reinit
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_csmv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
subroutine psb_lc_coo_reinit(a,clear)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_base_csmv
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
logical, intent(in), optional :: clear
|
|
|
|
|
end subroutine psb_lc_coo_reinit
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!> Function vect_mv:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Product by an encapsulated array type(psb_lc_vect_type)
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A)*X + beta*Y
|
|
|
|
|
!! Usually the unwrapping of the encapsulated vector is done
|
|
|
|
|
!! here, so that all the derived classes need only the
|
|
|
|
|
!! versions with the standard arrays.
|
|
|
|
|
!! Must be overridden explicitly in case of non standard memory
|
|
|
|
|
!! management; an example would be external memory allocation
|
|
|
|
|
!! in attached processors such as GPUs.
|
|
|
|
|
!!
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x the input X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y the input/output Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_vect_mv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_trim
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_trim(a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: y
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
end subroutine psb_lc_coo_trim
|
|
|
|
|
end interface
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_clean_zeros
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_clean_zeros(a,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_base_vect_mv
|
|
|
|
|
end subroutine psb_lc_coo_clean_zeros
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function cssm:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Triangular system solve by a dense rank 2 array.
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A^-1)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! Internal workhorse called by cssm.
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x(:,:) the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y(:,:) the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_allocate_mnnz
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_allocate_mnnz(m,n,a,nz)
|
|
|
|
|
import
|
|
|
|
|
integer(psb_lpk_), intent(in) :: m,n
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
integer(psb_lpk_), intent(in), optional :: nz
|
|
|
|
|
end subroutine psb_lc_coo_allocate_mnnz
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!> \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!| \see psb_base_mat_mod::psb_base_mold
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_inner_cssm(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
subroutine psb_lc_coo_mold(a,b,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:,:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_base_inner_cssm
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout), allocatable :: b
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_coo_mold
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function cssv:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Triangular system solve by a dense rank 1 array.
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A^-1)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! Internal workhorse called by cssv.
|
|
|
|
|
!> Function print.
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \brief Print the matrix to file in MatrixMarket format
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x(:) the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y(:) the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!! \param scale [N] Apply a scaling on Right (R) i.e. ADX
|
|
|
|
|
!! or on the Left (L) i.e. DAx
|
|
|
|
|
!! \param D(:) [none] Diagonal for scaling.
|
|
|
|
|
!! \param iout The unit to write to
|
|
|
|
|
!! \param iv [none] Renumbering for both rows and columns
|
|
|
|
|
!! \param head [none] Descriptive header for the file
|
|
|
|
|
!! \param ivr [none] Row renumbering
|
|
|
|
|
!! \param ivc [none] Col renumbering
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_inner_cssv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_print(iout,a,iv,head,ivr,ivc)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_base_inner_cssv
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iout
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_lpk_), intent(in), optional :: iv(:)
|
|
|
|
|
character(len=*), optional :: head
|
|
|
|
|
integer(psb_lpk_), intent(in), optional :: ivr(:), ivc(:)
|
|
|
|
|
end subroutine psb_lc_coo_print
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function inner_vect_cssv:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Triangular system solve by
|
|
|
|
|
!! an encapsulated array type(psb_lc_vect_type)
|
|
|
|
|
!> Function get_nz_row.
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \brief How many nonzeros in a row?
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A^-1)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! Internal workhorse called by vect_cssv.
|
|
|
|
|
!! Must be overridden explicitly in case of non standard memory
|
|
|
|
|
!! management; an example would be external memory allocation
|
|
|
|
|
!! in attached processors such as GPUs.
|
|
|
|
|
!!
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_inner_vect_sv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x, y
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_base_inner_vect_sv
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function cssm:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Triangular system solve by a dense rank 2 array.
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A^-1)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x(:,:) the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y(:,:) the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!! \param scale [N] Apply a scaling on Right (R) i.e. ADX
|
|
|
|
|
!! or on the Left (L) i.e. DAx
|
|
|
|
|
!! \param D(:) [none] Diagonal for scaling.
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_cssm(alpha,a,x,beta,y,info,trans,scale,d)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:,:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans, scale
|
|
|
|
|
complex(psb_spk_), intent(in), optional :: d(:)
|
|
|
|
|
end subroutine psb_lc_base_cssm
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function cssv:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Triangular system solve by a dense rank 1 array.
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A^-1)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x(:) the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y(:) the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!! \param scale [N] Apply a scaling on Right (R) i.e. ADX
|
|
|
|
|
!! or on the Left (L) i.e. DAx
|
|
|
|
|
!! \param D(:) [none] Diagonal for scaling.
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_cssv(alpha,a,x,beta,y,info,trans,scale,d)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans, scale
|
|
|
|
|
complex(psb_spk_), intent(in), optional :: d(:)
|
|
|
|
|
end subroutine psb_lc_base_cssv
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function vect_cssv:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Triangular system solve by
|
|
|
|
|
!! an encapsulated array type(psb_lc_vect_type)
|
|
|
|
|
!!
|
|
|
|
|
!! Compute
|
|
|
|
|
!! Y = alpha*op(A^-1)*X + beta*Y
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha Scaling factor for Ax
|
|
|
|
|
!! \param A the input sparse matrix
|
|
|
|
|
!! \param x the input dense X
|
|
|
|
|
!! \param beta Scaling factor for y
|
|
|
|
|
!! \param y the input/output dense Y
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param trans [N] Whether to use A (N), its transpose (T)
|
|
|
|
|
!! or its conjugate transpose (C)
|
|
|
|
|
!! \param scale [N] Apply a scaling on Right (R) i.e. ADX
|
|
|
|
|
!! or on the Left (L) i.e. DAx
|
|
|
|
|
!! \param D [none] Diagonal for scaling.
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_vect_cssv(alpha,a,x,beta,y,info,trans,scale,d)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta
|
|
|
|
|
class(psb_c_base_vect_type), intent(inout) :: x,y
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans, scale
|
|
|
|
|
class(psb_c_base_vect_type), optional, intent(inout) :: d
|
|
|
|
|
end subroutine psb_lc_base_vect_cssv
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_scals:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Scale a matrix by a single scalar value
|
|
|
|
|
!!
|
|
|
|
|
!! \param d Scaling factor
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_scals(d,a,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: d
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_base_scals
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_scal:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Scale a matrix by a vector
|
|
|
|
|
!!
|
|
|
|
|
!! \param d(:) Scaling vector
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!! \param side [L] Scale on the Left (rows) or on the Right (columns)
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_scal(d,a,info,side)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: d(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, intent(in), optional :: side
|
|
|
|
|
end subroutine psb_lc_base_scal
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_maxval:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Maximum absolute value of all coefficients;
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
function psb_lc_base_maxval(a) result(res)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_) :: res
|
|
|
|
|
end function psb_lc_base_maxval
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
!> Function base_csnmi:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Operator infinity norm
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
function psb_lc_base_csnmi(a) result(res)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_) :: res
|
|
|
|
|
end function psb_lc_base_csnmi
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
!> Function base_csnmi:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Operator 1-norm
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
function psb_lc_base_csnm1(a) result(res)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_) :: res
|
|
|
|
|
end function psb_lc_base_csnm1
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
!> Function base_rowsum:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Sum along the rows
|
|
|
|
|
!! \param d(:) The output row sums
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_rowsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_base_rowsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_arwsum:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Absolute value sum along the rows
|
|
|
|
|
!! \param d(:) The output row sums
|
|
|
|
|
!!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_arwsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_base_arwsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
!> Function base_colsum:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Sum along the columns
|
|
|
|
|
!! \param d(:) The output col sums
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_colsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_base_colsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_aclsum:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Absolute value sum along the columns
|
|
|
|
|
!! \param d(:) The output col sums
|
|
|
|
|
!!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_aclsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_base_aclsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! == ===============
|
|
|
|
|
!
|
|
|
|
|
! COO interfaces
|
|
|
|
|
!
|
|
|
|
|
! == ===============
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_reallocate_nz
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_reallocate_nz(nz,a)
|
|
|
|
|
import
|
|
|
|
|
integer(psb_lpk_), intent(in) :: nz
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
end subroutine psb_lc_coo_reallocate_nz
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_reinit
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_reinit(a,clear)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
logical, intent(in), optional :: clear
|
|
|
|
|
end subroutine psb_lc_coo_reinit
|
|
|
|
|
end interface
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_trim
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_trim(a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
end subroutine psb_lc_coo_trim
|
|
|
|
|
end interface
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_clean_zeros
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_clean_zeros(a,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_coo_clean_zeros
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_base_mat_mod::psb_base_allocate_mnnz
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_allocate_mnnz(m,n,a,nz)
|
|
|
|
|
import
|
|
|
|
|
integer(psb_lpk_), intent(in) :: m,n
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
integer(psb_lpk_), intent(in), optional :: nz
|
|
|
|
|
end subroutine psb_lc_coo_allocate_mnnz
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!> \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!| \see psb_base_mat_mod::psb_base_mold
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_mold(a,b,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout), allocatable :: b
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_coo_mold
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function print.
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \brief Print the matrix to file in MatrixMarket format
|
|
|
|
|
!!
|
|
|
|
|
!! \param iout The unit to write to
|
|
|
|
|
!! \param iv [none] Renumbering for both rows and columns
|
|
|
|
|
!! \param head [none] Descriptive header for the file
|
|
|
|
|
!! \param ivr [none] Row renumbering
|
|
|
|
|
!! \param ivc [none] Col renumbering
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_print(iout,a,iv,head,ivr,ivc)
|
|
|
|
|
import
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iout
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_lpk_), intent(in), optional :: iv(:)
|
|
|
|
|
character(len=*), optional :: head
|
|
|
|
|
integer(psb_lpk_), intent(in), optional :: ivr(:), ivc(:)
|
|
|
|
|
end subroutine psb_lc_coo_print
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function get_nz_row.
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \brief How many nonzeros in a row?
|
|
|
|
|
!!
|
|
|
|
|
!! \param idx The row to search.
|
|
|
|
|
!! \param idx The row to search.
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
@ -3627,138 +3193,6 @@ module psb_c_base_mat_mod
|
|
|
|
|
end subroutine psb_lc_coo_csgetrow
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_cssv
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_cssv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_coo_cssv
|
|
|
|
|
end interface
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_cssm
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_cssm(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:,:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_coo_cssm
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_csmv
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_csmv(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_coo_csmv
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_csmm
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_csmm(alpha,a,x,beta,y,info,trans)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
|
complex(psb_spk_), intent(inout) :: y(:,:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, optional, intent(in) :: trans
|
|
|
|
|
end subroutine psb_lc_coo_csmm
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_maxval
|
|
|
|
|
interface
|
|
|
|
|
function psb_lc_coo_maxval(a) result(res)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_) :: res
|
|
|
|
|
end function psb_lc_coo_maxval
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_csnmi
|
|
|
|
|
interface
|
|
|
|
|
function psb_lc_coo_csnmi(a) result(res)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_) :: res
|
|
|
|
|
end function psb_lc_coo_csnmi
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_csnm1
|
|
|
|
|
interface
|
|
|
|
|
function psb_lc_coo_csnm1(a) result(res)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_) :: res
|
|
|
|
|
end function psb_lc_coo_csnm1
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_rowsum
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_rowsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_coo_rowsum
|
|
|
|
|
end interface
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_arwsum
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_arwsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_coo_arwsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_colsum
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_colsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
complex(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_coo_colsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_aclsum
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_aclsum(d,a)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
real(psb_spk_), intent(out) :: d(:)
|
|
|
|
|
end subroutine psb_lc_coo_aclsum
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_get_diag
|
|
|
|
|
@ -3771,6 +3205,7 @@ module psb_c_base_mat_mod
|
|
|
|
|
end subroutine psb_lc_coo_get_diag
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_scal
|
|
|
|
|
@ -3796,7 +3231,6 @@ module psb_c_base_mat_mod
|
|
|
|
|
end subroutine psb_lc_coo_scals
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3818,7 +3252,7 @@ contains
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_epk_) :: res
|
|
|
|
|
res = 8 + 1
|
|
|
|
|
res = 3*psb_sizeof_ip
|
|
|
|
|
res = res + (2*psb_sizeof_sp) * psb_size(a%val)
|
|
|
|
|
res = res + psb_sizeof_ip * psb_size(a%ia)
|
|
|
|
|
res = res + psb_sizeof_ip * psb_size(a%ja)
|
|
|
|
|
@ -4042,7 +3476,7 @@ contains
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(in) :: a
|
|
|
|
|
integer(psb_epk_) :: res
|
|
|
|
|
res = 8 + 1
|
|
|
|
|
res = 3*psb_sizeof_lp
|
|
|
|
|
res = res + (2*psb_sizeof_sp) * psb_size(a%val)
|
|
|
|
|
res = res + psb_sizeof_lp * psb_size(a%ia)
|
|
|
|
|
res = res + psb_sizeof_lp * psb_size(a%ja)
|
|
|
|
|
|