mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-24 23:01:48 +00:00
Added out-of-place entrywise division with C interfaces
This commit is contained in:
@@ -481,6 +481,15 @@ module psb_c_psblas_mod
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_cdiv_vect
|
||||
subroutine psb_cdiv_vect2(x,y,z,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_c_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_cdiv_vect2
|
||||
subroutine psb_cdiv_vect_check(x,y,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_c_vect_type
|
||||
@@ -490,6 +499,16 @@ module psb_c_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_cdiv_vect_check
|
||||
subroutine psb_cdiv_vect2_check(x,y,z,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_c_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_cdiv_vect2_check
|
||||
end interface
|
||||
|
||||
interface psb_geinv
|
||||
|
||||
@@ -492,6 +492,15 @@ module psb_d_psblas_mod
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_ddiv_vect
|
||||
subroutine psb_ddiv_vect2(x,y,z,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_d_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_ddiv_vect2
|
||||
subroutine psb_ddiv_vect_check(x,y,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_d_vect_type
|
||||
@@ -501,6 +510,16 @@ module psb_d_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_ddiv_vect_check
|
||||
subroutine psb_ddiv_vect2_check(x,y,z,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_d_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_ddiv_vect2_check
|
||||
end interface
|
||||
|
||||
interface psb_geinv
|
||||
|
||||
@@ -492,6 +492,15 @@ module psb_s_psblas_mod
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_sdiv_vect
|
||||
subroutine psb_sdiv_vect2(x,y,z,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_s_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_sdiv_vect2
|
||||
subroutine psb_sdiv_vect_check(x,y,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_s_vect_type
|
||||
@@ -501,6 +510,16 @@ module psb_s_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_sdiv_vect_check
|
||||
subroutine psb_sdiv_vect2_check(x,y,z,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_s_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_sdiv_vect2_check
|
||||
end interface
|
||||
|
||||
interface psb_geinv
|
||||
|
||||
@@ -481,6 +481,15 @@ module psb_z_psblas_mod
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_zdiv_vect
|
||||
subroutine psb_zdiv_vect2(x,y,z,desc_a,info)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_z_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
end subroutine psb_zdiv_vect2
|
||||
subroutine psb_zdiv_vect_check(x,y,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_z_vect_type
|
||||
@@ -490,6 +499,16 @@ module psb_z_psblas_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_zdiv_vect_check
|
||||
subroutine psb_zdiv_vect2_check(x,y,z,desc_a,info,flag)
|
||||
import :: psb_desc_type, psb_ipk_, &
|
||||
& psb_z_vect_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
|
||||
type(psb_desc_type), intent (in) :: desc_a
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
logical, intent(in) :: flag
|
||||
end subroutine psb_zdiv_vect2_check
|
||||
end interface
|
||||
|
||||
interface psb_geinv
|
||||
|
||||
@@ -162,15 +162,19 @@ module psb_c_base_vect_mod
|
||||
procedure, pass(z) :: mlt_v_2 => c_base_mlt_v_2
|
||||
procedure, pass(z) :: mlt_va => c_base_mlt_va
|
||||
procedure, pass(z) :: mlt_av => c_base_mlt_av
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, mlt_va
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, &
|
||||
mlt_va
|
||||
!
|
||||
! Vector-Vector operations
|
||||
!
|
||||
procedure, pass(x) :: div_v => c_base_div_v
|
||||
procedure, pass(x) :: div_v_check => c_base_div_v_check
|
||||
procedure, pass(x) :: div_v2 => c_base_div_v2
|
||||
procedure, pass(x) :: div_v2_check => c_base_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => c_base_div_a2
|
||||
procedure, pass(z) :: div_a2_check => c_base_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => c_base_inv_v
|
||||
procedure, pass(y) :: inv_v_check => c_base_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => c_base_inv_a2
|
||||
@@ -1220,6 +1224,28 @@ contains
|
||||
|
||||
end subroutine c_base_div_v
|
||||
!
|
||||
!> Function base_div_v2
|
||||
!! \memberof psb_c_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine c_base_div_v2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info)
|
||||
|
||||
|
||||
end subroutine c_base_div_v2
|
||||
!
|
||||
!> Function base_div_v_check
|
||||
!! \memberof psb_c_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector x=x/y
|
||||
@@ -1242,9 +1268,32 @@ contains
|
||||
|
||||
end subroutine c_base_div_v_check
|
||||
!
|
||||
!> Function base_div_v2_check
|
||||
!! \memberof psb_c_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine c_base_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info,flag)
|
||||
|
||||
|
||||
end subroutine c_base_div_v2_check
|
||||
!
|
||||
!> Function base_div_a2
|
||||
!! \memberof psb_c_base_vect_type
|
||||
!! \brief Entry-by-entry divide between normal array x=x/y
|
||||
!! \brief Entry-by-entry divide between normal array z=x/y
|
||||
!! \param y(:) The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
|
||||
@@ -95,10 +95,13 @@ module psb_c_vect_mod
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
|
||||
& mlt_v_2, mlt_av, mlt_va
|
||||
procedure, pass(x) :: div_v => c_vect_div_v
|
||||
procedure, pass(x) :: div_v2 => c_vect_div_v2
|
||||
procedure, pass(x) :: div_v_check => c_vect_div_v_check
|
||||
procedure, pass(x) :: div_v2_check => c_vect_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => c_vect_div_a2
|
||||
procedure, pass(z) :: div_a2_check => c_vect_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => c_vect_inv_v
|
||||
procedure, pass(y) :: inv_v_check => c_vect_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => c_vect_inv_a2
|
||||
@@ -764,6 +767,21 @@ contains
|
||||
|
||||
end subroutine c_vect_div_v
|
||||
|
||||
subroutine c_vect_div_v2( x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_c_vect_type), intent(inout) :: x
|
||||
class(psb_c_vect_type), intent(inout) :: y
|
||||
class(psb_c_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info)
|
||||
|
||||
end subroutine c_vect_div_v2
|
||||
|
||||
subroutine c_vect_div_v_check(x, y, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
@@ -779,6 +797,22 @@ contains
|
||||
|
||||
end subroutine c_vect_div_v_check
|
||||
|
||||
subroutine c_vect_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_c_vect_type), intent(inout) :: x
|
||||
class(psb_c_vect_type), intent(inout) :: y
|
||||
class(psb_c_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info,flag)
|
||||
|
||||
end subroutine c_vect_div_v2_check
|
||||
|
||||
subroutine c_vect_div_a2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
@@ -162,15 +162,19 @@ module psb_d_base_vect_mod
|
||||
procedure, pass(z) :: mlt_v_2 => d_base_mlt_v_2
|
||||
procedure, pass(z) :: mlt_va => d_base_mlt_va
|
||||
procedure, pass(z) :: mlt_av => d_base_mlt_av
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, mlt_va
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, &
|
||||
mlt_va
|
||||
!
|
||||
! Vector-Vector operations
|
||||
!
|
||||
procedure, pass(x) :: div_v => d_base_div_v
|
||||
procedure, pass(x) :: div_v_check => d_base_div_v_check
|
||||
procedure, pass(x) :: div_v2 => d_base_div_v2
|
||||
procedure, pass(x) :: div_v2_check => d_base_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => d_base_div_a2
|
||||
procedure, pass(z) :: div_a2_check => d_base_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => d_base_inv_v
|
||||
procedure, pass(y) :: inv_v_check => d_base_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => d_base_inv_a2
|
||||
@@ -1224,6 +1228,28 @@ contains
|
||||
|
||||
end subroutine d_base_div_v
|
||||
!
|
||||
!> Function base_div_v2
|
||||
!! \memberof psb_d_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine d_base_div_v2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info)
|
||||
|
||||
|
||||
end subroutine d_base_div_v2
|
||||
!
|
||||
!> Function base_div_v_check
|
||||
!! \memberof psb_d_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector x=x/y
|
||||
@@ -1246,9 +1272,32 @@ contains
|
||||
|
||||
end subroutine d_base_div_v_check
|
||||
!
|
||||
!> Function base_div_v2_check
|
||||
!! \memberof psb_d_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine d_base_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info,flag)
|
||||
|
||||
|
||||
end subroutine d_base_div_v2_check
|
||||
!
|
||||
!> Function base_div_a2
|
||||
!! \memberof psb_d_base_vect_type
|
||||
!! \brief Entry-by-entry divide between normal array x=x/y
|
||||
!! \brief Entry-by-entry divide between normal array z=x/y
|
||||
!! \param y(:) The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
|
||||
@@ -95,10 +95,13 @@ module psb_d_vect_mod
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
|
||||
& mlt_v_2, mlt_av, mlt_va
|
||||
procedure, pass(x) :: div_v => d_vect_div_v
|
||||
procedure, pass(x) :: div_v2 => d_vect_div_v2
|
||||
procedure, pass(x) :: div_v_check => d_vect_div_v_check
|
||||
procedure, pass(x) :: div_v2_check => d_vect_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => d_vect_div_a2
|
||||
procedure, pass(z) :: div_a2_check => d_vect_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => d_vect_inv_v
|
||||
procedure, pass(y) :: inv_v_check => d_vect_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => d_vect_inv_a2
|
||||
@@ -768,6 +771,21 @@ contains
|
||||
|
||||
end subroutine d_vect_div_v
|
||||
|
||||
subroutine d_vect_div_v2( x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_d_vect_type), intent(inout) :: x
|
||||
class(psb_d_vect_type), intent(inout) :: y
|
||||
class(psb_d_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info)
|
||||
|
||||
end subroutine d_vect_div_v2
|
||||
|
||||
subroutine d_vect_div_v_check(x, y, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
@@ -783,6 +801,22 @@ contains
|
||||
|
||||
end subroutine d_vect_div_v_check
|
||||
|
||||
subroutine d_vect_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_d_vect_type), intent(inout) :: x
|
||||
class(psb_d_vect_type), intent(inout) :: y
|
||||
class(psb_d_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info,flag)
|
||||
|
||||
end subroutine d_vect_div_v2_check
|
||||
|
||||
subroutine d_vect_div_a2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
@@ -162,15 +162,19 @@ module psb_s_base_vect_mod
|
||||
procedure, pass(z) :: mlt_v_2 => s_base_mlt_v_2
|
||||
procedure, pass(z) :: mlt_va => s_base_mlt_va
|
||||
procedure, pass(z) :: mlt_av => s_base_mlt_av
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, mlt_va
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, &
|
||||
mlt_va
|
||||
!
|
||||
! Vector-Vector operations
|
||||
!
|
||||
procedure, pass(x) :: div_v => s_base_div_v
|
||||
procedure, pass(x) :: div_v_check => s_base_div_v_check
|
||||
procedure, pass(x) :: div_v2 => s_base_div_v2
|
||||
procedure, pass(x) :: div_v2_check => s_base_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => s_base_div_a2
|
||||
procedure, pass(z) :: div_a2_check => s_base_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => s_base_inv_v
|
||||
procedure, pass(y) :: inv_v_check => s_base_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => s_base_inv_a2
|
||||
@@ -1224,6 +1228,28 @@ contains
|
||||
|
||||
end subroutine s_base_div_v
|
||||
!
|
||||
!> Function base_div_v2
|
||||
!! \memberof psb_s_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine s_base_div_v2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info)
|
||||
|
||||
|
||||
end subroutine s_base_div_v2
|
||||
!
|
||||
!> Function base_div_v_check
|
||||
!! \memberof psb_s_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector x=x/y
|
||||
@@ -1246,9 +1272,32 @@ contains
|
||||
|
||||
end subroutine s_base_div_v_check
|
||||
!
|
||||
!> Function base_div_v2_check
|
||||
!! \memberof psb_s_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine s_base_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info,flag)
|
||||
|
||||
|
||||
end subroutine s_base_div_v2_check
|
||||
!
|
||||
!> Function base_div_a2
|
||||
!! \memberof psb_s_base_vect_type
|
||||
!! \brief Entry-by-entry divide between normal array x=x/y
|
||||
!! \brief Entry-by-entry divide between normal array z=x/y
|
||||
!! \param y(:) The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
|
||||
@@ -95,10 +95,13 @@ module psb_s_vect_mod
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
|
||||
& mlt_v_2, mlt_av, mlt_va
|
||||
procedure, pass(x) :: div_v => s_vect_div_v
|
||||
procedure, pass(x) :: div_v2 => s_vect_div_v2
|
||||
procedure, pass(x) :: div_v_check => s_vect_div_v_check
|
||||
procedure, pass(x) :: div_v2_check => s_vect_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => s_vect_div_a2
|
||||
procedure, pass(z) :: div_a2_check => s_vect_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => s_vect_inv_v
|
||||
procedure, pass(y) :: inv_v_check => s_vect_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => s_vect_inv_a2
|
||||
@@ -768,6 +771,21 @@ contains
|
||||
|
||||
end subroutine s_vect_div_v
|
||||
|
||||
subroutine s_vect_div_v2( x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_s_vect_type), intent(inout) :: x
|
||||
class(psb_s_vect_type), intent(inout) :: y
|
||||
class(psb_s_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info)
|
||||
|
||||
end subroutine s_vect_div_v2
|
||||
|
||||
subroutine s_vect_div_v_check(x, y, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
@@ -783,6 +801,22 @@ contains
|
||||
|
||||
end subroutine s_vect_div_v_check
|
||||
|
||||
subroutine s_vect_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_s_vect_type), intent(inout) :: x
|
||||
class(psb_s_vect_type), intent(inout) :: y
|
||||
class(psb_s_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info,flag)
|
||||
|
||||
end subroutine s_vect_div_v2_check
|
||||
|
||||
subroutine s_vect_div_a2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
@@ -162,15 +162,19 @@ module psb_z_base_vect_mod
|
||||
procedure, pass(z) :: mlt_v_2 => z_base_mlt_v_2
|
||||
procedure, pass(z) :: mlt_va => z_base_mlt_va
|
||||
procedure, pass(z) :: mlt_av => z_base_mlt_av
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, mlt_va
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2, mlt_v_2, mlt_av, &
|
||||
mlt_va
|
||||
!
|
||||
! Vector-Vector operations
|
||||
!
|
||||
procedure, pass(x) :: div_v => z_base_div_v
|
||||
procedure, pass(x) :: div_v_check => z_base_div_v_check
|
||||
procedure, pass(x) :: div_v2 => z_base_div_v2
|
||||
procedure, pass(x) :: div_v2_check => z_base_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => z_base_div_a2
|
||||
procedure, pass(z) :: div_a2_check => z_base_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => z_base_inv_v
|
||||
procedure, pass(y) :: inv_v_check => z_base_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => z_base_inv_a2
|
||||
@@ -1220,6 +1224,28 @@ contains
|
||||
|
||||
end subroutine z_base_div_v
|
||||
!
|
||||
!> Function base_div_v2
|
||||
!! \memberof psb_z_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine z_base_div_v2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info)
|
||||
|
||||
|
||||
end subroutine z_base_div_v2
|
||||
!
|
||||
!> Function base_div_v_check
|
||||
!! \memberof psb_z_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector x=x/y
|
||||
@@ -1242,9 +1268,32 @@ contains
|
||||
|
||||
end subroutine z_base_div_v_check
|
||||
!
|
||||
!> Function base_div_v2_check
|
||||
!! \memberof psb_z_base_vect_type
|
||||
!! \brief Vector entry-by-entry divide by a vector z=x/y
|
||||
!! \param y The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
subroutine z_base_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
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
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (z%is_dev()) call z%sync()
|
||||
call z%div(x%v,y%v,info,flag)
|
||||
|
||||
|
||||
end subroutine z_base_div_v2_check
|
||||
!
|
||||
!> Function base_div_a2
|
||||
!! \memberof psb_z_base_vect_type
|
||||
!! \brief Entry-by-entry divide between normal array x=x/y
|
||||
!! \brief Entry-by-entry divide between normal array z=x/y
|
||||
!! \param y(:) The array to be divided by
|
||||
!! \param info return code
|
||||
!!
|
||||
|
||||
@@ -95,10 +95,13 @@ module psb_z_vect_mod
|
||||
generic, public :: mlt => mlt_v, mlt_a, mlt_a_2,&
|
||||
& mlt_v_2, mlt_av, mlt_va
|
||||
procedure, pass(x) :: div_v => z_vect_div_v
|
||||
procedure, pass(x) :: div_v2 => z_vect_div_v2
|
||||
procedure, pass(x) :: div_v_check => z_vect_div_v_check
|
||||
procedure, pass(x) :: div_v2_check => z_vect_div_v2_check
|
||||
procedure, pass(z) :: div_a2 => z_vect_div_a2
|
||||
procedure, pass(z) :: div_a2_check => z_vect_div_a2_check
|
||||
generic, public :: div => div_v, div_v_check, div_a2, div_a2_check
|
||||
generic, public :: div => div_v, div_v2, div_v_check, &
|
||||
div_v2_check, div_a2, div_a2_check
|
||||
procedure, pass(y) :: inv_v => z_vect_inv_v
|
||||
procedure, pass(y) :: inv_v_check => z_vect_inv_v_check
|
||||
procedure, pass(y) :: inv_a2 => z_vect_inv_a2
|
||||
@@ -764,6 +767,21 @@ contains
|
||||
|
||||
end subroutine z_vect_div_v
|
||||
|
||||
subroutine z_vect_div_v2( x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_z_vect_type), intent(inout) :: x
|
||||
class(psb_z_vect_type), intent(inout) :: y
|
||||
class(psb_z_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info)
|
||||
|
||||
end subroutine z_vect_div_v2
|
||||
|
||||
subroutine z_vect_div_v_check(x, y, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
@@ -779,6 +797,22 @@ contains
|
||||
|
||||
end subroutine z_vect_div_v_check
|
||||
|
||||
subroutine z_vect_div_v2_check(x, y, z, info, flag)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
class(psb_z_vect_type), intent(inout) :: x
|
||||
class(psb_z_vect_type), intent(inout) :: y
|
||||
class(psb_z_vect_type), intent(inout) :: z
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
integer(psb_ipk_) :: i, n
|
||||
logical, intent(in) :: flag
|
||||
|
||||
info = 0
|
||||
if (allocated(x%v).and.allocated(y%v).and.allocated(z%v)) &
|
||||
& call z%v%div(x%v,y%v,info,flag)
|
||||
|
||||
end subroutine z_vect_div_v2_check
|
||||
|
||||
subroutine z_vect_div_a2(x, y, z, info)
|
||||
use psi_serial_mod
|
||||
implicit none
|
||||
|
||||
Reference in New Issue
Block a user