|
|
|
@ -126,6 +126,7 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: colsum => psb_c_base_colsum
|
|
|
|
|
procedure, pass(a) :: aclsum => psb_c_base_aclsum
|
|
|
|
|
procedure, pass(a) :: scalpid => psb_c_base_scalplusidentity
|
|
|
|
|
procedure, pass(a) :: spaxpby => psb_c_base_spaxpby
|
|
|
|
|
end type psb_c_base_sparse_mat
|
|
|
|
|
|
|
|
|
|
private :: c_base_mat_sync, c_base_mat_is_host, c_base_mat_is_dev, &
|
|
|
|
@ -228,7 +229,7 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: colsum => psb_c_coo_colsum
|
|
|
|
|
procedure, pass(a) :: aclsum => psb_c_coo_aclsum
|
|
|
|
|
procedure, pass(a) :: scalpid => psb_c_coo_scalplusidentity
|
|
|
|
|
|
|
|
|
|
procedure, pass(a) :: spaxpby => psb_c_coo_spaxpby
|
|
|
|
|
end type psb_c_coo_sparse_mat
|
|
|
|
|
|
|
|
|
|
private :: c_coo_get_nzeros, c_coo_set_nzeros, &
|
|
|
|
@ -293,6 +294,7 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: colsum => psb_lc_base_colsum
|
|
|
|
|
procedure, pass(a) :: aclsum => psb_lc_base_aclsum
|
|
|
|
|
procedure, pass(a) :: scalpid => psb_lc_base_scalplusidentity
|
|
|
|
|
procedure, pass(a) :: spaxpby => psb_lc_base_spaxpby
|
|
|
|
|
!
|
|
|
|
|
! Convert internal indices
|
|
|
|
|
!
|
|
|
|
@ -394,7 +396,7 @@ module psb_c_base_mat_mod
|
|
|
|
|
procedure, pass(a) :: colsum => psb_lc_coo_colsum
|
|
|
|
|
procedure, pass(a) :: aclsum => psb_lc_coo_aclsum
|
|
|
|
|
procedure, pass(a) :: scalpid => psb_lc_coo_scalplusidentity
|
|
|
|
|
|
|
|
|
|
procedure, pass(a) :: spaxpby => psb_lc_coo_spaxpby
|
|
|
|
|
!
|
|
|
|
|
! This is COO specific
|
|
|
|
|
!
|
|
|
|
@ -1475,6 +1477,28 @@ module psb_c_base_mat_mod
|
|
|
|
|
end subroutine psb_c_base_scalplusidentity
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_spaxpby:
|
|
|
|
|
!! \memberof psb_c_base_sparse_mat
|
|
|
|
|
!! \brief Scale add tow sparse matrices A = alpha A + beta B
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha scaling for A
|
|
|
|
|
!! \param A sparse matrix A (intent inout)
|
|
|
|
|
!! \param beta scaling for B
|
|
|
|
|
!! \param B sparse matrix B (intent in)
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_c_base_spaxpby(alpha,a,beta,b,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_c_base_sparse_mat), intent(inout) :: a
|
|
|
|
|
class(psb_c_base_sparse_mat), intent(inout) :: b
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha
|
|
|
|
|
complex(psb_spk_), intent(in) :: beta
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_c_base_spaxpby
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_maxval:
|
|
|
|
|
!! \memberof psb_c_base_sparse_mat
|
|
|
|
@ -2131,6 +2155,19 @@ module psb_c_base_mat_mod
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_c_coo_scalplusidentity
|
|
|
|
|
end interface
|
|
|
|
|
!
|
|
|
|
|
!! \memberof psb_c_coo_sparse_mat
|
|
|
|
|
!! \see psb_c_base_mat_mod::psb_c_base_spaxpby
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_c_coo_spaxpby(alpha,a,beta,b,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_c_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
class(psb_c_base_sparse_mat), intent(inout) :: b
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha
|
|
|
|
|
complex(psb_spk_), intent(in) :: beta
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_c_coo_spaxpby
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
! == =================
|
|
|
|
|
!
|
|
|
|
@ -2887,6 +2924,28 @@ module psb_c_base_mat_mod
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_base_scalplusidentity
|
|
|
|
|
end interface
|
|
|
|
|
!
|
|
|
|
|
!> Function base_spaxpby:
|
|
|
|
|
!! \memberof psb_lc_base_sparse_mat
|
|
|
|
|
!! \brief Scale add tow sparse matrices A = alpha A + beta B
|
|
|
|
|
!!
|
|
|
|
|
!! \param alpha scaling for A
|
|
|
|
|
!! \param A sparse matrix A (intent inout)
|
|
|
|
|
!! \param beta scaling for B
|
|
|
|
|
!! \param B sparse matrix B (intent in)
|
|
|
|
|
!! \param info return code
|
|
|
|
|
!
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_base_spaxpby(alpha,a,beta,b,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: a
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: b
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha
|
|
|
|
|
complex(psb_spk_), intent(in) :: beta
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_base_spaxpby
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
!> Function base_scal:
|
|
|
|
@ -3496,6 +3555,19 @@ module psb_c_base_mat_mod
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_coo_scalplusidentity
|
|
|
|
|
end interface
|
|
|
|
|
!>
|
|
|
|
|
!! \memberof psb_lc_coo_sparse_mat
|
|
|
|
|
!! \see psb_lc_base_mat_mod::psb_lc_base_spaxpby
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_lc_coo_spaxpby(alpha,a,beta,b,info)
|
|
|
|
|
import
|
|
|
|
|
class(psb_lc_coo_sparse_mat), intent(inout) :: a
|
|
|
|
|
class(psb_lc_base_sparse_mat), intent(inout) :: b
|
|
|
|
|
complex(psb_spk_), intent(in) :: alpha
|
|
|
|
|
complex(psb_spk_), intent(in) :: beta
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine psb_lc_coo_spaxpby
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|