Fix base SPMV to include shift

repack-ovrlp
sfilippone 2 years ago
parent ba8c32c507
commit ed0da1aef5

@ -388,14 +388,14 @@ module psb_base_mat_mod
!! i.e. when lev=2 find neighours of neighbours, etc.
!
interface
subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev)
subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev,nin)
import :: psb_ipk_, psb_epk_, psb_base_sparse_mat
class(psb_base_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: idx
integer(psb_ipk_), intent(out) :: n
integer(psb_ipk_), allocatable, intent(out) :: neigh(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: lev
integer(psb_ipk_), optional, intent(in) :: lev, nin
end subroutine psb_base_get_neigh
end interface

@ -67,6 +67,7 @@ module psb_c_base_mat_mod
procedure, pass(a) :: tril => psb_c_base_tril
procedure, pass(a) :: triu => psb_c_base_triu
procedure, pass(a) :: csclip => psb_c_base_csclip
procedure, pass(a) :: csmerge => psb_c_base_merge
procedure, pass(a) :: cp_to_coo => psb_c_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_c_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_c_base_cp_to_fmt
@ -626,6 +627,19 @@ module psb_c_base_mat_mod
logical, intent(in), optional :: rscale,cscale
end subroutine psb_c_base_csclip
end interface
interface
subroutine psb_c_base_merge(a,a2,acoo,n_rows,n_cols,info)
import :: psb_ipk_, psb_lpk_, psb_spk_, &
& psb_c_base_sparse_mat, psb_c_coo_sparse_mat
class(psb_c_base_sparse_mat), intent(inout) :: a,a2
class(psb_c_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
end subroutine psb_c_base_merge
end interface
!
!> Function tril:
!! \memberof psb_c_base_sparse_mat
@ -1165,13 +1179,14 @@ module psb_c_base_mat_mod
!!
!
interface
subroutine psb_c_base_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_base_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_base_csmm
end interface
@ -1193,13 +1208,14 @@ module psb_c_base_mat_mod
!!
!
interface
subroutine psb_c_base_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_base_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_base_csmv
end interface
@ -1228,7 +1244,7 @@ module psb_c_base_mat_mod
!!
!
interface
subroutine psb_c_base_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_base_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_base_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -1236,6 +1252,7 @@ module psb_c_base_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_base_vect_mv
end interface
@ -2219,13 +2236,14 @@ module psb_c_base_mat_mod
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface
subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_coo_csmv
end interface
@ -2233,13 +2251,14 @@ module psb_c_base_mat_mod
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmm
interface
subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_coo_csmm
end interface

@ -443,26 +443,28 @@ module psb_c_csc_mat_mod
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface
subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_csc_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_csc_csmv
end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmm
interface
subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_csc_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_csc_csmm
end interface

@ -461,26 +461,28 @@ module psb_c_csr_mat_mod
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface
subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_csr_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_csr_csmv
end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmm
interface
subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_csr_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_csr_csmm
end interface
@ -606,13 +608,14 @@ module psb_c_csr_mat_mod
!> \memberof psb_c_ecsr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface
subroutine psb_c_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_c_ecsr_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_ecsr_csmv
end interface

@ -67,6 +67,7 @@ module psb_d_base_mat_mod
procedure, pass(a) :: tril => psb_d_base_tril
procedure, pass(a) :: triu => psb_d_base_triu
procedure, pass(a) :: csclip => psb_d_base_csclip
procedure, pass(a) :: csmerge => psb_d_base_merge
procedure, pass(a) :: cp_to_coo => psb_d_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_d_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_d_base_cp_to_fmt
@ -626,6 +627,19 @@ module psb_d_base_mat_mod
logical, intent(in), optional :: rscale,cscale
end subroutine psb_d_base_csclip
end interface
interface
subroutine psb_d_base_merge(a,a2,acoo,n_rows,n_cols,info)
import :: psb_ipk_, psb_lpk_, psb_dpk_, &
& psb_d_base_sparse_mat, psb_d_coo_sparse_mat
class(psb_d_base_sparse_mat), intent(inout) :: a,a2
class(psb_d_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
end subroutine psb_d_base_merge
end interface
!
!> Function tril:
!! \memberof psb_d_base_sparse_mat
@ -1165,13 +1179,14 @@ module psb_d_base_mat_mod
!!
!
interface
subroutine psb_d_base_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_base_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_base_csmm
end interface
@ -1193,13 +1208,14 @@ module psb_d_base_mat_mod
!!
!
interface
subroutine psb_d_base_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_base_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_base_csmv
end interface
@ -1228,7 +1244,7 @@ module psb_d_base_mat_mod
!!
!
interface
subroutine psb_d_base_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_base_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta
@ -1236,6 +1252,7 @@ module psb_d_base_mat_mod
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_base_vect_mv
end interface
@ -2219,13 +2236,14 @@ module psb_d_base_mat_mod
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface
subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_coo_csmv
end interface
@ -2233,13 +2251,14 @@ module psb_d_base_mat_mod
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmm
interface
subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_coo_csmm
end interface

@ -443,26 +443,28 @@ module psb_d_csc_mat_mod
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface
subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_csc_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_csc_csmv
end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmm
interface
subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_csc_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_csc_csmm
end interface

@ -461,26 +461,28 @@ module psb_d_csr_mat_mod
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface
subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_csr_csmv
end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmm
interface
subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_csr_csmm
end interface
@ -606,13 +608,14 @@ module psb_d_csr_mat_mod
!> \memberof psb_d_ecsr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface
subroutine psb_d_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_d_ecsr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_d_ecsr_csmv
end interface

@ -67,6 +67,7 @@ module psb_s_base_mat_mod
procedure, pass(a) :: tril => psb_s_base_tril
procedure, pass(a) :: triu => psb_s_base_triu
procedure, pass(a) :: csclip => psb_s_base_csclip
procedure, pass(a) :: csmerge => psb_s_base_merge
procedure, pass(a) :: cp_to_coo => psb_s_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_s_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_s_base_cp_to_fmt
@ -626,6 +627,19 @@ module psb_s_base_mat_mod
logical, intent(in), optional :: rscale,cscale
end subroutine psb_s_base_csclip
end interface
interface
subroutine psb_s_base_merge(a,a2,acoo,n_rows,n_cols,info)
import :: psb_ipk_, psb_lpk_, psb_spk_, &
& psb_s_base_sparse_mat, psb_s_coo_sparse_mat
class(psb_s_base_sparse_mat), intent(inout) :: a,a2
class(psb_s_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
end subroutine psb_s_base_merge
end interface
!
!> Function tril:
!! \memberof psb_s_base_sparse_mat
@ -1165,13 +1179,14 @@ module psb_s_base_mat_mod
!!
!
interface
subroutine psb_s_base_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_base_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_base_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_base_csmm
end interface
@ -1193,13 +1208,14 @@ module psb_s_base_mat_mod
!!
!
interface
subroutine psb_s_base_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_base_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_base_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_base_csmv
end interface
@ -1228,7 +1244,7 @@ module psb_s_base_mat_mod
!!
!
interface
subroutine psb_s_base_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_base_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_base_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta
@ -1236,6 +1252,7 @@ module psb_s_base_mat_mod
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_base_vect_mv
end interface
@ -2219,13 +2236,14 @@ module psb_s_base_mat_mod
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface
subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_coo_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_coo_csmv
end interface
@ -2233,13 +2251,14 @@ module psb_s_base_mat_mod
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmm
interface
subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_coo_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_coo_csmm
end interface

@ -443,26 +443,28 @@ module psb_s_csc_mat_mod
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface
subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_csc_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_csc_csmv
end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmm
interface
subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_csc_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_csc_csmm
end interface

@ -461,26 +461,28 @@ module psb_s_csr_mat_mod
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface
subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_csr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_csr_csmv
end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmm
interface
subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_csr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:,:)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_csr_csmm
end interface
@ -606,13 +608,14 @@ module psb_s_csr_mat_mod
!> \memberof psb_s_ecsr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface
subroutine psb_s_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_s_ecsr_sparse_mat), intent(in) :: a
real(psb_spk_), intent(in) :: alpha, beta, x(:)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_s_ecsr_csmv
end interface

@ -67,6 +67,7 @@ module psb_z_base_mat_mod
procedure, pass(a) :: tril => psb_z_base_tril
procedure, pass(a) :: triu => psb_z_base_triu
procedure, pass(a) :: csclip => psb_z_base_csclip
procedure, pass(a) :: csmerge => psb_z_base_merge
procedure, pass(a) :: cp_to_coo => psb_z_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_z_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_z_base_cp_to_fmt
@ -626,6 +627,19 @@ module psb_z_base_mat_mod
logical, intent(in), optional :: rscale,cscale
end subroutine psb_z_base_csclip
end interface
interface
subroutine psb_z_base_merge(a,a2,acoo,n_rows,n_cols,info)
import :: psb_ipk_, psb_lpk_, psb_dpk_, &
& psb_z_base_sparse_mat, psb_z_coo_sparse_mat
class(psb_z_base_sparse_mat), intent(inout) :: a,a2
class(psb_z_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_base_merge
end interface
!
!> Function tril:
!! \memberof psb_z_base_sparse_mat
@ -1165,13 +1179,14 @@ module psb_z_base_mat_mod
!!
!
interface
subroutine psb_z_base_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_base_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_base_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_base_csmm
end interface
@ -1193,13 +1208,14 @@ module psb_z_base_mat_mod
!!
!
interface
subroutine psb_z_base_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_base_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_base_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_base_csmv
end interface
@ -1228,7 +1244,7 @@ module psb_z_base_mat_mod
!!
!
interface
subroutine psb_z_base_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_base_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_base_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta
@ -1236,6 +1252,7 @@ module psb_z_base_mat_mod
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_base_vect_mv
end interface
@ -2219,13 +2236,14 @@ module psb_z_base_mat_mod
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface
subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_coo_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_coo_csmv
end interface
@ -2233,13 +2251,14 @@ module psb_z_base_mat_mod
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmm
interface
subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_coo_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_coo_csmm
end interface

@ -443,26 +443,28 @@ module psb_z_csc_mat_mod
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface
subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_csc_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_csc_csmv
end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmm
interface
subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_csc_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_csc_csmm
end interface

@ -461,26 +461,28 @@ module psb_z_csr_mat_mod
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface
subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_csr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_csr_csmv
end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmm
interface
subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_csr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_csr_csmm
end interface
@ -606,13 +608,14 @@ module psb_z_csr_mat_mod
!> \memberof psb_z_ecsr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface
subroutine psb_z_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import
class(psb_z_ecsr_sparse_mat), intent(in) :: a
complex(psb_dpk_), intent(in) :: alpha, beta, x(:)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_z_ecsr_csmv
end interface

@ -140,21 +140,21 @@ subroutine psb_base_csgetptn(imin,imax,a,nz,ia,ja,info,&
call psb_error_handler(err_act)
end subroutine psb_base_csgetptn
subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev)
subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev,nin)
use psb_base_mat_mod, psb_protect_name => psb_base_get_neigh
use psb_error_mod
use psb_realloc_mod
use psb_sort_mod
implicit none
class(psb_base_sparse_mat), intent(in) :: a
integer(psb_ipk_), intent(in) :: idx
integer(psb_ipk_), intent(out) :: n
integer(psb_ipk_), allocatable, intent(out) :: neigh(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: lev
integer(psb_ipk_), intent(in) :: idx
integer(psb_ipk_), intent(out) :: n
integer(psb_ipk_), allocatable, intent(inout) :: neigh(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), optional, intent(in) :: lev, nin
integer(psb_ipk_) :: lev_, i, nl, ifl,ill,&
& n1, err_act, nn, nidx,ntl,ma
& n1, err_act, nn, nidx,ntl,ma,nin_
integer(psb_ipk_), allocatable :: ia(:), ja(:)
character(len=20) :: name='get_neigh'
logical, parameter :: debug=.false.
@ -166,19 +166,24 @@ subroutine psb_base_get_neigh(a,idx,neigh,n,info,lev)
else
lev_=1
end if
if(present(nin)) then
nin_ = nin
else
nin_ = 0
end if
! Turns out we can write get_neigh at this
! level
n = 0
n = 0
ma = a%get_nrows()
call a%csget(idx,idx,n,ia,ja,info)
if (info == psb_success_) call psb_realloc(n,neigh,info)
if (info == psb_success_) call psb_realloc(nin_+n,neigh,info)
if (info /= psb_success_) then
call psb_errpush(psb_err_alloc_dealloc_,name)
goto 9999
end if
neigh(1:n) = ja(1:n)
ifl = 1
ill = n
neigh(nin_+1:nin_+n) = ja(nin_+1:nin_+n)
ifl = nin_+1
ill = nin_+n
do nl = 2, lev_
n1 = ill - ifl + 1
call psb_ensure_size(ill+n1*n1,neigh,info)

@ -607,6 +607,51 @@ subroutine psb_c_base_csclip(a,b,info,&
end subroutine psb_c_base_csclip
subroutine psb_c_base_merge(a,a2,acoo,n_rows,n_cols,info)
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psb_c_base_mat_mod, psb_protect_name => psb_c_base_merge
implicit none
class(psb_c_base_sparse_mat), intent(inout) :: a,a2
class(psb_c_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
type(psb_c_coo_sparse_mat) :: acoo2
integer(psb_ipk_) :: nz
logical, parameter :: use_ecsr=.true.
character(len=20) :: name, ch_err
integer(psb_ipk_) :: err_act
info = psb_success_
name = 'psb_split'
call psb_erractionsave(err_act)
call a%cp_to_coo(acoo,info)
call acoo%set_bld()
call acoo%set_nrows(n_rows)
call acoo%set_ncols(n_cols)
call a2%cp_to_coo(acoo2,info)
nz=acoo2%get_nzeros()
call acoo%csput(nz,acoo2%ia,acoo2%ja,acoo2%val,ione,n_rows,ione,n_cols,info)
if (psb_errstatus_fatal()) then
info=psb_err_from_subroutine_
call psb_errpush(info,name,a_err='cscnv')
goto 9999
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_c_base_merge
!
! Here we have the base implementation of tril and triu
! this is just based on the getrow.

@ -1512,7 +1512,7 @@ contains
end subroutine psb_c_coo_cssv
subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1524,9 +1524,10 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
complex(psb_spk_) :: acc
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1550,6 +1551,12 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1633,7 +1640,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = czero
endif
acc = acc + a%val(i) * x(a%ja(i))
acc = acc + a%val(i) * x(ivshft_+a%ja(i))
i = i + 1
enddo
end if
@ -1645,7 +1652,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + a%val(i)*x(jc)
y(ir) = y(ir) + a%val(i)*x(ivshft_+jc)
enddo
else if (alpha == -cone) then
@ -1653,7 +1660,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - a%val(i)*x(jc)
y(ir) = y(ir) - a%val(i)*x(ivshft_+jc)
enddo
else
@ -1661,7 +1668,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*a%val(i)*x(jc)
y(ir) = y(ir) + alpha*a%val(i)*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1673,7 +1680,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + conjg(a%val(i))*x(jc)
y(ir) = y(ir) + conjg(a%val(i))*x(ivshft_+jc)
enddo
else if (alpha == -cone) then
@ -1681,7 +1688,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - conjg(a%val(i))*x(jc)
y(ir) = y(ir) - conjg(a%val(i))*x(ivshft_+jc)
enddo
else
@ -1689,7 +1696,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*conjg(a%val(i))*x(jc)
y(ir) = y(ir) + alpha*conjg(a%val(i))*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1705,7 +1712,7 @@ subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_c_coo_csmv
subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1716,9 +1723,10 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc, ivshft_
complex(psb_spk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1743,6 +1751,12 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1834,7 +1848,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = czero
endif
acc = acc + a%val(i) * x(a%ja(i),1:nc)
acc = acc + a%val(i) * x(ivshft_+a%ja(i),1:nc)
i = i + 1
enddo
end if
@ -1846,7 +1860,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -cone) then
@ -1854,7 +1868,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(ivshft_+jc,1:nc)
enddo
else
@ -1862,7 +1876,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha
@ -1874,7 +1888,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + conjg(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + conjg(a%val(i))*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -cone) then
@ -1882,7 +1896,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - conjg(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - conjg(a%val(i))*x(ivshft_+jc,1:nc)
enddo
else
@ -1890,7 +1904,7 @@ subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*conjg(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*conjg(a%val(i))*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_csmv
@ -53,9 +53,10 @@ subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
complex(psb_spk_) :: acc
logical :: tra
integer(psb_ipk_) :: err_act
@ -72,6 +73,12 @@ subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -320,7 +327,7 @@ subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_c_csc_csmv
subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_csmm
@ -330,6 +337,7 @@ subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_csmv
@ -53,9 +53,10 @@ subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n
integer(psb_ipk_) :: m, n, ivshft_
logical :: tra, ctra
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5)
@ -72,6 +73,12 @@ subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -107,7 +114,7 @@ subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans)
call psb_c_csr_csmv_inner(m,n,alpha,a%irp,a%ja,a%val,&
& a%is_triangle(),a%is_unit(),&
& x,beta,y,tra,ctra)
& x(ivshft_+1:),beta,y,tra,ctra)
call psb_erractionrestore(err_act)
return
@ -416,7 +423,7 @@ contains
end subroutine psb_c_csr_csmv
subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_csmm
@ -426,9 +433,10 @@ subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: j,m,n, nc
integer(psb_ipk_) :: j,m,n, nc, ivshft_
complex(psb_spk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -446,6 +454,12 @@ subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -486,7 +500,7 @@ subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans)
end if
call psb_c_csr_csmm_inner(m,n,nc,alpha,a%irp,a%ja,a%val, &
& a%is_triangle(),a%is_unit(),x,size(x,1,kind=psb_ipk_), &
& a%is_triangle(),a%is_unit(),x(ivshft+1:,:),size(x,1,kind=psb_ipk_), &
& beta,y,size(y,1,kind=psb_ipk_),tra,ctra,acc)
@ -4344,7 +4358,7 @@ subroutine psb_c_ecsr_mold(a,b,info)
end subroutine psb_c_ecsr_mold
subroutine psb_c_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_c_csr_mat_mod, psb_protect_name => psb_c_ecsr_csmv
@ -4354,6 +4368,7 @@ subroutine psb_c_ecsr_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n

@ -607,6 +607,51 @@ subroutine psb_d_base_csclip(a,b,info,&
end subroutine psb_d_base_csclip
subroutine psb_d_base_merge(a,a2,acoo,n_rows,n_cols,info)
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psb_d_base_mat_mod, psb_protect_name => psb_d_base_merge
implicit none
class(psb_d_base_sparse_mat), intent(inout) :: a,a2
class(psb_d_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
type(psb_d_coo_sparse_mat) :: acoo2
integer(psb_ipk_) :: nz
logical, parameter :: use_ecsr=.true.
character(len=20) :: name, ch_err
integer(psb_ipk_) :: err_act
info = psb_success_
name = 'psb_split'
call psb_erractionsave(err_act)
call a%cp_to_coo(acoo,info)
call acoo%set_bld()
call acoo%set_nrows(n_rows)
call acoo%set_ncols(n_cols)
call a2%cp_to_coo(acoo2,info)
nz=acoo2%get_nzeros()
call acoo%csput(nz,acoo2%ia,acoo2%ja,acoo2%val,ione,n_rows,ione,n_cols,info)
if (psb_errstatus_fatal()) then
info=psb_err_from_subroutine_
call psb_errpush(info,name,a_err='cscnv')
goto 9999
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_d_base_merge
!
! Here we have the base implementation of tril and triu
! this is just based on the getrow.

@ -1512,7 +1512,7 @@ contains
end subroutine psb_d_coo_cssv
subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1524,9 +1524,10 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
real(psb_dpk_) :: acc
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1550,6 +1551,12 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1633,7 +1640,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = dzero
endif
acc = acc + a%val(i) * x(a%ja(i))
acc = acc + a%val(i) * x(ivshft_+a%ja(i))
i = i + 1
enddo
end if
@ -1645,7 +1652,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + a%val(i)*x(jc)
y(ir) = y(ir) + a%val(i)*x(ivshft_+jc)
enddo
else if (alpha == -done) then
@ -1653,7 +1660,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - a%val(i)*x(jc)
y(ir) = y(ir) - a%val(i)*x(ivshft_+jc)
enddo
else
@ -1661,7 +1668,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*a%val(i)*x(jc)
y(ir) = y(ir) + alpha*a%val(i)*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1673,7 +1680,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + (a%val(i))*x(jc)
y(ir) = y(ir) + (a%val(i))*x(ivshft_+jc)
enddo
else if (alpha == -done) then
@ -1681,7 +1688,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - (a%val(i))*x(jc)
y(ir) = y(ir) - (a%val(i))*x(ivshft_+jc)
enddo
else
@ -1689,7 +1696,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*(a%val(i))*x(jc)
y(ir) = y(ir) + alpha*(a%val(i))*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1705,7 +1712,7 @@ subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_d_coo_csmv
subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1716,9 +1723,10 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc, ivshft_
real(psb_dpk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1743,6 +1751,12 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1834,7 +1848,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = dzero
endif
acc = acc + a%val(i) * x(a%ja(i),1:nc)
acc = acc + a%val(i) * x(ivshft_+a%ja(i),1:nc)
i = i + 1
enddo
end if
@ -1846,7 +1860,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -done) then
@ -1854,7 +1868,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(ivshft_+jc,1:nc)
enddo
else
@ -1862,7 +1876,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha
@ -1874,7 +1888,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + (a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + (a%val(i))*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -done) then
@ -1882,7 +1896,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - (a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - (a%val(i))*x(ivshft_+jc,1:nc)
enddo
else
@ -1890,7 +1904,7 @@ subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*(a%val(i))*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_csmv
@ -53,9 +53,10 @@ subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
real(psb_dpk_) :: acc
logical :: tra
integer(psb_ipk_) :: err_act
@ -72,6 +73,12 @@ subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -320,7 +327,7 @@ subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_d_csc_csmv
subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_csmm
@ -330,6 +337,7 @@ subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_csmv
@ -53,9 +53,10 @@ subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n
integer(psb_ipk_) :: m, n, ivshft_
logical :: tra, ctra
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5)
@ -72,6 +73,12 @@ subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -107,7 +114,7 @@ subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans)
call psb_d_csr_csmv_inner(m,n,alpha,a%irp,a%ja,a%val,&
& a%is_triangle(),a%is_unit(),&
& x,beta,y,tra,ctra)
& x(ivshft_+1:),beta,y,tra,ctra)
call psb_erractionrestore(err_act)
return
@ -416,7 +423,7 @@ contains
end subroutine psb_d_csr_csmv
subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_csmm
@ -426,9 +433,10 @@ subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: j,m,n, nc
integer(psb_ipk_) :: j,m,n, nc, ivshft_
real(psb_dpk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -446,6 +454,12 @@ subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -486,7 +500,7 @@ subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans)
end if
call psb_d_csr_csmm_inner(m,n,nc,alpha,a%irp,a%ja,a%val, &
& a%is_triangle(),a%is_unit(),x,size(x,1,kind=psb_ipk_), &
& a%is_triangle(),a%is_unit(),x(ivshft+1:,:),size(x,1,kind=psb_ipk_), &
& beta,y,size(y,1,kind=psb_ipk_),tra,ctra,acc)
@ -4344,7 +4358,7 @@ subroutine psb_d_ecsr_mold(a,b,info)
end subroutine psb_d_ecsr_mold
subroutine psb_d_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_d_csr_mat_mod, psb_protect_name => psb_d_ecsr_csmv
@ -4354,6 +4368,7 @@ subroutine psb_d_ecsr_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n

@ -607,6 +607,51 @@ subroutine psb_s_base_csclip(a,b,info,&
end subroutine psb_s_base_csclip
subroutine psb_s_base_merge(a,a2,acoo,n_rows,n_cols,info)
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psb_s_base_mat_mod, psb_protect_name => psb_s_base_merge
implicit none
class(psb_s_base_sparse_mat), intent(inout) :: a,a2
class(psb_s_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
type(psb_s_coo_sparse_mat) :: acoo2
integer(psb_ipk_) :: nz
logical, parameter :: use_ecsr=.true.
character(len=20) :: name, ch_err
integer(psb_ipk_) :: err_act
info = psb_success_
name = 'psb_split'
call psb_erractionsave(err_act)
call a%cp_to_coo(acoo,info)
call acoo%set_bld()
call acoo%set_nrows(n_rows)
call acoo%set_ncols(n_cols)
call a2%cp_to_coo(acoo2,info)
nz=acoo2%get_nzeros()
call acoo%csput(nz,acoo2%ia,acoo2%ja,acoo2%val,ione,n_rows,ione,n_cols,info)
if (psb_errstatus_fatal()) then
info=psb_err_from_subroutine_
call psb_errpush(info,name,a_err='cscnv')
goto 9999
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_s_base_merge
!
! Here we have the base implementation of tril and triu
! this is just based on the getrow.

@ -1512,7 +1512,7 @@ contains
end subroutine psb_s_coo_cssv
subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1524,9 +1524,10 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
real(psb_spk_) :: acc
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1550,6 +1551,12 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1633,7 +1640,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = szero
endif
acc = acc + a%val(i) * x(a%ja(i))
acc = acc + a%val(i) * x(ivshft_+a%ja(i))
i = i + 1
enddo
end if
@ -1645,7 +1652,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + a%val(i)*x(jc)
y(ir) = y(ir) + a%val(i)*x(ivshft_+jc)
enddo
else if (alpha == -sone) then
@ -1653,7 +1660,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - a%val(i)*x(jc)
y(ir) = y(ir) - a%val(i)*x(ivshft_+jc)
enddo
else
@ -1661,7 +1668,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*a%val(i)*x(jc)
y(ir) = y(ir) + alpha*a%val(i)*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1673,7 +1680,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + (a%val(i))*x(jc)
y(ir) = y(ir) + (a%val(i))*x(ivshft_+jc)
enddo
else if (alpha == -sone) then
@ -1681,7 +1688,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - (a%val(i))*x(jc)
y(ir) = y(ir) - (a%val(i))*x(ivshft_+jc)
enddo
else
@ -1689,7 +1696,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*(a%val(i))*x(jc)
y(ir) = y(ir) + alpha*(a%val(i))*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1705,7 +1712,7 @@ subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_s_coo_csmv
subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1716,9 +1723,10 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc, ivshft_
real(psb_spk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1743,6 +1751,12 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1834,7 +1848,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = szero
endif
acc = acc + a%val(i) * x(a%ja(i),1:nc)
acc = acc + a%val(i) * x(ivshft_+a%ja(i),1:nc)
i = i + 1
enddo
end if
@ -1846,7 +1860,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -sone) then
@ -1854,7 +1868,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(ivshft_+jc,1:nc)
enddo
else
@ -1862,7 +1876,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha
@ -1874,7 +1888,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + (a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + (a%val(i))*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -sone) then
@ -1882,7 +1896,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - (a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - (a%val(i))*x(ivshft_+jc,1:nc)
enddo
else
@ -1890,7 +1904,7 @@ subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*(a%val(i))*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_csmv
@ -53,9 +53,10 @@ subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
real(psb_spk_) :: acc
logical :: tra
integer(psb_ipk_) :: err_act
@ -72,6 +73,12 @@ subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -320,7 +327,7 @@ subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_s_csc_csmv
subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_csmm
@ -330,6 +337,7 @@ subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_csmv
@ -53,9 +53,10 @@ subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n
integer(psb_ipk_) :: m, n, ivshft_
logical :: tra, ctra
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5)
@ -72,6 +73,12 @@ subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -107,7 +114,7 @@ subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans)
call psb_s_csr_csmv_inner(m,n,alpha,a%irp,a%ja,a%val,&
& a%is_triangle(),a%is_unit(),&
& x,beta,y,tra,ctra)
& x(ivshft_+1:),beta,y,tra,ctra)
call psb_erractionrestore(err_act)
return
@ -416,7 +423,7 @@ contains
end subroutine psb_s_csr_csmv
subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_csmm
@ -426,9 +433,10 @@ subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: j,m,n, nc
integer(psb_ipk_) :: j,m,n, nc, ivshft_
real(psb_spk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -446,6 +454,12 @@ subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -486,7 +500,7 @@ subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans)
end if
call psb_s_csr_csmm_inner(m,n,nc,alpha,a%irp,a%ja,a%val, &
& a%is_triangle(),a%is_unit(),x,size(x,1,kind=psb_ipk_), &
& a%is_triangle(),a%is_unit(),x(ivshft+1:,:),size(x,1,kind=psb_ipk_), &
& beta,y,size(y,1,kind=psb_ipk_),tra,ctra,acc)
@ -4344,7 +4358,7 @@ subroutine psb_s_ecsr_mold(a,b,info)
end subroutine psb_s_ecsr_mold
subroutine psb_s_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_s_csr_mat_mod, psb_protect_name => psb_s_ecsr_csmv
@ -4354,6 +4368,7 @@ subroutine psb_s_ecsr_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n

@ -607,6 +607,51 @@ subroutine psb_z_base_csclip(a,b,info,&
end subroutine psb_z_base_csclip
subroutine psb_z_base_merge(a,a2,acoo,n_rows,n_cols,info)
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psb_z_base_mat_mod, psb_protect_name => psb_z_base_merge
implicit none
class(psb_z_base_sparse_mat), intent(inout) :: a,a2
class(psb_z_coo_sparse_mat), intent(out) :: acoo
integer(psb_ipk_), intent(in) :: n_rows, n_cols
integer(psb_ipk_), intent(out) :: info
type(psb_z_coo_sparse_mat) :: acoo2
integer(psb_ipk_) :: nz
logical, parameter :: use_ecsr=.true.
character(len=20) :: name, ch_err
integer(psb_ipk_) :: err_act
info = psb_success_
name = 'psb_split'
call psb_erractionsave(err_act)
call a%cp_to_coo(acoo,info)
call acoo%set_bld()
call acoo%set_nrows(n_rows)
call acoo%set_ncols(n_cols)
call a2%cp_to_coo(acoo2,info)
nz=acoo2%get_nzeros()
call acoo%csput(nz,acoo2%ia,acoo2%ja,acoo2%val,ione,n_rows,ione,n_cols,info)
if (psb_errstatus_fatal()) then
info=psb_err_from_subroutine_
call psb_errpush(info,name,a_err='cscnv')
goto 9999
endif
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_z_base_merge
!
! Here we have the base implementation of tril and triu
! this is just based on the getrow.

@ -1512,7 +1512,7 @@ contains
end subroutine psb_z_coo_cssv
subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1524,9 +1524,10 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
complex(psb_dpk_) :: acc
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1550,6 +1551,12 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1633,7 +1640,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = zzero
endif
acc = acc + a%val(i) * x(a%ja(i))
acc = acc + a%val(i) * x(ivshft_+a%ja(i))
i = i + 1
enddo
end if
@ -1645,7 +1652,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + a%val(i)*x(jc)
y(ir) = y(ir) + a%val(i)*x(ivshft_+jc)
enddo
else if (alpha == -zone) then
@ -1653,7 +1660,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - a%val(i)*x(jc)
y(ir) = y(ir) - a%val(i)*x(ivshft_+jc)
enddo
else
@ -1661,7 +1668,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*a%val(i)*x(jc)
y(ir) = y(ir) + alpha*a%val(i)*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1673,7 +1680,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + conjg(a%val(i))*x(jc)
y(ir) = y(ir) + conjg(a%val(i))*x(ivshft_+jc)
enddo
else if (alpha == -zone) then
@ -1681,7 +1688,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) - conjg(a%val(i))*x(jc)
y(ir) = y(ir) - conjg(a%val(i))*x(ivshft_+jc)
enddo
else
@ -1689,7 +1696,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir) = y(ir) + alpha*conjg(a%val(i))*x(jc)
y(ir) = y(ir) + alpha*conjg(a%val(i))*x(ivshft_+jc)
enddo
end if !.....end testing on alpha
@ -1705,7 +1712,7 @@ subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_z_coo_csmv
subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_const_mod
use psb_error_mod
use psb_string_mod
@ -1716,9 +1723,10 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc, ivshft_
complex(psb_dpk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -1743,6 +1751,12 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
tra = (psb_toupper(trans_) == 'T')
ctra = (psb_toupper(trans_) == 'C')
@ -1834,7 +1848,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
ir = a%ia(i)
acc = zzero
endif
acc = acc + a%val(i) * x(a%ja(i),1:nc)
acc = acc + a%val(i) * x(ivshft_+a%ja(i),1:nc)
i = i + 1
enddo
end if
@ -1846,7 +1860,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + a%val(i)*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -zone) then
@ -1854,7 +1868,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - a%val(i)*x(ivshft_+jc,1:nc)
enddo
else
@ -1862,7 +1876,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*a%val(i)*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha
@ -1874,7 +1888,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + conjg(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + conjg(a%val(i))*x(ivshft_+jc,1:nc)
enddo
else if (alpha == -zone) then
@ -1882,7 +1896,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) - conjg(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) - conjg(a%val(i))*x(ivshft_+jc,1:nc)
enddo
else
@ -1890,7 +1904,7 @@ subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
do i=1,nnz
ir = a%ja(i)
jc = a%ia(i)
y(ir,1:nc) = y(ir,1:nc) + alpha*conjg(a%val(i))*x(jc,1:nc)
y(ir,1:nc) = y(ir,1:nc) + alpha*conjg(a%val(i))*x(ivshft_+jc,1:nc)
enddo
end if !.....end testing on alpha

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_csmv
@ -53,9 +53,10 @@ subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, ivshft_
complex(psb_dpk_) :: acc
logical :: tra
integer(psb_ipk_) :: err_act
@ -72,6 +73,12 @@ subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -320,7 +327,7 @@ subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans)
end subroutine psb_z_csc_csmv
subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_csmm
@ -330,6 +337,7 @@ subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nc

@ -43,7 +43,7 @@
!
! == ===================================
subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_csmv
@ -53,9 +53,10 @@ subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n
integer(psb_ipk_) :: m, n, ivshft_
logical :: tra, ctra
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ierr(5)
@ -72,6 +73,12 @@ subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -107,7 +114,7 @@ subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans)
call psb_z_csr_csmv_inner(m,n,alpha,a%irp,a%ja,a%val,&
& a%is_triangle(),a%is_unit(),&
& x,beta,y,tra,ctra)
& x(ivshft_+1:),beta,y,tra,ctra)
call psb_erractionrestore(err_act)
return
@ -416,7 +423,7 @@ contains
end subroutine psb_z_csr_csmv
subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_csmm
@ -426,9 +433,10 @@ subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: j,m,n, nc
integer(psb_ipk_) :: j,m,n, nc, ivshft_
complex(psb_dpk_), allocatable :: acc(:)
logical :: tra, ctra
integer(psb_ipk_) :: err_act
@ -446,6 +454,12 @@ subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans)
trans_ = 'N'
end if
if (present(ivshft)) then
ivshft_ = ivshft
else
ivshft_ = 0
end if
if (.not.a%is_asb()) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
@ -486,7 +500,7 @@ subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans)
end if
call psb_z_csr_csmm_inner(m,n,nc,alpha,a%irp,a%ja,a%val, &
& a%is_triangle(),a%is_unit(),x,size(x,1,kind=psb_ipk_), &
& a%is_triangle(),a%is_unit(),x(ivshft+1:,:),size(x,1,kind=psb_ipk_), &
& beta,y,size(y,1,kind=psb_ipk_),tra,ctra,acc)
@ -4344,7 +4358,7 @@ subroutine psb_z_ecsr_mold(a,b,info)
end subroutine psb_z_ecsr_mold
subroutine psb_z_ecsr_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_ecsr_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_error_mod
use psb_string_mod
use psb_z_csr_mat_mod, psb_protect_name => psb_z_ecsr_csmv
@ -4354,6 +4368,7 @@ subroutine psb_z_ecsr_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: m, n

