New methods for LX%set_nrows with IPK/LPK

merge-paraggr
Salvatore Filippone 5 years ago
parent 570c60bf98
commit 319d2831b7

@ -549,8 +549,17 @@ module psb_base_mat_mod
! Setters
!
! == = =================================
procedure, pass(a) :: set_nrows => psb_lbase_set_nrows
procedure, pass(a) :: set_ncols => psb_lbase_set_ncols
procedure, pass(a) :: set_lnrows => psb_lbase_set_lnrows
procedure, pass(a) :: set_lncols => psb_lbase_set_lncols
#if defined(IPK4) && defined(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
generic, public :: set_ncols => set_lncols, set_incols
#else
generic, public :: set_nrows => set_lnrows
generic, public :: set_ncols => set_lncols
#endif
procedure, pass(a) :: set_dupl => psb_lbase_set_dupl
procedure, pass(a) :: set_state => psb_lbase_set_state
procedure, pass(a) :: set_null => psb_lbase_set_null
@ -1389,20 +1398,37 @@ contains
res = a%n
end function psb_lbase_get_ncols
subroutine psb_lbase_set_nrows(m,a)
subroutine psb_lbase_set_lnrows(m,a)
implicit none
class(psb_lbase_sparse_mat), intent(inout) :: a
integer(psb_lpk_), intent(in) :: m
a%m = m
end subroutine psb_lbase_set_nrows
end subroutine psb_lbase_set_lnrows
subroutine psb_lbase_set_ncols(n,a)
subroutine psb_lbase_set_lncols(n,a)
implicit none
class(psb_lbase_sparse_mat), intent(inout) :: a
integer(psb_lpk_), intent(in) :: n
a%n = n
end subroutine psb_lbase_set_ncols
end subroutine psb_lbase_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_lbase_set_inrows(m,a)
implicit none
class(psb_lbase_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
! This cannot overflow, since ipk_ <= lpk_
a%m = m
end subroutine psb_lbase_set_inrows
subroutine psb_lbase_set_incols(n,a)
implicit none
class(psb_lbase_sparse_mat), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
! This cannot overflow, since ipk_ <= lpk_
a%n = n
end subroutine psb_lbase_set_incols
#endif
subroutine psb_lbase_set_state(n,a)
implicit none

@ -293,8 +293,18 @@ module psb_c_mat_mod
procedure, pass(a) :: sizeof => psb_lc_sizeof
! Setters
procedure, pass(a) :: set_nrows => psb_lc_set_nrows
procedure, pass(a) :: set_ncols => psb_lc_set_ncols
procedure, pass(a) :: set_lnrows => psb_lc_set_lnrows
procedure, pass(a) :: set_lncols => psb_lc_set_lncols
#if defined(IPK4) && defined(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
generic, public :: set_ncols => set_incols, set_lncols
#else
generic, public :: set_nrows => set_lnrows
generic, public :: set_ncols => set_lncols
#endif
procedure, pass(a) :: set_dupl => psb_lc_set_dupl
procedure, pass(a) :: set_null => psb_lc_set_null
procedure, pass(a) :: set_bld => psb_lc_set_bld
@ -1163,19 +1173,33 @@ module psb_c_mat_mod
interface
subroutine psb_lc_set_nrows(m,a)
subroutine psb_lc_set_lnrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
class(psb_lcspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: m
end subroutine psb_lc_set_nrows
end subroutine psb_lc_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_lc_set_inrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
class(psb_lcspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
end subroutine psb_lc_set_inrows
#endif
end interface
interface
subroutine psb_lc_set_ncols(n,a)
subroutine psb_lc_set_lncols(n,a)
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
class(psb_lcspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: n
end subroutine psb_lc_set_ncols
end subroutine psb_lc_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_lc_set_incols(n,a)
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
class(psb_lcspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
end subroutine psb_lc_set_incols
#endif
end interface
interface

@ -293,8 +293,18 @@ module psb_d_mat_mod
procedure, pass(a) :: sizeof => psb_ld_sizeof
! Setters
procedure, pass(a) :: set_nrows => psb_ld_set_nrows
procedure, pass(a) :: set_ncols => psb_ld_set_ncols
procedure, pass(a) :: set_lnrows => psb_ld_set_lnrows
procedure, pass(a) :: set_lncols => psb_ld_set_lncols
#if defined(IPK4) && defined(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
generic, public :: set_ncols => set_incols, set_lncols
#else
generic, public :: set_nrows => set_lnrows
generic, public :: set_ncols => set_lncols
#endif
procedure, pass(a) :: set_dupl => psb_ld_set_dupl
procedure, pass(a) :: set_null => psb_ld_set_null
procedure, pass(a) :: set_bld => psb_ld_set_bld
@ -1163,19 +1173,33 @@ module psb_d_mat_mod
interface
subroutine psb_ld_set_nrows(m,a)
subroutine psb_ld_set_lnrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
class(psb_ldspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: m
end subroutine psb_ld_set_nrows
end subroutine psb_ld_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_ld_set_inrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
class(psb_ldspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
end subroutine psb_ld_set_inrows
#endif
end interface
interface
subroutine psb_ld_set_ncols(n,a)
subroutine psb_ld_set_lncols(n,a)
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
class(psb_ldspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: n
end subroutine psb_ld_set_ncols
end subroutine psb_ld_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_ld_set_incols(n,a)
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
class(psb_ldspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
end subroutine psb_ld_set_incols
#endif
end interface
interface

@ -293,8 +293,18 @@ module psb_s_mat_mod
procedure, pass(a) :: sizeof => psb_ls_sizeof
! Setters
procedure, pass(a) :: set_nrows => psb_ls_set_nrows
procedure, pass(a) :: set_ncols => psb_ls_set_ncols
procedure, pass(a) :: set_lnrows => psb_ls_set_lnrows
procedure, pass(a) :: set_lncols => psb_ls_set_lncols
#if defined(IPK4) && defined(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
generic, public :: set_ncols => set_incols, set_lncols
#else
generic, public :: set_nrows => set_lnrows
generic, public :: set_ncols => set_lncols
#endif
procedure, pass(a) :: set_dupl => psb_ls_set_dupl
procedure, pass(a) :: set_null => psb_ls_set_null
procedure, pass(a) :: set_bld => psb_ls_set_bld
@ -1163,19 +1173,33 @@ module psb_s_mat_mod
interface
subroutine psb_ls_set_nrows(m,a)
subroutine psb_ls_set_lnrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
class(psb_lsspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: m
end subroutine psb_ls_set_nrows
end subroutine psb_ls_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_ls_set_inrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
class(psb_lsspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
end subroutine psb_ls_set_inrows
#endif
end interface
interface
subroutine psb_ls_set_ncols(n,a)
subroutine psb_ls_set_lncols(n,a)
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
class(psb_lsspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: n
end subroutine psb_ls_set_ncols
end subroutine psb_ls_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_ls_set_incols(n,a)
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
class(psb_lsspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
end subroutine psb_ls_set_incols
#endif
end interface
interface

@ -293,8 +293,18 @@ module psb_z_mat_mod
procedure, pass(a) :: sizeof => psb_lz_sizeof
! Setters
procedure, pass(a) :: set_nrows => psb_lz_set_nrows
procedure, pass(a) :: set_ncols => psb_lz_set_ncols
procedure, pass(a) :: set_lnrows => psb_lz_set_lnrows
procedure, pass(a) :: set_lncols => psb_lz_set_lncols
#if defined(IPK4) && defined(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
generic, public :: set_ncols => set_incols, set_lncols
#else
generic, public :: set_nrows => set_lnrows
generic, public :: set_ncols => set_lncols
#endif
procedure, pass(a) :: set_dupl => psb_lz_set_dupl
procedure, pass(a) :: set_null => psb_lz_set_null
procedure, pass(a) :: set_bld => psb_lz_set_bld
@ -1163,19 +1173,33 @@ module psb_z_mat_mod
interface
subroutine psb_lz_set_nrows(m,a)
subroutine psb_lz_set_lnrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
class(psb_lzspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: m
end subroutine psb_lz_set_nrows
end subroutine psb_lz_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_lz_set_inrows(m,a)
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
class(psb_lzspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
end subroutine psb_lz_set_inrows
#endif
end interface
interface
subroutine psb_lz_set_ncols(n,a)
subroutine psb_lz_set_lncols(n,a)
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
class(psb_lzspmat_type), intent(inout) :: a
integer(psb_lpk_), intent(in) :: n
end subroutine psb_lz_set_ncols
end subroutine psb_lz_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_lz_set_incols(n,a)
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
class(psb_lzspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
end subroutine psb_lz_set_incols
#endif
end interface
interface

@ -2603,8 +2603,8 @@ end subroutine psb_c_cp_to_l
!
subroutine psb_lc_set_nrows(m,a)
use psb_c_mat_mod, psb_protect_name => psb_lc_set_nrows
subroutine psb_lc_set_lnrows(m,a)
use psb_c_mat_mod, psb_protect_name => psb_lc_set_lnrows
use psb_error_mod
implicit none
class(psb_lcspmat_type), intent(inout) :: a
@ -2629,11 +2629,40 @@ subroutine psb_lc_set_nrows(m,a)
return
end subroutine psb_lc_set_nrows
end subroutine psb_lc_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_lc_set_inrows(m,a)
use psb_c_mat_mod, psb_protect_name => psb_lc_set_inrows
use psb_error_mod
implicit none
class(psb_lcspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='set_nrows'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_nrows(m)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_lc_set_inrows
#endif
subroutine psb_lc_set_ncols(n,a)
use psb_c_mat_mod, psb_protect_name => psb_lc_set_ncols
subroutine psb_lc_set_lncols(n,a)
use psb_c_mat_mod, psb_protect_name => psb_lc_set_lncols
use psb_error_mod
implicit none
class(psb_lcspmat_type), intent(inout) :: a
@ -2657,9 +2686,37 @@ subroutine psb_lc_set_ncols(n,a)
return
end subroutine psb_lc_set_ncols
end subroutine psb_lc_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_lc_set_incols(n,a)
use psb_c_mat_mod, psb_protect_name => psb_lc_set_incols
use psb_error_mod
implicit none
class(psb_lcspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_ncols(n)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_lc_set_incols
#endif
!
! Valid values for DUPL:

@ -2603,8 +2603,8 @@ end subroutine psb_d_cp_to_l
!
subroutine psb_ld_set_nrows(m,a)
use psb_d_mat_mod, psb_protect_name => psb_ld_set_nrows
subroutine psb_ld_set_lnrows(m,a)
use psb_d_mat_mod, psb_protect_name => psb_ld_set_lnrows
use psb_error_mod
implicit none
class(psb_ldspmat_type), intent(inout) :: a
@ -2629,11 +2629,40 @@ subroutine psb_ld_set_nrows(m,a)
return
end subroutine psb_ld_set_nrows
end subroutine psb_ld_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_ld_set_inrows(m,a)
use psb_d_mat_mod, psb_protect_name => psb_ld_set_inrows
use psb_error_mod
implicit none
class(psb_ldspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='set_nrows'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_nrows(m)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_ld_set_inrows
#endif
subroutine psb_ld_set_ncols(n,a)
use psb_d_mat_mod, psb_protect_name => psb_ld_set_ncols
subroutine psb_ld_set_lncols(n,a)
use psb_d_mat_mod, psb_protect_name => psb_ld_set_lncols
use psb_error_mod
implicit none
class(psb_ldspmat_type), intent(inout) :: a
@ -2657,9 +2686,37 @@ subroutine psb_ld_set_ncols(n,a)
return
end subroutine psb_ld_set_ncols
end subroutine psb_ld_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_ld_set_incols(n,a)
use psb_d_mat_mod, psb_protect_name => psb_ld_set_incols
use psb_error_mod
implicit none
class(psb_ldspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_ncols(n)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_ld_set_incols
#endif
!
! Valid values for DUPL:

@ -2603,8 +2603,8 @@ end subroutine psb_s_cp_to_l
!
subroutine psb_ls_set_nrows(m,a)
use psb_s_mat_mod, psb_protect_name => psb_ls_set_nrows
subroutine psb_ls_set_lnrows(m,a)
use psb_s_mat_mod, psb_protect_name => psb_ls_set_lnrows
use psb_error_mod
implicit none
class(psb_lsspmat_type), intent(inout) :: a
@ -2629,11 +2629,40 @@ subroutine psb_ls_set_nrows(m,a)
return
end subroutine psb_ls_set_nrows
end subroutine psb_ls_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_ls_set_inrows(m,a)
use psb_s_mat_mod, psb_protect_name => psb_ls_set_inrows
use psb_error_mod
implicit none
class(psb_lsspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='set_nrows'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_nrows(m)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_ls_set_inrows
#endif
subroutine psb_ls_set_ncols(n,a)
use psb_s_mat_mod, psb_protect_name => psb_ls_set_ncols
subroutine psb_ls_set_lncols(n,a)
use psb_s_mat_mod, psb_protect_name => psb_ls_set_lncols
use psb_error_mod
implicit none
class(psb_lsspmat_type), intent(inout) :: a
@ -2657,9 +2686,37 @@ subroutine psb_ls_set_ncols(n,a)
return
end subroutine psb_ls_set_ncols
end subroutine psb_ls_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_ls_set_incols(n,a)
use psb_s_mat_mod, psb_protect_name => psb_ls_set_incols
use psb_error_mod
implicit none
class(psb_lsspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_ncols(n)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_ls_set_incols
#endif
!
! Valid values for DUPL:

@ -2603,8 +2603,8 @@ end subroutine psb_z_cp_to_l
!
subroutine psb_lz_set_nrows(m,a)
use psb_z_mat_mod, psb_protect_name => psb_lz_set_nrows
subroutine psb_lz_set_lnrows(m,a)
use psb_z_mat_mod, psb_protect_name => psb_lz_set_lnrows
use psb_error_mod
implicit none
class(psb_lzspmat_type), intent(inout) :: a
@ -2629,11 +2629,40 @@ subroutine psb_lz_set_nrows(m,a)
return
end subroutine psb_lz_set_nrows
end subroutine psb_lz_set_lnrows
#if defined(IPK4) && defined(LPK8)
subroutine psb_lz_set_inrows(m,a)
use psb_z_mat_mod, psb_protect_name => psb_lz_set_inrows
use psb_error_mod
implicit none
class(psb_lzspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: m
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='set_nrows'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_nrows(m)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_lz_set_inrows
#endif
subroutine psb_lz_set_ncols(n,a)
use psb_z_mat_mod, psb_protect_name => psb_lz_set_ncols
subroutine psb_lz_set_lncols(n,a)
use psb_z_mat_mod, psb_protect_name => psb_lz_set_lncols
use psb_error_mod
implicit none
class(psb_lzspmat_type), intent(inout) :: a
@ -2657,9 +2686,37 @@ subroutine psb_lz_set_ncols(n,a)
return
end subroutine psb_lz_set_ncols
end subroutine psb_lz_set_lncols
#if defined(IPK4) && defined(LPK8)
subroutine psb_lz_set_incols(n,a)
use psb_z_mat_mod, psb_protect_name => psb_lz_set_incols
use psb_error_mod
implicit none
class(psb_lzspmat_type), intent(inout) :: a
integer(psb_ipk_), intent(in) :: n
integer(psb_ipk_) :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
if (.not.allocated(a%a)) then
info = psb_err_invalid_mat_state_
call psb_errpush(info,name)
goto 9999
endif
call a%a%set_ncols(n)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_lz_set_incols
#endif
!
! Valid values for DUPL:

Loading…
Cancel
Save