mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
Added new methd for two combined axpbys
This commit is contained in:
@@ -143,6 +143,20 @@ module psb_c_psblas_mod
|
||||
end subroutine psb_caxpby
|
||||
end interface
|
||||
|
||||
interface psb_abgdxyx
|
||||
subroutine psb_cabgdxyz_vect(alpha, beta, gamma, delta, x, y, z,&
|
||||
& desc_a, info)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_c_vect_type, psb_cspmat_type
|
||||
type(psb_c_vect_type), intent (inout) :: x
|
||||
type(psb_c_vect_type), intent (inout) :: y
|
||||
type(psb_c_vect_type), intent (inout) :: z
|
||||
complex(psb_spk_), intent (in) :: alpha, beta, gamma, delta
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_cabgdxyz_vect
|
||||
end interface psb_abgdxyx
|
||||
|
||||
interface psb_geamax
|
||||
function psb_camax(x, desc_a, info, jx,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
|
||||
@@ -143,6 +143,20 @@ module psb_d_psblas_mod
|
||||
end subroutine psb_daxpby
|
||||
end interface
|
||||
|
||||
interface psb_abgdxyx
|
||||
subroutine psb_dabgdxyz_vect(alpha, beta, gamma, delta, x, y, z,&
|
||||
& desc_a, info)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_d_vect_type, psb_dspmat_type
|
||||
type(psb_d_vect_type), intent (inout) :: x
|
||||
type(psb_d_vect_type), intent (inout) :: y
|
||||
type(psb_d_vect_type), intent (inout) :: z
|
||||
real(psb_dpk_), intent (in) :: alpha, beta, gamma, delta
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_dabgdxyz_vect
|
||||
end interface psb_abgdxyx
|
||||
|
||||
interface psb_geamax
|
||||
function psb_damax(x, desc_a, info, jx,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
|
||||
@@ -143,6 +143,20 @@ module psb_s_psblas_mod
|
||||
end subroutine psb_saxpby
|
||||
end interface
|
||||
|
||||
interface psb_abgdxyx
|
||||
subroutine psb_sabgdxyz_vect(alpha, beta, gamma, delta, x, y, z,&
|
||||
& desc_a, info)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
& psb_s_vect_type, psb_sspmat_type
|
||||
type(psb_s_vect_type), intent (inout) :: x
|
||||
type(psb_s_vect_type), intent (inout) :: y
|
||||
type(psb_s_vect_type), intent (inout) :: z
|
||||
real(psb_spk_), intent (in) :: alpha, beta, gamma, delta
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_sabgdxyz_vect
|
||||
end interface psb_abgdxyx
|
||||
|
||||
interface psb_geamax
|
||||
function psb_samax(x, desc_a, info, jx,global)
|
||||
import :: psb_desc_type, psb_spk_, psb_ipk_, &
|
||||
|
||||
@@ -143,6 +143,20 @@ module psb_z_psblas_mod
|
||||
end subroutine psb_zaxpby
|
||||
end interface
|
||||
|
||||
interface psb_abgdxyx
|
||||
subroutine psb_zabgdxyz_vect(alpha, beta, gamma, delta, x, y, z,&
|
||||
& desc_a, info)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
& psb_z_vect_type, psb_zspmat_type
|
||||
type(psb_z_vect_type), intent (inout) :: x
|
||||
type(psb_z_vect_type), intent (inout) :: y
|
||||
type(psb_z_vect_type), intent (inout) :: z
|
||||
complex(psb_dpk_), intent (in) :: alpha, beta, gamma, delta
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_zabgdxyz_vect
|
||||
end interface psb_abgdxyx
|
||||
|
||||
interface psb_geamax
|
||||
function psb_zamax(x, desc_a, info, jx,global)
|
||||
import :: psb_desc_type, psb_dpk_, psb_ipk_, &
|
||||
|
||||
@@ -155,6 +155,8 @@ module psb_c_base_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => c_base_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => c_base_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => c_base_abgdxyz
|
||||
|
||||
!
|
||||
! Vector by vector multiplication. Need all variants
|
||||
! to handle multiple requirements from preconditioners
|
||||
@@ -1126,6 +1128,23 @@ contains
|
||||
|
||||
end subroutine c_base_axpby_a2
|
||||
|
||||
subroutine c_base_abgdxyz(m,alpha, beta, gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_c_base_vect_type), intent(inout) :: x
|
||||
class(psb_c_base_vect_type), intent(inout) :: y
|
||||
class(psb_c_base_vect_type), intent(inout) :: z
|
||||
complex(psb_spk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
call y%axpby(m,alpha,x,beta,info)
|
||||
call z%axpby(m,gamma,y,delta,info)
|
||||
|
||||
end subroutine c_base_abgdxyz
|
||||
|
||||
|
||||
!
|
||||
! Multiple variants of two operations:
|
||||
|
||||
@@ -102,6 +102,8 @@ module psb_c_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => c_vect_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => c_vect_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => c_vect_abgdxyz
|
||||
|
||||
procedure, pass(y) :: mlt_v => c_vect_mlt_v
|
||||
procedure, pass(y) :: mlt_a => c_vect_mlt_a
|
||||
procedure, pass(z) :: mlt_a_2 => c_vect_mlt_a_2
|
||||
@@ -771,6 +773,22 @@ contains
|
||||
|
||||
end subroutine c_vect_axpby_a2
|
||||
|
||||
subroutine c_vect_abgdxyz(m,alpha,beta,gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_c_vect_type), intent(inout) :: x
|
||||
class(psb_c_vect_type), intent(inout) :: y
|
||||
class(psb_c_vect_type), intent(inout) :: z
|
||||
complex(psb_spk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (allocated(z%v)) &
|
||||
call z%abgdxyz(m,alpha,beta,gamma,delta,x,y,info)
|
||||
|
||||
end subroutine c_vect_abgdxyz
|
||||
|
||||
|
||||
subroutine c_vect_mlt_v(x, y, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
@@ -155,6 +155,8 @@ module psb_d_base_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => d_base_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => d_base_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => d_base_abgdxyz
|
||||
|
||||
!
|
||||
! Vector by vector multiplication. Need all variants
|
||||
! to handle multiple requirements from preconditioners
|
||||
@@ -1133,6 +1135,23 @@ contains
|
||||
|
||||
end subroutine d_base_axpby_a2
|
||||
|
||||
subroutine d_base_abgdxyz(m,alpha, beta, gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_d_base_vect_type), intent(inout) :: x
|
||||
class(psb_d_base_vect_type), intent(inout) :: y
|
||||
class(psb_d_base_vect_type), intent(inout) :: z
|
||||
real(psb_dpk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
call y%axpby(m,alpha,x,beta,info)
|
||||
call z%axpby(m,gamma,y,delta,info)
|
||||
|
||||
end subroutine d_base_abgdxyz
|
||||
|
||||
|
||||
!
|
||||
! Multiple variants of two operations:
|
||||
|
||||
@@ -102,6 +102,8 @@ module psb_d_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => d_vect_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => d_vect_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => d_vect_abgdxyz
|
||||
|
||||
procedure, pass(y) :: mlt_v => d_vect_mlt_v
|
||||
procedure, pass(y) :: mlt_a => d_vect_mlt_a
|
||||
procedure, pass(z) :: mlt_a_2 => d_vect_mlt_a_2
|
||||
@@ -778,6 +780,22 @@ contains
|
||||
|
||||
end subroutine d_vect_axpby_a2
|
||||
|
||||
subroutine d_vect_abgdxyz(m,alpha,beta,gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_d_vect_type), intent(inout) :: x
|
||||
class(psb_d_vect_type), intent(inout) :: y
|
||||
class(psb_d_vect_type), intent(inout) :: z
|
||||
real(psb_dpk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (allocated(z%v)) &
|
||||
call z%abgdxyz(m,alpha,beta,gamma,delta,x,y,info)
|
||||
|
||||
end subroutine d_vect_abgdxyz
|
||||
|
||||
|
||||
subroutine d_vect_mlt_v(x, y, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
@@ -155,6 +155,8 @@ module psb_s_base_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => s_base_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => s_base_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => s_base_abgdxyz
|
||||
|
||||
!
|
||||
! Vector by vector multiplication. Need all variants
|
||||
! to handle multiple requirements from preconditioners
|
||||
@@ -1133,6 +1135,23 @@ contains
|
||||
|
||||
end subroutine s_base_axpby_a2
|
||||
|
||||
subroutine s_base_abgdxyz(m,alpha, beta, gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_s_base_vect_type), intent(inout) :: x
|
||||
class(psb_s_base_vect_type), intent(inout) :: y
|
||||
class(psb_s_base_vect_type), intent(inout) :: z
|
||||
real(psb_spk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
call y%axpby(m,alpha,x,beta,info)
|
||||
call z%axpby(m,gamma,y,delta,info)
|
||||
|
||||
end subroutine s_base_abgdxyz
|
||||
|
||||
|
||||
!
|
||||
! Multiple variants of two operations:
|
||||
|
||||
@@ -102,6 +102,8 @@ module psb_s_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => s_vect_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => s_vect_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => s_vect_abgdxyz
|
||||
|
||||
procedure, pass(y) :: mlt_v => s_vect_mlt_v
|
||||
procedure, pass(y) :: mlt_a => s_vect_mlt_a
|
||||
procedure, pass(z) :: mlt_a_2 => s_vect_mlt_a_2
|
||||
@@ -778,6 +780,22 @@ contains
|
||||
|
||||
end subroutine s_vect_axpby_a2
|
||||
|
||||
subroutine s_vect_abgdxyz(m,alpha,beta,gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_s_vect_type), intent(inout) :: x
|
||||
class(psb_s_vect_type), intent(inout) :: y
|
||||
class(psb_s_vect_type), intent(inout) :: z
|
||||
real(psb_spk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (allocated(z%v)) &
|
||||
call z%abgdxyz(m,alpha,beta,gamma,delta,x,y,info)
|
||||
|
||||
end subroutine s_vect_abgdxyz
|
||||
|
||||
|
||||
subroutine s_vect_mlt_v(x, y, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
@@ -155,6 +155,8 @@ module psb_z_base_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => z_base_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => z_base_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => z_base_abgdxyz
|
||||
|
||||
!
|
||||
! Vector by vector multiplication. Need all variants
|
||||
! to handle multiple requirements from preconditioners
|
||||
@@ -1126,6 +1128,23 @@ contains
|
||||
|
||||
end subroutine z_base_axpby_a2
|
||||
|
||||
subroutine z_base_abgdxyz(m,alpha, beta, gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_z_base_vect_type), intent(inout) :: x
|
||||
class(psb_z_base_vect_type), intent(inout) :: y
|
||||
class(psb_z_base_vect_type), intent(inout) :: z
|
||||
complex(psb_dpk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (x%is_dev()) call x%sync()
|
||||
|
||||
call y%axpby(m,alpha,x,beta,info)
|
||||
call z%axpby(m,gamma,y,delta,info)
|
||||
|
||||
end subroutine z_base_abgdxyz
|
||||
|
||||
|
||||
!
|
||||
! Multiple variants of two operations:
|
||||
|
||||
@@ -102,6 +102,8 @@ module psb_z_vect_mod
|
||||
procedure, pass(z) :: axpby_v2 => z_vect_axpby_v2
|
||||
procedure, pass(z) :: axpby_a2 => z_vect_axpby_a2
|
||||
generic, public :: axpby => axpby_v, axpby_a, axpby_v2, axpby_a2
|
||||
procedure, pass(z) :: abgdxyz => z_vect_abgdxyz
|
||||
|
||||
procedure, pass(y) :: mlt_v => z_vect_mlt_v
|
||||
procedure, pass(y) :: mlt_a => z_vect_mlt_a
|
||||
procedure, pass(z) :: mlt_a_2 => z_vect_mlt_a_2
|
||||
@@ -771,6 +773,22 @@ contains
|
||||
|
||||
end subroutine z_vect_axpby_a2
|
||||
|
||||
subroutine z_vect_abgdxyz(m,alpha,beta,gamma,delta,x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
integer(psb_ipk_), intent(in) :: m
|
||||
class(psb_z_vect_type), intent(inout) :: x
|
||||
class(psb_z_vect_type), intent(inout) :: y
|
||||
class(psb_z_vect_type), intent(inout) :: z
|
||||
complex(psb_dpk_), intent (in) :: alpha, beta, gamma, delta
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
|
||||
if (allocated(z%v)) &
|
||||
call z%abgdxyz(m,alpha,beta,gamma,delta,x,y,info)
|
||||
|
||||
end subroutine z_vect_abgdxyz
|
||||
|
||||
|
||||
subroutine z_vect_mlt_v(x, y, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
Reference in New Issue
Block a user