mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
psblas3:
base/serial/impl/psb_d_coo_impl.f90 base/tools/psb_cdins.f90 base/tools/psb_dspins.f90 Experiments for perfomance in matrix build
This commit is contained in:
@@ -2676,10 +2676,10 @@ contains
|
||||
implicit none
|
||||
|
||||
integer(psb_ipk_), intent(in) :: nz, imin,imax,jmin,jmax,maxsz
|
||||
integer(psb_ipk_), intent(in) :: ia(:),ja(:)
|
||||
integer(psb_ipk_), intent(inout) :: nza,ia1(:),ia2(:)
|
||||
real(psb_dpk_), intent(in) :: val(:)
|
||||
real(psb_dpk_), intent(inout) :: aspk(:)
|
||||
integer(psb_ipk_), intent(in) :: ia(*),ja(*)
|
||||
integer(psb_ipk_), intent(inout) :: nza,ia1(*),ia2(*)
|
||||
real(psb_dpk_), intent(in) :: val(*)
|
||||
real(psb_dpk_), intent(inout) :: aspk(*)
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_), intent(in), optional :: gtl(:)
|
||||
integer(psb_ipk_) :: i,ir,ic,ng
|
||||
@@ -2696,10 +2696,10 @@ contains
|
||||
ic = gtl(ic)
|
||||
if ((ir >=imin).and.(ir<=imax).and.(ic>=jmin).and.(ic<=jmax)) then
|
||||
nza = nza + 1
|
||||
if (nza > maxsz) then
|
||||
info = -91
|
||||
return
|
||||
endif
|
||||
!!$ if (nza > maxsz) then
|
||||
!!$ info = -91
|
||||
!!$ return
|
||||
!!$ endif
|
||||
ia1(nza) = ir
|
||||
ia2(nza) = ic
|
||||
aspk(nza) = val(i)
|
||||
@@ -2713,10 +2713,10 @@ contains
|
||||
ic = ja(i)
|
||||
if ((ir >=imin).and.(ir<=imax).and.(ic>=jmin).and.(ic<=jmax)) then
|
||||
nza = nza + 1
|
||||
if (nza > maxsz) then
|
||||
info = -92
|
||||
return
|
||||
endif
|
||||
!!$ if (nza > maxsz) then
|
||||
!!$ info = -92
|
||||
!!$ return
|
||||
!!$ endif
|
||||
ia1(nza) = ir
|
||||
ia2(nza) = ic
|
||||
aspk(nza) = val(i)
|
||||
|
||||
@@ -246,15 +246,15 @@ subroutine psb_cdinsc(nz,ja,desc,info,jla,mask,lidx)
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
mask_ => mask
|
||||
else
|
||||
allocate(mask__(nz))
|
||||
mask_ => mask__
|
||||
mask_ = .true.
|
||||
!!$ mask_ => mask
|
||||
!!$ else
|
||||
!!$ allocate(mask__(nz))
|
||||
!!$ mask_ => mask__
|
||||
!!$ mask_ = .true.
|
||||
end if
|
||||
|
||||
if (present(jla)) then
|
||||
call psi_idx_ins_cnv(nz,ja,jla,desc,info,mask=mask_,lidx=lidx)
|
||||
call psi_idx_ins_cnv(nz,ja,jla,desc,info,mask=mask,lidx=lidx)
|
||||
else
|
||||
allocate(jla_(nz),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
@@ -262,7 +262,7 @@ subroutine psb_cdinsc(nz,ja,desc,info,jla,mask,lidx)
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
call psi_idx_ins_cnv(nz,ja,jla_,desc,info,mask=mask_,lidx=lidx)
|
||||
call psi_idx_ins_cnv(nz,ja,jla_,desc,info,mask=mask,lidx=lidx)
|
||||
deallocate(jla_)
|
||||
end if
|
||||
|
||||
|
||||
@@ -178,10 +178,8 @@ subroutine psb_dspins(nz,ia,ja,val,a,desc_a,info,rebuild,local)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
ila(1:nz) = ia(1:nz)
|
||||
jla(1:nz) = ja(1:nz)
|
||||
call psb_glob_to_loc(ila(1:nz),desc_a,info,iact='I')
|
||||
call psb_glob_to_loc(jla(1:nz),desc_a,info,iact='I')
|
||||
call psb_glob_to_loc(ia(1:nz),ila(1:nz),desc_a,info,iact='I')
|
||||
call psb_glob_to_loc(ja(1:nz),jla(1:nz),desc_a,info,iact='I')
|
||||
|
||||
call a%csput(nz,ila,jla,val,ione,nrow,ione,ncol,info)
|
||||
if (info /= psb_success_) then
|
||||
|
||||
Reference in New Issue
Block a user