@ -30,7 +30,7 @@
!
subroutine psb_c_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_c_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +41,7 @@ subroutine psb_c_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +43,7 @@ subroutine psb_c_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra

@ -30,7 +30,7 @@
!
subroutine psb_c_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_diag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,7 @@ subroutine psb_c_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -28,7 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,8 @@ subroutine psb_c_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_elg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_c_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_elg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_c_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -43,6 +43,8 @@ subroutine psb_c_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -41,6 +41,7 @@ subroutine psb_c_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -43,6 +43,8 @@ subroutine psb_c_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_c_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_c_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_c_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -43,6 +43,8 @@ subroutine psb_c_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_c_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_c_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_c_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_c_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_c_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +45,8 @@ subroutine psb_c_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
subroutine psb_d_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_d_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +41,7 @@ subroutine psb_d_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +43,7 @@ subroutine psb_d_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra

@ -30,7 +30,7 @@
!
subroutine psb_d_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_diag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,7 @@ subroutine psb_d_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -28,7 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,8 @@ subroutine psb_d_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_elg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_d_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_elg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_d_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -43,6 +43,8 @@ subroutine psb_d_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -41,6 +41,7 @@ subroutine psb_d_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -43,6 +43,8 @@ subroutine psb_d_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_d_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_d_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_d_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -43,6 +43,8 @@ subroutine psb_d_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_d_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_d_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_d_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_d_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_d_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_d_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +45,8 @@ subroutine psb_d_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_d_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
subroutine psb_s_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_s_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +41,7 @@ subroutine psb_s_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +43,7 @@ subroutine psb_s_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra

