|
|
|
@ -1567,3 +1567,228 @@ subroutine i2axpbyv2(m, n, alpha, X, lldx, beta, Y, lldy, Z, lldz, info)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
end subroutine i2axpbyv2
|
|
|
|
|
|
|
|
|
|
subroutine psi_i2abgdxyz(m,alpha, beta, gamma,delta,x, y, z, info)
|
|
|
|
|
use psb_const_mod
|
|
|
|
|
use psb_error_mod
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_ipk_), intent(in) :: m
|
|
|
|
|
integer(psb_i2pk_), intent (in) :: x(:)
|
|
|
|
|
integer(psb_i2pk_), intent (inout) :: y(:)
|
|
|
|
|
integer(psb_i2pk_), intent (inout) :: z(:)
|
|
|
|
|
integer(psb_i2pk_), intent (in) :: alpha, beta, gamma, delta
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: i
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
character name*20
|
|
|
|
|
name='i2abgdxyz'
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
|
if (m.lt.0) then
|
|
|
|
|
info=psb_err_iarg_neg_
|
|
|
|
|
int_err(1)=1
|
|
|
|
|
int_err(2)=m
|
|
|
|
|
call fcpsb_errpush(info,name,int_err)
|
|
|
|
|
goto 9999
|
|
|
|
|
else if (size(x).lt.max(1,m)) then
|
|
|
|
|
info=psb_err_iarg_not_gtia_ii_
|
|
|
|
|
int_err(1)=6
|
|
|
|
|
int_err(2)=1
|
|
|
|
|
int_err(3)=size(x)
|
|
|
|
|
int_err(4)=m
|
|
|
|
|
call fcpsb_errpush(info,name,int_err)
|
|
|
|
|
goto 9999
|
|
|
|
|
else if (size(y).lt.max(1,m)) then
|
|
|
|
|
info=psb_err_iarg_not_gtia_ii_
|
|
|
|
|
int_err(1)=7
|
|
|
|
|
int_err(2)=1
|
|
|
|
|
int_err(3)=size(y)
|
|
|
|
|
int_err(4)=m
|
|
|
|
|
call fcpsb_errpush(info,name,int_err)
|
|
|
|
|
goto 9999
|
|
|
|
|
else if (size(z).lt.max(1,m)) then
|
|
|
|
|
info=psb_err_iarg_not_gtia_ii_
|
|
|
|
|
int_err(1)=8
|
|
|
|
|
int_err(2)=1
|
|
|
|
|
int_err(3)=size(z)
|
|
|
|
|
int_err(4)=m
|
|
|
|
|
call fcpsb_errpush(info,name,int_err)
|
|
|
|
|
goto 9999
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if (beta == i2zero) then
|
|
|
|
|
if (gamma == i2zero) then
|
|
|
|
|
if (alpha == i2zero) then
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a 0 b 0 g 0 d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = i2zero
|
|
|
|
|
z(i) = i2zero
|
|
|
|
|
end do
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a 0 b 0 g 0 d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = i2zero
|
|
|
|
|
z(i) = delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
end if
|
|
|
|
|
else if (alpha /= i2zero) then
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a n b 0 g 0 d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)
|
|
|
|
|
z(i) = i2zero
|
|
|
|
|
end do
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a n b 0 g 0 d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)
|
|
|
|
|
z(i) = delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
else if (gamma /= i2zero) then
|
|
|
|
|
|
|
|
|
|
if (alpha == i2zero) then
|
|
|
|
|
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a 0 b 0 g n d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = i2zero
|
|
|
|
|
z(i) = i2zero ! gamma*y(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a 0 b 0 g n d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = i2zero
|
|
|
|
|
z(i) = delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
else if (alpha /= i2zero) then
|
|
|
|
|
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a n b 0 g n d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)
|
|
|
|
|
z(i) = gamma*y(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a n b 0 g n d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)
|
|
|
|
|
z(i) = gamma*y(i)+delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
else if (beta /= i2zero) then
|
|
|
|
|
|
|
|
|
|
if (gamma == i2zero) then
|
|
|
|
|
if (alpha == i2zero) then
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a 0 b n g 0 d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = beta*y(i)
|
|
|
|
|
z(i) = i2zero
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a 0 b n g 0 d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = beta*y(i)
|
|
|
|
|
z(i) = delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
else if (alpha /= i2zero) then
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a n b n g 0 d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)+beta*y(i)
|
|
|
|
|
z(i) = i2zero
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a n b n g 0 d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)+beta*y(i)
|
|
|
|
|
z(i) = delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
else if (gamma /= i2zero) then
|
|
|
|
|
if (alpha == i2zero) then
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a 0 b n g n d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = beta*y(i)
|
|
|
|
|
z(i) = gamma*y(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a 0 b n g n d n
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = beta*y(i)
|
|
|
|
|
z(i) = gamma*y(i)+delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
else if (alpha /= i2zero) then
|
|
|
|
|
if (delta == i2zero) then
|
|
|
|
|
! a n b n g n d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)+beta*y(i)
|
|
|
|
|
z(i) = gamma*y(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
else if (delta /= i2zero) then
|
|
|
|
|
! a n b n g n d 0
|
|
|
|
|
!$omp parallel do private(i)
|
|
|
|
|
do i=1,m
|
|
|
|
|
y(i) = alpha*x(i)+beta*y(i)
|
|
|
|
|
z(i) = gamma*y(i)+delta*z(i)
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
|
call fcpsb_serror()
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
end subroutine psi_i2abgdxyz
|
|
|
|
|