|
|
|
@ -3367,7 +3367,7 @@ subroutine psb_dcsrspspmm(a,b,c,info, spmm_impl_id)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
! CSR matrix multiplication
|
|
|
|
|
call csr_spspmm(a,b,c,spmm_impl_id_,info)
|
|
|
|
|
call csr_spspmm(a,b,c,info,spmm_impl_id_)
|
|
|
|
|
|
|
|
|
|
call c%set_asb()
|
|
|
|
|
call c%set_host()
|
|
|
|
@ -3381,13 +3381,13 @@ subroutine psb_dcsrspspmm(a,b,c,info, spmm_impl_id)
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
subroutine csr_spspmm(a,b,c,spmm_impl_id,info)
|
|
|
|
|
subroutine csr_spspmm(a,b,c,info,spmm_impl_id)
|
|
|
|
|
implicit none
|
|
|
|
|
type(psb_d_csr_sparse_mat), intent(in) :: a,b
|
|
|
|
|
type(psb_d_csr_sparse_mat), intent(inout) :: c
|
|
|
|
|
! choice of spmm implementation from c code
|
|
|
|
|
integer(psb_ipk_), intent(in) :: spmm_impl_id
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
integer(psb_ipk_), intent(in) :: spmm_impl_id
|
|
|
|
|
integer(psb_ipk_) :: ma,na,mb,nb
|
|
|
|
|
integer(psb_ipk_), allocatable :: irow(:), idxs(:)
|
|
|
|
|
real(psb_dpk_), allocatable :: row(:)
|
|
|
|
@ -3401,29 +3401,7 @@ contains
|
|
|
|
|
mb = b%get_nrows()
|
|
|
|
|
nb = b%get_ncols()
|
|
|
|
|
|
|
|
|
|
!! TODO :
|
|
|
|
|
! * convert psb_d_csr_sparse_mat a and b to spmat_t
|
|
|
|
|
! * choice of implementation
|
|
|
|
|
! * code interfaces for sp3mm code
|
|
|
|
|
! * call wanted interface
|
|
|
|
|
! * convert result from spmat_t to psb_d_csr_sparse_mat c
|
|
|
|
|
|
|
|
|
|
! conversion
|
|
|
|
|
|
|
|
|
|
! select case (spmm_impl_id)
|
|
|
|
|
! case (SPMM_ROW_BY_ROW_UB)
|
|
|
|
|
! ! call spmm_row_by_row_ub
|
|
|
|
|
! case (SPMM_ROW_BY_ROW_SYMB_NUM)
|
|
|
|
|
! ! call spmm_row_by_row_symb_num
|
|
|
|
|
! case (SPMM_ROW_BY_ROW_1D_BLOCKS_SYMB_NUM)
|
|
|
|
|
! ! call spmm_row_by_row_1d_blocks_symb_num
|
|
|
|
|
! case (SPMM_ROW_BY_ROW_2D_BLOCKS_SYMB_NUM)
|
|
|
|
|
! ! call spmm_row_by_row_2d_blocks_symb_num
|
|
|
|
|
! case default
|
|
|
|
|
! ! call default choice
|
|
|
|
|
! end select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (.false.) then
|
|
|
|
|
nze = min(size(c%val),size(c%ja))
|
|
|
|
|
isz = max(ma,na,mb,nb)
|
|
|
|
|
call psb_realloc(isz,row,info)
|
|
|
|
@ -3470,7 +3448,15 @@ contains
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
c%irp(ma+1) = nzc
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
!! TODO :
|
|
|
|
|
! * convert psb_d_csr_sparse_mat a and b to spmat_t
|
|
|
|
|
! * choice of implementation
|
|
|
|
|
! * code interfaces for sp3mm code
|
|
|
|
|
! * call wanted interface
|
|
|
|
|
! * convert result from spmat_t to psb_d_csr_sparse_mat c
|
|
|
|
|
call dspmm(a,b,c,info,spmm_impl_id_)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end subroutine csr_spspmm
|
|
|
|
|
|
|
|
|
|