mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
Added missign @LX@ implementation of new sparse matrix sum routines
This commit is contained in:
@@ -2486,6 +2486,41 @@ subroutine psb_s_scalplusidentity(d,a,info)
|
||||
|
||||
end subroutine psb_s_scalplusidentity
|
||||
|
||||
subroutine psb_s_spaxpby(alpha,a,beta,b,info)
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_s_mat_mod, psb_protect_name => psb_s_spaxpby
|
||||
implicit none
|
||||
real(psb_spk_), intent(in) :: alpha
|
||||
class(psb_sspmat_type), intent(inout) :: a
|
||||
real(psb_spk_), intent(in) :: beta
|
||||
class(psb_sspmat_type), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='spaxby'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = psb_success_
|
||||
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%spaxpby(alpha,beta,b%a,info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_s_spaxpby
|
||||
|
||||
subroutine psb_s_mv_from_lb(a,b)
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -4617,6 +4652,74 @@ subroutine psb_ls_scals(d,a,info)
|
||||
|
||||
end subroutine psb_ls_scals
|
||||
|
||||
subroutine psb_ls_scalplusidentity(d,a,info)
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_s_mat_mod, psb_protect_name => psb_ls_scalplusidentity
|
||||
implicit none
|
||||
class(psb_lsspmat_type), intent(inout) :: a
|
||||
real(psb_spk_), intent(in) :: d
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='scalplusidentity'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = psb_success_
|
||||
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%scalpid(d,info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_ls_scalplusidentity
|
||||
|
||||
subroutine psb_ls_spaxpby(alpha,a,beta,b,info)
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_s_mat_mod, psb_protect_name => psb_ls_spaxpby
|
||||
implicit none
|
||||
real(psb_spk_), intent(in) :: alpha
|
||||
class(psb_lsspmat_type), intent(inout) :: a
|
||||
real(psb_spk_), intent(in) :: beta
|
||||
class(psb_lsspmat_type), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='spaxby'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = psb_success_
|
||||
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%spaxpby(alpha,beta,b%a,info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_ls_spaxpby
|
||||
|
||||
function psb_ls_maxval(a) result(res)
|
||||
use psb_s_mat_mod, psb_protect_name => psb_ls_maxval
|
||||
use psb_error_mod
|
||||
|
||||
Reference in New Issue
Block a user