mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
Merge branch 'development' into randomized
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
!
|
||||
! We are also introducing the type psb_lbase_sparse_mat.
|
||||
! The basic difference is in the type
|
||||
! of the indices, which are PSB_LPK_ so that the entries
|
||||
! of the indices, which are PSB_PSB_LPK_ so that the entries
|
||||
! are guaranteed to be able to contain global indices.
|
||||
! This type only supports data handling and preprocessing, it is
|
||||
! not supposed to be used for computations.
|
||||
@@ -80,7 +80,7 @@ module psb_base_mat_mod
|
||||
integer(psb_ipk_), parameter :: spspmm_serial_rb_tree = 3
|
||||
integer(psb_ipk_), parameter :: spspmm_omp_rb_tree = 4
|
||||
integer(psb_ipk_), parameter :: spspmm_omp_two_pass = 5
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
integer(psb_ipk_), save :: spspmm_impl = spspmm_omp_gustavson
|
||||
#else
|
||||
integer(psb_ipk_), save :: spspmm_impl = spspmm_serial
|
||||
@@ -564,7 +564,7 @@ module psb_base_mat_mod
|
||||
! == = =================================
|
||||
procedure, pass(a) :: set_lnrows => psb_lbase_set_lnrows
|
||||
procedure, pass(a) :: set_lncols => psb_lbase_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: set_inrows => psb_lbase_set_inrows
|
||||
procedure, pass(a) :: set_incols => psb_lbase_set_incols
|
||||
generic, public :: set_nrows => set_lnrows, set_inrows
|
||||
@@ -601,7 +601,7 @@ module psb_base_mat_mod
|
||||
procedure, pass(a) :: reinit => psb_lbase_reinit
|
||||
procedure, pass(a) :: allocate_mnnz => psb_lbase_allocate_mnnz
|
||||
procedure, pass(a) :: reallocate_nz => psb_lbase_reallocate_nz
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: allocate_imnnz => psb_lbase_allocate_imnnz
|
||||
procedure, pass(a) :: reallocate_inz => psb_lbase_reallocate_inz
|
||||
generic, public :: allocate => allocate_mnnz, allocate_imnnz
|
||||
@@ -1433,7 +1433,7 @@ contains
|
||||
a%n = n
|
||||
end subroutine psb_lbase_set_lncols
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_lbase_allocate_imnnz(m,n,a,nz)
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m,n
|
||||
|
||||
@@ -416,7 +416,7 @@ module psb_c_base_mat_mod
|
||||
!
|
||||
! This is COO specific
|
||||
!
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: iset_nzeros => lc_coo_iset_nzeros
|
||||
procedure, pass(a) :: lset_nzeros => lc_coo_lset_nzeros
|
||||
generic, public :: set_nzeros => iset_nzeros, lset_nzeros
|
||||
@@ -439,7 +439,7 @@ module psb_c_base_mat_mod
|
||||
private :: lc_coo_get_nzeros, lc_coo_iset_nzeros, &
|
||||
& lc_coo_get_fmt, lc_coo_free, lc_coo_sizeof, &
|
||||
& lc_coo_transp_1mat, lc_coo_transc_1mat
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
private :: lc_coo_lset_nzeros
|
||||
#endif
|
||||
|
||||
@@ -3499,7 +3499,7 @@ module psb_c_base_mat_mod
|
||||
end subroutine psb_lc_coo_clean_negidx
|
||||
end interface
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!
|
||||
!> Funtion: coo_clean_negidx_inner
|
||||
!! \brief Take out any entries with negative row or column index
|
||||
@@ -4323,7 +4323,7 @@ contains
|
||||
|
||||
end subroutine lc_coo_iset_nzeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine lc_coo_lset_nzeros(nz,a)
|
||||
implicit none
|
||||
integer(psb_lpk_), intent(in) :: nz
|
||||
|
||||
@@ -276,7 +276,7 @@ contains
|
||||
call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld')
|
||||
return
|
||||
end if
|
||||
#if defined (OPENMP)
|
||||
#if defined (PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, size(this)
|
||||
x%v(i) = this(i)
|
||||
@@ -841,7 +841,7 @@ contains
|
||||
if (present(last)) last_ = min(last,last_)
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val
|
||||
@@ -879,7 +879,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val(i-first_+1)
|
||||
@@ -928,7 +928,7 @@ contains
|
||||
|
||||
if (allocated(x%v)) then
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1, size(x%v)
|
||||
x%v(i) = abs(x%v(i))
|
||||
@@ -1735,7 +1735,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (allocated(x%v)) then
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1,size(x%v)
|
||||
x%v(i) = alpha*x%v(i)
|
||||
@@ -1779,7 +1779,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res = szero
|
||||
!$omp parallel do private(i) reduction(max: res)
|
||||
do i=1, n
|
||||
@@ -1804,7 +1804,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res=szero
|
||||
!$omp parallel do private(i) reduction(+: res)
|
||||
do i= 1, size(x%v)
|
||||
@@ -2019,7 +2019,7 @@ contains
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
if (z%is_dev()) call z%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
n = size(x)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, n
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
!
|
||||
! We are also introducing the type psb_lcspmat_type.
|
||||
! The basic difference with psb_cspmat_type is in the type
|
||||
! of the indices, which are PSB_LPK_ so that the entries
|
||||
! of the indices, which are PSB_PSB_LPK_ so that the entries
|
||||
! are guaranteed to be able to contain global indices.
|
||||
! This type only supports data handling and preprocessing, it is
|
||||
! not supposed to be used for computations.
|
||||
@@ -145,7 +145,7 @@ module psb_c_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_c_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_c_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: lcsgetptn => psb_c_lcsgetptn
|
||||
procedure, pass(a) :: lcsgetrow => psb_c_lcsgetrow
|
||||
generic, public :: csget => lcsgetptn, lcsgetrow
|
||||
@@ -311,7 +311,7 @@ module psb_c_mat_mod
|
||||
! Setters
|
||||
procedure, pass(a) :: set_lnrows => psb_lc_set_lnrows
|
||||
procedure, pass(a) :: set_lncols => psb_lc_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: set_inrows => psb_lc_set_inrows
|
||||
procedure, pass(a) :: set_incols => psb_lc_set_incols
|
||||
generic, public :: set_nrows => set_inrows, set_lnrows
|
||||
@@ -346,7 +346,7 @@ module psb_c_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_lc_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_lc_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ procedure, pass(a) :: icsgetptn => psb_lc_icsgetptn
|
||||
!!$ procedure, pass(a) :: icsgetrow => psb_lc_icsgetrow
|
||||
!!$ generic, public :: csget => icsgetptn, icsgetrow
|
||||
@@ -1270,7 +1270,7 @@ module psb_c_mat_mod
|
||||
class(psb_lcspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: m
|
||||
end subroutine psb_lc_set_lnrows
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_lc_set_inrows(m,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
|
||||
class(psb_lcspmat_type), intent(inout) :: a
|
||||
@@ -1285,7 +1285,7 @@ module psb_c_mat_mod
|
||||
class(psb_lcspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: n
|
||||
end subroutine psb_lc_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_lc_set_incols(n,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
|
||||
class(psb_lcspmat_type), intent(inout) :: a
|
||||
@@ -2410,7 +2410,7 @@ contains
|
||||
|
||||
end subroutine psb_c_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_c_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
implicit none
|
||||
@@ -2929,7 +2929,7 @@ contains
|
||||
|
||||
end subroutine psb_lc_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ subroutine psb_lc_icsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
!!$ & jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
!!$ implicit none
|
||||
|
||||
@@ -416,7 +416,7 @@ module psb_d_base_mat_mod
|
||||
!
|
||||
! This is COO specific
|
||||
!
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: iset_nzeros => ld_coo_iset_nzeros
|
||||
procedure, pass(a) :: lset_nzeros => ld_coo_lset_nzeros
|
||||
generic, public :: set_nzeros => iset_nzeros, lset_nzeros
|
||||
@@ -439,7 +439,7 @@ module psb_d_base_mat_mod
|
||||
private :: ld_coo_get_nzeros, ld_coo_iset_nzeros, &
|
||||
& ld_coo_get_fmt, ld_coo_free, ld_coo_sizeof, &
|
||||
& ld_coo_transp_1mat, ld_coo_transc_1mat
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
private :: ld_coo_lset_nzeros
|
||||
#endif
|
||||
|
||||
@@ -3499,7 +3499,7 @@ module psb_d_base_mat_mod
|
||||
end subroutine psb_ld_coo_clean_negidx
|
||||
end interface
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!
|
||||
!> Funtion: coo_clean_negidx_inner
|
||||
!! \brief Take out any entries with negative row or column index
|
||||
@@ -4323,7 +4323,7 @@ contains
|
||||
|
||||
end subroutine ld_coo_iset_nzeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine ld_coo_lset_nzeros(nz,a)
|
||||
implicit none
|
||||
integer(psb_lpk_), intent(in) :: nz
|
||||
|
||||
@@ -284,7 +284,7 @@ contains
|
||||
call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld')
|
||||
return
|
||||
end if
|
||||
#if defined (OPENMP)
|
||||
#if defined (PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, size(this)
|
||||
x%v(i) = this(i)
|
||||
@@ -849,7 +849,7 @@ contains
|
||||
if (present(last)) last_ = min(last,last_)
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val
|
||||
@@ -887,7 +887,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val(i-first_+1)
|
||||
@@ -936,7 +936,7 @@ contains
|
||||
|
||||
if (allocated(x%v)) then
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1, size(x%v)
|
||||
x%v(i) = abs(x%v(i))
|
||||
@@ -1771,7 +1771,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (allocated(x%v)) then
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1,size(x%v)
|
||||
x%v(i) = alpha*x%v(i)
|
||||
@@ -1815,7 +1815,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res = dzero
|
||||
!$omp parallel do private(i) reduction(max: res)
|
||||
do i=1, n
|
||||
@@ -1839,7 +1839,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res = HUGE(done)
|
||||
!$omp parallel do private(i) reduction(min: res)
|
||||
do i=1, n
|
||||
@@ -1920,7 +1920,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res=dzero
|
||||
!$omp parallel do private(i) reduction(+: res)
|
||||
do i= 1, size(x%v)
|
||||
@@ -2227,7 +2227,7 @@ contains
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
if (z%is_dev()) call z%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
n = size(x)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, n
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
!
|
||||
! We are also introducing the type psb_ldspmat_type.
|
||||
! The basic difference with psb_dspmat_type is in the type
|
||||
! of the indices, which are PSB_LPK_ so that the entries
|
||||
! of the indices, which are PSB_PSB_LPK_ so that the entries
|
||||
! are guaranteed to be able to contain global indices.
|
||||
! This type only supports data handling and preprocessing, it is
|
||||
! not supposed to be used for computations.
|
||||
@@ -145,7 +145,7 @@ module psb_d_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_d_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_d_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: lcsgetptn => psb_d_lcsgetptn
|
||||
procedure, pass(a) :: lcsgetrow => psb_d_lcsgetrow
|
||||
generic, public :: csget => lcsgetptn, lcsgetrow
|
||||
@@ -311,7 +311,7 @@ module psb_d_mat_mod
|
||||
! Setters
|
||||
procedure, pass(a) :: set_lnrows => psb_ld_set_lnrows
|
||||
procedure, pass(a) :: set_lncols => psb_ld_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: set_inrows => psb_ld_set_inrows
|
||||
procedure, pass(a) :: set_incols => psb_ld_set_incols
|
||||
generic, public :: set_nrows => set_inrows, set_lnrows
|
||||
@@ -346,7 +346,7 @@ module psb_d_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_ld_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_ld_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ procedure, pass(a) :: icsgetptn => psb_ld_icsgetptn
|
||||
!!$ procedure, pass(a) :: icsgetrow => psb_ld_icsgetrow
|
||||
!!$ generic, public :: csget => icsgetptn, icsgetrow
|
||||
@@ -1270,7 +1270,7 @@ module psb_d_mat_mod
|
||||
class(psb_ldspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: m
|
||||
end subroutine psb_ld_set_lnrows
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_ld_set_inrows(m,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
|
||||
class(psb_ldspmat_type), intent(inout) :: a
|
||||
@@ -1285,7 +1285,7 @@ module psb_d_mat_mod
|
||||
class(psb_ldspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: n
|
||||
end subroutine psb_ld_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_ld_set_incols(n,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
|
||||
class(psb_ldspmat_type), intent(inout) :: a
|
||||
@@ -2410,7 +2410,7 @@ contains
|
||||
|
||||
end subroutine psb_d_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_d_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
implicit none
|
||||
@@ -2929,7 +2929,7 @@ contains
|
||||
|
||||
end subroutine psb_ld_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ subroutine psb_ld_icsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
!!$ & jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
!!$ implicit none
|
||||
|
||||
@@ -209,7 +209,7 @@ contains
|
||||
call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld')
|
||||
return
|
||||
end if
|
||||
#if defined (OPENMP)
|
||||
#if defined (PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, size(this)
|
||||
x%v(i) = this(i)
|
||||
@@ -774,7 +774,7 @@ contains
|
||||
if (present(last)) last_ = min(last,last_)
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val
|
||||
@@ -812,7 +812,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val(i-first_+1)
|
||||
|
||||
@@ -210,7 +210,7 @@ contains
|
||||
call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld')
|
||||
return
|
||||
end if
|
||||
#if defined (OPENMP)
|
||||
#if defined (PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, size(this)
|
||||
x%v(i) = this(i)
|
||||
@@ -775,7 +775,7 @@ contains
|
||||
if (present(last)) last_ = min(last,last_)
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val
|
||||
@@ -813,7 +813,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val(i-first_+1)
|
||||
|
||||
@@ -416,7 +416,7 @@ module psb_s_base_mat_mod
|
||||
!
|
||||
! This is COO specific
|
||||
!
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: iset_nzeros => ls_coo_iset_nzeros
|
||||
procedure, pass(a) :: lset_nzeros => ls_coo_lset_nzeros
|
||||
generic, public :: set_nzeros => iset_nzeros, lset_nzeros
|
||||
@@ -439,7 +439,7 @@ module psb_s_base_mat_mod
|
||||
private :: ls_coo_get_nzeros, ls_coo_iset_nzeros, &
|
||||
& ls_coo_get_fmt, ls_coo_free, ls_coo_sizeof, &
|
||||
& ls_coo_transp_1mat, ls_coo_transc_1mat
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
private :: ls_coo_lset_nzeros
|
||||
#endif
|
||||
|
||||
@@ -3499,7 +3499,7 @@ module psb_s_base_mat_mod
|
||||
end subroutine psb_ls_coo_clean_negidx
|
||||
end interface
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!
|
||||
!> Funtion: coo_clean_negidx_inner
|
||||
!! \brief Take out any entries with negative row or column index
|
||||
@@ -4323,7 +4323,7 @@ contains
|
||||
|
||||
end subroutine ls_coo_iset_nzeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine ls_coo_lset_nzeros(nz,a)
|
||||
implicit none
|
||||
integer(psb_lpk_), intent(in) :: nz
|
||||
|
||||
@@ -283,7 +283,7 @@ contains
|
||||
call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld')
|
||||
return
|
||||
end if
|
||||
#if defined (OPENMP)
|
||||
#if defined (PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, size(this)
|
||||
x%v(i) = this(i)
|
||||
@@ -848,7 +848,7 @@ contains
|
||||
if (present(last)) last_ = min(last,last_)
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val
|
||||
@@ -886,7 +886,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val(i-first_+1)
|
||||
@@ -935,7 +935,7 @@ contains
|
||||
|
||||
if (allocated(x%v)) then
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1, size(x%v)
|
||||
x%v(i) = abs(x%v(i))
|
||||
@@ -1742,7 +1742,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (allocated(x%v)) then
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1,size(x%v)
|
||||
x%v(i) = alpha*x%v(i)
|
||||
@@ -1786,7 +1786,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res = szero
|
||||
!$omp parallel do private(i) reduction(max: res)
|
||||
do i=1, n
|
||||
@@ -1810,7 +1810,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res = HUGE(sone)
|
||||
!$omp parallel do private(i) reduction(min: res)
|
||||
do i=1, n
|
||||
@@ -1891,7 +1891,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res=szero
|
||||
!$omp parallel do private(i) reduction(+: res)
|
||||
do i= 1, size(x%v)
|
||||
@@ -2198,7 +2198,7 @@ contains
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
if (z%is_dev()) call z%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
n = size(x)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, n
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
!
|
||||
! We are also introducing the type psb_lsspmat_type.
|
||||
! The basic difference with psb_sspmat_type is in the type
|
||||
! of the indices, which are PSB_LPK_ so that the entries
|
||||
! of the indices, which are PSB_PSB_LPK_ so that the entries
|
||||
! are guaranteed to be able to contain global indices.
|
||||
! This type only supports data handling and preprocessing, it is
|
||||
! not supposed to be used for computations.
|
||||
@@ -145,7 +145,7 @@ module psb_s_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_s_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_s_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: lcsgetptn => psb_s_lcsgetptn
|
||||
procedure, pass(a) :: lcsgetrow => psb_s_lcsgetrow
|
||||
generic, public :: csget => lcsgetptn, lcsgetrow
|
||||
@@ -311,7 +311,7 @@ module psb_s_mat_mod
|
||||
! Setters
|
||||
procedure, pass(a) :: set_lnrows => psb_ls_set_lnrows
|
||||
procedure, pass(a) :: set_lncols => psb_ls_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: set_inrows => psb_ls_set_inrows
|
||||
procedure, pass(a) :: set_incols => psb_ls_set_incols
|
||||
generic, public :: set_nrows => set_inrows, set_lnrows
|
||||
@@ -346,7 +346,7 @@ module psb_s_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_ls_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_ls_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ procedure, pass(a) :: icsgetptn => psb_ls_icsgetptn
|
||||
!!$ procedure, pass(a) :: icsgetrow => psb_ls_icsgetrow
|
||||
!!$ generic, public :: csget => icsgetptn, icsgetrow
|
||||
@@ -1270,7 +1270,7 @@ module psb_s_mat_mod
|
||||
class(psb_lsspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: m
|
||||
end subroutine psb_ls_set_lnrows
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_ls_set_inrows(m,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
|
||||
class(psb_lsspmat_type), intent(inout) :: a
|
||||
@@ -1285,7 +1285,7 @@ module psb_s_mat_mod
|
||||
class(psb_lsspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: n
|
||||
end subroutine psb_ls_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_ls_set_incols(n,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
|
||||
class(psb_lsspmat_type), intent(inout) :: a
|
||||
@@ -2410,7 +2410,7 @@ contains
|
||||
|
||||
end subroutine psb_s_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_s_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
implicit none
|
||||
@@ -2929,7 +2929,7 @@ contains
|
||||
|
||||
end subroutine psb_ls_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ subroutine psb_ls_icsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
!!$ & jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
!!$ implicit none
|
||||
|
||||
@@ -416,7 +416,7 @@ module psb_z_base_mat_mod
|
||||
!
|
||||
! This is COO specific
|
||||
!
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: iset_nzeros => lz_coo_iset_nzeros
|
||||
procedure, pass(a) :: lset_nzeros => lz_coo_lset_nzeros
|
||||
generic, public :: set_nzeros => iset_nzeros, lset_nzeros
|
||||
@@ -439,7 +439,7 @@ module psb_z_base_mat_mod
|
||||
private :: lz_coo_get_nzeros, lz_coo_iset_nzeros, &
|
||||
& lz_coo_get_fmt, lz_coo_free, lz_coo_sizeof, &
|
||||
& lz_coo_transp_1mat, lz_coo_transc_1mat
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
private :: lz_coo_lset_nzeros
|
||||
#endif
|
||||
|
||||
@@ -3499,7 +3499,7 @@ module psb_z_base_mat_mod
|
||||
end subroutine psb_lz_coo_clean_negidx
|
||||
end interface
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!
|
||||
!> Funtion: coo_clean_negidx_inner
|
||||
!! \brief Take out any entries with negative row or column index
|
||||
@@ -4323,7 +4323,7 @@ contains
|
||||
|
||||
end subroutine lz_coo_iset_nzeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine lz_coo_lset_nzeros(nz,a)
|
||||
implicit none
|
||||
integer(psb_lpk_), intent(in) :: nz
|
||||
|
||||
@@ -276,7 +276,7 @@ contains
|
||||
call psb_errpush(psb_err_alloc_dealloc_,'base_vect_bld')
|
||||
return
|
||||
end if
|
||||
#if defined (OPENMP)
|
||||
#if defined (PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, size(this)
|
||||
x%v(i) = this(i)
|
||||
@@ -841,7 +841,7 @@ contains
|
||||
if (present(last)) last_ = min(last,last_)
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val
|
||||
@@ -879,7 +879,7 @@ contains
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i = first_, last_
|
||||
x%v(i) = val(i-first_+1)
|
||||
@@ -928,7 +928,7 @@ contains
|
||||
|
||||
if (allocated(x%v)) then
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1, size(x%v)
|
||||
x%v(i) = abs(x%v(i))
|
||||
@@ -1735,7 +1735,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (allocated(x%v)) then
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
!$omp parallel do private(i)
|
||||
do i=1,size(x%v)
|
||||
x%v(i) = alpha*x%v(i)
|
||||
@@ -1779,7 +1779,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res = dzero
|
||||
!$omp parallel do private(i) reduction(max: res)
|
||||
do i=1, n
|
||||
@@ -1804,7 +1804,7 @@ contains
|
||||
integer(psb_ipk_) :: i
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
res=dzero
|
||||
!$omp parallel do private(i) reduction(+: res)
|
||||
do i= 1, size(x%v)
|
||||
@@ -2019,7 +2019,7 @@ contains
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
if (z%is_dev()) call z%sync()
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
n = size(x)
|
||||
!$omp parallel do private(i)
|
||||
do i = 1, n
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
!
|
||||
! We are also introducing the type psb_lzspmat_type.
|
||||
! The basic difference with psb_zspmat_type is in the type
|
||||
! of the indices, which are PSB_LPK_ so that the entries
|
||||
! of the indices, which are PSB_PSB_LPK_ so that the entries
|
||||
! are guaranteed to be able to contain global indices.
|
||||
! This type only supports data handling and preprocessing, it is
|
||||
! not supposed to be used for computations.
|
||||
@@ -145,7 +145,7 @@ module psb_z_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_z_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_z_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: lcsgetptn => psb_z_lcsgetptn
|
||||
procedure, pass(a) :: lcsgetrow => psb_z_lcsgetrow
|
||||
generic, public :: csget => lcsgetptn, lcsgetrow
|
||||
@@ -311,7 +311,7 @@ module psb_z_mat_mod
|
||||
! Setters
|
||||
procedure, pass(a) :: set_lnrows => psb_lz_set_lnrows
|
||||
procedure, pass(a) :: set_lncols => psb_lz_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
procedure, pass(a) :: set_inrows => psb_lz_set_inrows
|
||||
procedure, pass(a) :: set_incols => psb_lz_set_incols
|
||||
generic, public :: set_nrows => set_inrows, set_lnrows
|
||||
@@ -346,7 +346,7 @@ module psb_z_mat_mod
|
||||
procedure, pass(a) :: csgetrow => psb_lz_csgetrow
|
||||
procedure, pass(a) :: csgetblk => psb_lz_csgetblk
|
||||
generic, public :: csget => csgetptn, csgetrow, csgetblk
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ procedure, pass(a) :: icsgetptn => psb_lz_icsgetptn
|
||||
!!$ procedure, pass(a) :: icsgetrow => psb_lz_icsgetrow
|
||||
!!$ generic, public :: csget => icsgetptn, icsgetrow
|
||||
@@ -1270,7 +1270,7 @@ module psb_z_mat_mod
|
||||
class(psb_lzspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: m
|
||||
end subroutine psb_lz_set_lnrows
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_lz_set_inrows(m,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
|
||||
class(psb_lzspmat_type), intent(inout) :: a
|
||||
@@ -1285,7 +1285,7 @@ module psb_z_mat_mod
|
||||
class(psb_lzspmat_type), intent(inout) :: a
|
||||
integer(psb_lpk_), intent(in) :: n
|
||||
end subroutine psb_lz_set_lncols
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_lz_set_incols(n,a)
|
||||
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
|
||||
class(psb_lzspmat_type), intent(inout) :: a
|
||||
@@ -2410,7 +2410,7 @@ contains
|
||||
|
||||
end subroutine psb_z_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
subroutine psb_z_lcsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
implicit none
|
||||
@@ -2929,7 +2929,7 @@ contains
|
||||
|
||||
end subroutine psb_lz_clean_zeros
|
||||
|
||||
#if defined(IPK4) && defined(LPK8)
|
||||
#if defined(PSB_IPK4) && defined(PSB_LPK8)
|
||||
!!$ subroutine psb_lz_icsgetptn(imin,imax,a,nz,ia,ja,info,&
|
||||
!!$ & jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
!!$ implicit none
|
||||
|
||||
Reference in New Issue
Block a user