Fix clean_negidx method.

psblas-3.6-maint V3.6.1-2
Salvatore Filippone 5 years ago
parent 6f92a78096
commit fa94b7dfd4

@ -167,6 +167,7 @@ module psb_c_base_mat_mod
procedure, pass(a) :: fix => psb_c_fix_coo
procedure, pass(a) :: trim => psb_c_coo_trim
procedure, pass(a) :: clean_zeros => psb_c_coo_clean_zeros
procedure, pass(a) :: clean_negidx => psb_c_coo_clean_negidx
procedure, pass(a) :: print => psb_c_coo_print
procedure, pass(a) :: free => c_coo_free
procedure, pass(a) :: mold => psb_c_coo_mold
@ -1328,7 +1329,47 @@ module psb_c_base_mat_mod
integer(psb_ipk_), intent(out) :: info
end subroutine psb_c_coo_clean_zeros
end interface
!
!>
!! \memberof psb_c_coo_sparse_mat
!! \brief Take out any entries with negative row or column index
!! May happen when converting local/global numbering
!! \param info return code
!!
!
interface
subroutine psb_c_coo_clean_negidx(a,info)
import
class(psb_c_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
end subroutine psb_c_coo_clean_negidx
end interface
!
!> Funtion: coo_clean_negidx_inner
!! \brief Take out any entries with negative row or column index
!! Used internally by coo_clean_negidx
!! \param nzin Number of entries on input to be handled
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Coefficients
!! \param nzout Number of entries after sorting/duplicate handling
!! \param info return code
!!
!
interface psb_coo_clean_negidx_inner
subroutine psb_c_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
import
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
complex(psb_spk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
end subroutine psb_c_coo_clean_negidx_inner
end interface psb_coo_clean_negidx_inner
!
!>
!! \memberof psb_c_coo_sparse_mat

@ -167,6 +167,7 @@ module psb_d_base_mat_mod
procedure, pass(a) :: fix => psb_d_fix_coo
procedure, pass(a) :: trim => psb_d_coo_trim
procedure, pass(a) :: clean_zeros => psb_d_coo_clean_zeros
procedure, pass(a) :: clean_negidx => psb_d_coo_clean_negidx
procedure, pass(a) :: print => psb_d_coo_print
procedure, pass(a) :: free => d_coo_free
procedure, pass(a) :: mold => psb_d_coo_mold
@ -1328,7 +1329,47 @@ module psb_d_base_mat_mod
integer(psb_ipk_), intent(out) :: info
end subroutine psb_d_coo_clean_zeros
end interface
!
!>
!! \memberof psb_d_coo_sparse_mat
!! \brief Take out any entries with negative row or column index
!! May happen when converting local/global numbering
!! \param info return code
!!
!
interface
subroutine psb_d_coo_clean_negidx(a,info)
import
class(psb_d_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
end subroutine psb_d_coo_clean_negidx
end interface
!
!> Funtion: coo_clean_negidx_inner
!! \brief Take out any entries with negative row or column index
!! Used internally by coo_clean_negidx
!! \param nzin Number of entries on input to be handled
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Coefficients
!! \param nzout Number of entries after sorting/duplicate handling
!! \param info return code
!!
!
interface psb_coo_clean_negidx_inner
subroutine psb_d_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
import
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
real(psb_dpk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
end subroutine psb_d_coo_clean_negidx_inner
end interface psb_coo_clean_negidx_inner
!
!>
!! \memberof psb_d_coo_sparse_mat

@ -167,6 +167,7 @@ module psb_s_base_mat_mod
procedure, pass(a) :: fix => psb_s_fix_coo
procedure, pass(a) :: trim => psb_s_coo_trim
procedure, pass(a) :: clean_zeros => psb_s_coo_clean_zeros
procedure, pass(a) :: clean_negidx => psb_s_coo_clean_negidx
procedure, pass(a) :: print => psb_s_coo_print
procedure, pass(a) :: free => s_coo_free
procedure, pass(a) :: mold => psb_s_coo_mold
@ -1328,7 +1329,47 @@ module psb_s_base_mat_mod
integer(psb_ipk_), intent(out) :: info
end subroutine psb_s_coo_clean_zeros
end interface
!
!>
!! \memberof psb_s_coo_sparse_mat
!! \brief Take out any entries with negative row or column index
!! May happen when converting local/global numbering
!! \param info return code
!!
!
interface
subroutine psb_s_coo_clean_negidx(a,info)
import
class(psb_s_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
end subroutine psb_s_coo_clean_negidx
end interface
!
!> Funtion: coo_clean_negidx_inner
!! \brief Take out any entries with negative row or column index
!! Used internally by coo_clean_negidx
!! \param nzin Number of entries on input to be handled
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Coefficients
!! \param nzout Number of entries after sorting/duplicate handling
!! \param info return code
!!
!
interface psb_coo_clean_negidx_inner
subroutine psb_s_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
import
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
real(psb_spk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
end subroutine psb_s_coo_clean_negidx_inner
end interface psb_coo_clean_negidx_inner
!
!>
!! \memberof psb_s_coo_sparse_mat

@ -167,6 +167,7 @@ module psb_z_base_mat_mod
procedure, pass(a) :: fix => psb_z_fix_coo
procedure, pass(a) :: trim => psb_z_coo_trim
procedure, pass(a) :: clean_zeros => psb_z_coo_clean_zeros
procedure, pass(a) :: clean_negidx => psb_z_coo_clean_negidx
procedure, pass(a) :: print => psb_z_coo_print
procedure, pass(a) :: free => z_coo_free
procedure, pass(a) :: mold => psb_z_coo_mold
@ -1328,7 +1329,47 @@ module psb_z_base_mat_mod
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_coo_clean_zeros
end interface
!
!>
!! \memberof psb_z_coo_sparse_mat
!! \brief Take out any entries with negative row or column index
!! May happen when converting local/global numbering
!! \param info return code
!!
!
interface
subroutine psb_z_coo_clean_negidx(a,info)
import
class(psb_z_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_coo_clean_negidx
end interface
!
!> Funtion: coo_clean_negidx_inner
!! \brief Take out any entries with negative row or column index
!! Used internally by coo_clean_negidx
!! \param nzin Number of entries on input to be handled
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Coefficients
!! \param nzout Number of entries after sorting/duplicate handling
!! \param info return code
!!
!
interface psb_coo_clean_negidx_inner
subroutine psb_z_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
import
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
complex(psb_dpk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_coo_clean_negidx_inner
end interface psb_coo_clean_negidx_inner
!
!>
!! \memberof psb_z_coo_sparse_mat

@ -354,6 +354,44 @@ subroutine psb_c_coo_clean_zeros(a, info)
end subroutine psb_c_coo_clean_zeros
subroutine psb_c_coo_clean_negidx(a,info)
use psb_error_mod
use psb_c_base_mat_mod, psb_protect_name => psb_c_coo_clean_negidx
implicit none
class(psb_c_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: nz
call psb_coo_clean_negidx_inner(a%get_nzeros(),a%ia,a%ja,a%val,nz,info)
if (info == 0) call a%set_nzeros(nz)
end subroutine psb_c_coo_clean_negidx
subroutine psb_c_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
use psb_error_mod
use psb_c_base_mat_mod, psb_protect_name => psb_c_coo_clean_negidx_inner
implicit none
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
complex(psb_spk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: i
info = 0
nzout = 0
do i=1, nzin
if ((ia(i)>0).and.(ja(i)>0)) then
nzout = nzout + 1
val(nzout) = val(i)
ia(nzout) = ia(i)
ja(nzout) = ja(i)
end if
end do
end subroutine psb_c_coo_clean_negidx_inner
subroutine psb_c_coo_allocate_mnnz(m,n,a,nz)
use psb_c_base_mat_mod, psb_protect_name => psb_c_coo_allocate_mnnz

@ -354,6 +354,44 @@ subroutine psb_d_coo_clean_zeros(a, info)
end subroutine psb_d_coo_clean_zeros
subroutine psb_d_coo_clean_negidx(a,info)
use psb_error_mod
use psb_d_base_mat_mod, psb_protect_name => psb_d_coo_clean_negidx
implicit none
class(psb_d_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: nz
call psb_coo_clean_negidx_inner(a%get_nzeros(),a%ia,a%ja,a%val,nz,info)
if (info == 0) call a%set_nzeros(nz)
end subroutine psb_d_coo_clean_negidx
subroutine psb_d_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
use psb_error_mod
use psb_d_base_mat_mod, psb_protect_name => psb_d_coo_clean_negidx_inner
implicit none
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
real(psb_dpk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: i
info = 0
nzout = 0
do i=1, nzin
if ((ia(i)>0).and.(ja(i)>0)) then
nzout = nzout + 1
val(nzout) = val(i)
ia(nzout) = ia(i)
ja(nzout) = ja(i)
end if
end do
end subroutine psb_d_coo_clean_negidx_inner
subroutine psb_d_coo_allocate_mnnz(m,n,a,nz)
use psb_d_base_mat_mod, psb_protect_name => psb_d_coo_allocate_mnnz

@ -354,6 +354,44 @@ subroutine psb_s_coo_clean_zeros(a, info)
end subroutine psb_s_coo_clean_zeros
subroutine psb_s_coo_clean_negidx(a,info)
use psb_error_mod
use psb_s_base_mat_mod, psb_protect_name => psb_s_coo_clean_negidx
implicit none
class(psb_s_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: nz
call psb_coo_clean_negidx_inner(a%get_nzeros(),a%ia,a%ja,a%val,nz,info)
if (info == 0) call a%set_nzeros(nz)
end subroutine psb_s_coo_clean_negidx
subroutine psb_s_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
use psb_error_mod
use psb_s_base_mat_mod, psb_protect_name => psb_s_coo_clean_negidx_inner
implicit none
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
real(psb_spk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: i
info = 0
nzout = 0
do i=1, nzin
if ((ia(i)>0).and.(ja(i)>0)) then
nzout = nzout + 1
val(nzout) = val(i)
ia(nzout) = ia(i)
ja(nzout) = ja(i)
end if
end do
end subroutine psb_s_coo_clean_negidx_inner
subroutine psb_s_coo_allocate_mnnz(m,n,a,nz)
use psb_s_base_mat_mod, psb_protect_name => psb_s_coo_allocate_mnnz

@ -354,6 +354,44 @@ subroutine psb_z_coo_clean_zeros(a, info)
end subroutine psb_z_coo_clean_zeros
subroutine psb_z_coo_clean_negidx(a,info)
use psb_error_mod
use psb_z_base_mat_mod, psb_protect_name => psb_z_coo_clean_negidx
implicit none
class(psb_z_coo_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: nz
call psb_coo_clean_negidx_inner(a%get_nzeros(),a%ia,a%ja,a%val,nz,info)
if (info == 0) call a%set_nzeros(nz)
end subroutine psb_z_coo_clean_negidx
subroutine psb_z_coo_clean_negidx_inner(nzin,ia,ja,val,nzout,info)
use psb_error_mod
use psb_z_base_mat_mod, psb_protect_name => psb_z_coo_clean_negidx_inner
implicit none
integer(psb_ipk_), intent(in) :: nzin
integer(psb_ipk_), intent(inout) :: ia(:), ja(:)
complex(psb_dpk_), intent(inout) :: val(:)
integer(psb_ipk_), intent(out) :: nzout
integer(psb_ipk_), intent(out) :: info
!
!
integer(psb_ipk_) :: i
info = 0
nzout = 0
do i=1, nzin
if ((ia(i)>0).and.(ja(i)>0)) then
nzout = nzout + 1
val(nzout) = val(i)
ia(nzout) = ia(i)
ja(nzout) = ja(i)
end if
end do
end subroutine psb_z_coo_clean_negidx_inner
subroutine psb_z_coo_allocate_mnnz(m,n,a,nz)
use psb_z_base_mat_mod, psb_protect_name => psb_z_coo_allocate_mnnz

@ -28674,8 +28674,8 @@ endobj
2051 0 obj
<<
/Title (Parallel Sparse BLAS V. 3.6.1) /Subject (Parallel Sparse Basic Linear Algebra Subroutines) /Keywords (Computer Science Linear Algebra Fluid Dynamics Parallel Linux MPI PSBLAS Iterative Solvers Preconditioners) /Creator (pdfLaTeX) /Producer ($Id$) /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.19)/Keywords()
/CreationDate (D:20191220094239Z)
/ModDate (D:20191220094239Z)
/CreationDate (D:20200408100040+02'00')
/ModDate (D:20200408100040+02'00')
/Trapped /False
/PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) kpathsea version 6.3.0)
>>
@ -28947,7 +28947,7 @@ endobj
/W [1 3 1]
/Root 2050 0 R
/Info 2051 0 R
/ID [<4A6A17F0317C1A73C4219CDB7A65A4CA> <4A6A17F0317C1A73C4219CDB7A65A4CA>]
/ID [<2EB8EB7CFE0690298AD950D6924620BC> <2EB8EB7CFE0690298AD950D6924620BC>]
/Length 10265
>>
stream
@ -28985,10 +28985,10 @@ uj
   á ó} Ç#  À!'$ %HQ+( ý)/, #!-30 (¸194 :´578?: O;=>E@ ACDHRKF xGIJQL ŒôMOPXR ¡¼SUVH-W]Y ºkZ\b^ Ï•_aƒƒƒc äуHS Çóƒ ƒ!ƒ"ƒ "\ƒƒƒH,ƒ ƒ
ƒ ƒ ƒ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ(ƒ#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'ÈjH(ØŸH)HXHYHZH[H\H]H^<07> <07>!<07>"<07>#<07>$<07>%<07>&<07>'<07>(<07>)<07>*<07>+<07>,<07>-<07>.<07>/<07>0<07>1<07>2<07>3<07>4<07>5<07>6<07>7<07>8<07>9<07>:<07>;<07><<07>=<07>><07>?<07>@<07>A<07>B<07>C<07>D<07>E<07>F<07>G<07>H<07>I<07>J<07>K<07>L<07>M<07>N<07>O<07>P<07>Q<07>R<07>S<07>T<07>U<07>V<07>W<07>X<07>Y<07>Z<07>[<07>\<07>]<07>^<07>_<07>`<07>a<07>b<07>cÓ¾pÓÓÓÓÓÓÓÓÓ Ó
Ó Ó Ó ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓ Ó!Ó"Ó#Ó$Ó%Ó&Ó'Ó(Ó)Ó*Ó+Ó,Ó-Ó.Ó/¼/àà
endstream
endobj
startxref
1302740
1302752
%%EOF

Loading…
Cancel
Save