@ -30,7 +30,7 @@
!
subroutine psb_s_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_diag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,7 @@ subroutine psb_s_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -28,7 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,8 @@ subroutine psb_s_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_elg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_s_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_elg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_s_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -43,6 +43,8 @@ subroutine psb_s_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -41,6 +41,7 @@ subroutine psb_s_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -43,6 +43,8 @@ subroutine psb_s_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_s_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_s_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_s_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -43,6 +43,8 @@ subroutine psb_s_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_s_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_s_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_s_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_s_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
real(psb_spk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_s_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_s_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +45,8 @@ subroutine psb_s_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_s_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
real(psb_spk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
subroutine psb_z_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_z_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +41,7 @@ subroutine psb_z_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -28,9 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +43,7 @@ subroutine psb_z_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra

@ -30,7 +30,7 @@
!
subroutine psb_z_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_diag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,7 @@ subroutine psb_z_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -28,7 +28,7 @@
! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use diagdev_mod
@ -42,6 +42,8 @@ subroutine psb_z_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_elg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_z_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_elg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -41,6 +41,7 @@ subroutine psb_z_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use elldev_mod
@ -43,6 +43,8 @@ subroutine psb_z_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -41,6 +41,7 @@ subroutine psb_z_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hdiagdev_mod
@ -43,6 +43,8 @@ subroutine psb_z_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_z_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -41,6 +41,7 @@ subroutine psb_z_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer :: i,j,k,m,n, nnz, ir, jc

@ -29,7 +29,7 @@
! POSSIBILITY OF SUCH DAMAGE.
!
subroutine psb_z_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use hlldev_mod
@ -43,6 +43,8 @@ subroutine psb_z_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_z_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_z_cuda_hybg_csmm(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:,:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc, nxy

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_z_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -43,6 +43,7 @@ subroutine psb_z_cuda_hybg_csmv(alpha,a,x,beta,y,info,trans)
complex(psb_dpk_), intent(inout) :: y(:)
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
character :: trans_
integer(psb_ipk_) :: i,j,k,m,n, nnz, ir, jc

@ -30,7 +30,7 @@
!
#if CUDA_SHORT_VERSION <= 10
subroutine psb_z_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_z_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
use psb_base_mod
use cusparse_mod
@ -45,6 +45,8 @@ subroutine psb_z_cuda_hybg_vect_mv(alpha,a,x,beta,y,info,trans)
class(psb_z_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
complex(psb_dpk_), allocatable :: rx(:), ry(:)
logical :: tra
character :: trans_

@ -100,7 +100,7 @@ module psb_c_cuda_csrg_mat_mod
interface
subroutine psb_c_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_csrg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_csrg_sparse_mat, psb_spk_, psb_c_base_vect_type, psb_ipk_
class(psb_c_cuda_csrg_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -108,6 +108,7 @@ module psb_c_cuda_csrg_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_csrg_vect_mv
end interface
@ -191,23 +192,25 @@ module psb_c_cuda_csrg_mat_mod
end interface
interface
subroutine psb_c_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_csrg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_csrg_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_csrg_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_csrg_csmv
end interface
interface
subroutine psb_c_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_csrg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_csrg_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_csrg_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_csrg_csmm
end interface

@ -74,7 +74,7 @@ module psb_c_cuda_diag_mat_mod
interface
subroutine psb_c_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_diag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_diag_sparse_mat, psb_spk_, psb_c_base_vect_type, psb_ipk_
class(psb_c_cuda_diag_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -82,6 +82,7 @@ module psb_c_cuda_diag_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_diag_vect_mv
end interface
@ -169,23 +170,25 @@ module psb_c_cuda_diag_mat_mod
end interface
interface
subroutine psb_c_cuda_diag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_diag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_diag_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_diag_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_diag_csmv
end interface
interface
subroutine psb_c_cuda_diag_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_diag_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_diag_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_diag_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_diag_csmm
end interface

@ -75,7 +75,7 @@ module psb_c_cuda_dnsg_mat_mod
interface
subroutine psb_c_cuda_dnsg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_dnsg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_dnsg_sparse_mat, psb_spk_, psb_c_base_vect_type, psb_ipk_
class(psb_c_cuda_dnsg_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -83,6 +83,7 @@ module psb_c_cuda_dnsg_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_dnsg_vect_mv
end interface
!!$
@ -169,23 +170,25 @@ module psb_c_cuda_dnsg_mat_mod
end interface
!!$ interface
!!$ subroutine psb_c_cuda_dnsg_csmv(alpha,a,x,beta,y,info,trans)
!!$ subroutine psb_c_cuda_dnsg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
!!$ import :: psb_c_cuda_dnsg_sparse_mat, psb_spk_, psb_ipk_
!!$ class(psb_c_cuda_dnsg_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
!!$ integer(psb_ipk_), optional, intent(in) :: ivshft
!!$ end subroutine psb_c_cuda_dnsg_csmv
!!$ end interface
!!$ interface
!!$ subroutine psb_c_cuda_dnsg_csmm(alpha,a,x,beta,y,info,trans)
!!$ subroutine psb_c_cuda_dnsg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
!!$ import :: psb_c_cuda_dnsg_sparse_mat, psb_spk_, psb_ipk_
!!$ class(psb_c_cuda_dnsg_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
!!$ integer(psb_ipk_), optional, intent(in) :: ivshft
!!$ end subroutine psb_c_cuda_dnsg_csmm
!!$ end interface
!!$

@ -92,7 +92,7 @@ module psb_c_cuda_elg_mat_mod
interface
subroutine psb_c_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_elg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_elg_sparse_mat, psb_spk_, psb_c_base_vect_type, psb_ipk_
class(psb_c_cuda_elg_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -100,6 +100,7 @@ module psb_c_cuda_elg_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_elg_vect_mv
end interface
@ -218,23 +219,25 @@ module psb_c_cuda_elg_mat_mod
end interface
interface
subroutine psb_c_cuda_elg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_elg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_elg_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_elg_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_elg_csmv
end interface
interface
subroutine psb_c_cuda_elg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_elg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_elg_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_elg_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_elg_csmm
end interface

@ -68,7 +68,7 @@ module psb_c_cuda_hdiag_mat_mod
interface
subroutine psb_c_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hdiag_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_hdiag_sparse_mat, psb_spk_, psb_c_base_vect_type, psb_ipk_
class(psb_c_cuda_hdiag_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -76,6 +76,7 @@ module psb_c_cuda_hdiag_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_hdiag_vect_mv
end interface
@ -162,24 +163,26 @@ module psb_c_cuda_hdiag_mat_mod
!!$ end interface
!!$
interface
subroutine psb_c_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hdiag_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_hdiag_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_hdiag_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_hdiag_csmv
end interface
!!$ interface
!!$ subroutine psb_c_cuda_hdiag_csmm(alpha,a,x,beta,y,info,trans)
!!$ subroutine psb_c_cuda_hdiag_csmm(alpha,a,x,beta,y,info,trans,ivshft)
!!$ import :: psb_c_cuda_hdiag_sparse_mat, psb_spk_, psb_ipk_
!!$ class(psb_c_cuda_hdiag_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
!!$ integer(psb_ipk_), optional, intent(in) :: ivshft
!!$ end subroutine psb_c_cuda_hdiag_csmm
!!$ end interface
!!$

@ -88,7 +88,7 @@ module psb_c_cuda_hlg_mat_mod
interface
subroutine psb_c_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hlg_vect_mv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_hlg_sparse_mat, psb_spk_, psb_c_base_vect_type, psb_ipk_
class(psb_c_cuda_hlg_sparse_mat), intent(in) :: a
complex(psb_spk_), intent(in) :: alpha, beta
@ -96,6 +96,7 @@ module psb_c_cuda_hlg_mat_mod
class(psb_c_base_vect_type), intent(inout) :: y
integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_hlg_vect_mv
end interface
@ -191,22 +192,24 @@ module psb_c_cuda_hlg_mat_mod
end interface
interface
subroutine psb_c_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hlg_csmv(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_hlg_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_hlg_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
integer(psb_ipk_), optional, intent(in) :: ivshft
end subroutine psb_c_cuda_hlg_csmv
end interface
interface
subroutine psb_c_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans)
subroutine psb_c_cuda_hlg_csmm(alpha,a,x,beta,y,info,trans,ivshft)
import :: psb_c_cuda_hlg_sparse_mat, psb_spk_, psb_ipk_
class(psb_c_cuda_hlg_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
integer(psb_ipk_), optional, intent(in) :: ivshft
character, optional, intent(in) :: trans
end subroutine psb_c_cuda_hlg_csmm
end interface

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save