mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-18 11:52:11 +00:00
psblas3:
base/modules/psb_c_mat_mod.f90 base/modules/psb_d_mat_mod.f90 base/modules/psb_s_mat_mod.f90 base/modules/psb_z_mat_mod.f90 base/serial/impl/psb_c_mat_impl.F90 base/serial/impl/psb_d_mat_impl.F90 base/serial/impl/psb_s_mat_impl.F90 base/serial/impl/psb_z_mat_impl.F90 util/psb_d_renum_impl.F90 util/psb_renum_mod.f90 psblas3: defined MOLD method for _SPMAT_TYPE containers.
This commit is contained in:
@@ -121,6 +121,7 @@ module psb_c_mat_mod
|
||||
generic, public :: cp_from => c_cp_from
|
||||
procedure, pass(a) :: c_cp_to => psb_c_cp_to
|
||||
generic, public :: cp_to => c_cp_to
|
||||
procedure, pass(a) :: mold => psb_c_mold
|
||||
procedure, pass(a) :: c_transp_1mat => psb_c_transp_1mat
|
||||
procedure, pass(a) :: c_transp_2mat => psb_c_transp_2mat
|
||||
generic, public :: transp => c_transp_1mat, c_transp_2mat
|
||||
@@ -514,7 +515,6 @@ module psb_c_mat_mod
|
||||
end subroutine psb_cspmat_type_move
|
||||
end interface
|
||||
|
||||
|
||||
interface psb_clone
|
||||
subroutine psb_cspmat_type_clone(a,b,info)
|
||||
import :: psb_cspmat_type
|
||||
@@ -523,7 +523,15 @@ module psb_c_mat_mod
|
||||
integer, intent(out) :: info
|
||||
end subroutine psb_cspmat_type_clone
|
||||
end interface
|
||||
|
||||
|
||||
interface
|
||||
subroutine psb_c_mold(a,b)
|
||||
import :: psb_cspmat_type, psb_c_base_sparse_mat
|
||||
class(psb_cspmat_type), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), allocatable, intent(out) :: b
|
||||
end subroutine psb_c_mold
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_c_transp_1mat(a)
|
||||
import :: psb_cspmat_type
|
||||
|
||||
@@ -120,7 +120,7 @@ module psb_d_mat_mod
|
||||
generic, public :: cp_from => d_cp_from
|
||||
procedure, pass(a) :: d_cp_to => psb_d_cp_to
|
||||
generic, public :: cp_to => d_cp_to
|
||||
procedure, pass(a) :: extract => psb_d_extract
|
||||
procedure, pass(a) :: mold => psb_d_mold
|
||||
procedure, pass(a) :: d_transp_1mat => psb_d_transp_1mat
|
||||
procedure, pass(a) :: d_transp_2mat => psb_d_transp_2mat
|
||||
generic, public :: transp => d_transp_1mat, d_transp_2mat
|
||||
@@ -519,7 +519,6 @@ module psb_d_mat_mod
|
||||
end subroutine psb_dspmat_type_move
|
||||
end interface
|
||||
|
||||
|
||||
interface psb_clone
|
||||
subroutine psb_dspmat_type_clone(a,b,info)
|
||||
import :: psb_dspmat_type
|
||||
@@ -529,6 +528,14 @@ module psb_d_mat_mod
|
||||
end subroutine psb_dspmat_type_clone
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_d_mold(a,b)
|
||||
import :: psb_dspmat_type, psb_d_base_sparse_mat
|
||||
class(psb_dspmat_type), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), allocatable, intent(out) :: b
|
||||
end subroutine psb_d_mold
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_d_transp_1mat(a)
|
||||
import :: psb_dspmat_type
|
||||
@@ -700,8 +707,6 @@ module psb_d_mat_mod
|
||||
end interface
|
||||
|
||||
|
||||
|
||||
|
||||
contains
|
||||
|
||||
|
||||
@@ -956,12 +961,4 @@ contains
|
||||
|
||||
end function psb_d_get_nz_row
|
||||
|
||||
subroutine psb_d_extract(a,b)
|
||||
implicit none
|
||||
class(psb_dspmat_type), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), allocatable, intent(out) :: b
|
||||
|
||||
call move_alloc(a%a,b)
|
||||
end subroutine psb_d_extract
|
||||
|
||||
end module psb_d_mat_mod
|
||||
|
||||
@@ -121,6 +121,7 @@ module psb_s_mat_mod
|
||||
generic, public :: cp_from => s_cp_from
|
||||
procedure, pass(a) :: s_cp_to => psb_s_cp_to
|
||||
generic, public :: cp_to => s_cp_to
|
||||
procedure, pass(a) :: mold => psb_s_mold
|
||||
procedure, pass(a) :: s_transp_1mat => psb_s_transp_1mat
|
||||
procedure, pass(a) :: s_transp_2mat => psb_s_transp_2mat
|
||||
generic, public :: transp => s_transp_1mat, s_transp_2mat
|
||||
@@ -512,8 +513,7 @@ module psb_s_mat_mod
|
||||
class(psb_sspmat_type), intent(out) :: b
|
||||
integer, intent(out) :: info
|
||||
end subroutine psb_sspmat_type_move
|
||||
end interface
|
||||
|
||||
end interface psb_move_alloc
|
||||
|
||||
interface psb_clone
|
||||
subroutine psb_sspmat_type_clone(a,b,info)
|
||||
@@ -524,6 +524,14 @@ module psb_s_mat_mod
|
||||
end subroutine psb_sspmat_type_clone
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_s_mold(a,b)
|
||||
import :: psb_sspmat_type, psb_s_base_sparse_mat
|
||||
class(psb_sspmat_type), intent(inout) :: a
|
||||
class(psb_s_base_sparse_mat), allocatable, intent(out) :: b
|
||||
end subroutine psb_s_mold
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_s_transp_1mat(a)
|
||||
import :: psb_sspmat_type
|
||||
|
||||
@@ -121,6 +121,7 @@ module psb_z_mat_mod
|
||||
generic, public :: cp_from => z_cp_from
|
||||
procedure, pass(a) :: z_cp_to => psb_z_cp_to
|
||||
generic, public :: cp_to => z_cp_to
|
||||
procedure, pass(a) :: mold => psb_z_mold
|
||||
procedure, pass(a) :: z_transp_1mat => psb_z_transp_1mat
|
||||
procedure, pass(a) :: z_transp_2mat => psb_z_transp_2mat
|
||||
generic, public :: transp => z_transp_1mat, z_transp_2mat
|
||||
@@ -513,7 +514,6 @@ module psb_z_mat_mod
|
||||
end subroutine psb_zspmat_type_move
|
||||
end interface
|
||||
|
||||
|
||||
interface psb_clone
|
||||
subroutine psb_zspmat_type_clone(a,b,info)
|
||||
import :: psb_zspmat_type
|
||||
@@ -522,6 +522,14 @@ module psb_z_mat_mod
|
||||
integer, intent(out) :: info
|
||||
end subroutine psb_zspmat_type_clone
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_z_mold(a,b)
|
||||
import :: psb_zspmat_type, psb_z_base_sparse_mat
|
||||
class(psb_zspmat_type), intent(inout) :: a
|
||||
class(psb_z_base_sparse_mat), allocatable, intent(out) :: b
|
||||
end subroutine psb_z_mold
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine psb_z_transp_1mat(a)
|
||||
|
||||
@@ -1474,7 +1474,18 @@ subroutine psb_c_cp_to(a,b)
|
||||
return
|
||||
end subroutine psb_c_cp_to
|
||||
|
||||
|
||||
subroutine psb_c_mold(a,b)
|
||||
use psb_c_mat_mod, psb_protect_name => psb_c_mold
|
||||
class(psb_cspmat_type), intent(inout) :: a
|
||||
class(psb_c_base_sparse_mat), allocatable, intent(out) :: b
|
||||
integer :: info
|
||||
#if defined(HAVE_MOLD)
|
||||
allocate(b,mold=a%a, stat=info)
|
||||
#else
|
||||
call a%a%mold(b,info)
|
||||
#endif
|
||||
|
||||
end subroutine psb_c_mold
|
||||
|
||||
subroutine psb_cspmat_type_move(a,b,info)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1474,7 +1474,18 @@ subroutine psb_d_cp_to(a,b)
|
||||
return
|
||||
end subroutine psb_d_cp_to
|
||||
|
||||
|
||||
subroutine psb_d_mold(a,b)
|
||||
use psb_d_mat_mod, psb_protect_name => psb_d_mold
|
||||
class(psb_dspmat_type), intent(inout) :: a
|
||||
class(psb_d_base_sparse_mat), allocatable, intent(out) :: b
|
||||
integer :: info
|
||||
#if defined(HAVE_MOLD)
|
||||
allocate(b,mold=a%a, stat=info)
|
||||
#else
|
||||
call a%a%mold(b,info)
|
||||
#endif
|
||||
|
||||
end subroutine psb_d_mold
|
||||
|
||||
subroutine psb_dspmat_type_move(a,b,info)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1472,7 +1472,18 @@ subroutine psb_s_cp_to(a,b)
|
||||
return
|
||||
end subroutine psb_s_cp_to
|
||||
|
||||
|
||||
subroutine psb_s_mold(a,b)
|
||||
use psb_s_mat_mod, psb_protect_name => psb_s_mold
|
||||
class(psb_sspmat_type), intent(inout) :: a
|
||||
class(psb_s_base_sparse_mat), allocatable, intent(out) :: b
|
||||
integer :: info
|
||||
#if defined(HAVE_MOLD)
|
||||
allocate(b,mold=a%a, stat=info)
|
||||
#else
|
||||
call a%a%mold(b,info)
|
||||
#endif
|
||||
|
||||
end subroutine psb_s_mold
|
||||
|
||||
subroutine psb_sspmat_type_move(a,b,info)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1473,7 +1473,18 @@ subroutine psb_z_cp_to(a,b)
|
||||
return
|
||||
end subroutine psb_z_cp_to
|
||||
|
||||
|
||||
subroutine psb_z_mold(a,b)
|
||||
use psb_z_mat_mod, psb_protect_name => psb_z_mold
|
||||
class(psb_zspmat_type), intent(inout) :: a
|
||||
class(psb_z_base_sparse_mat), allocatable, intent(out) :: b
|
||||
integer :: info
|
||||
#if defined(HAVE_MOLD)
|
||||
allocate(b,mold=a%a, stat=info)
|
||||
#else
|
||||
call a%a%mold(b,info)
|
||||
#endif
|
||||
|
||||
end subroutine psb_z_mold
|
||||
|
||||
subroutine psb_zspmat_type_move(a,b,info)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -65,7 +65,8 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
|
||||
call a%extract(aa)
|
||||
call a%mold(aa)
|
||||
call a%mv_to(aa)
|
||||
call aa%mv_to_fmt(acsr,info)
|
||||
! Insert call to gps_reduce
|
||||
|
||||
|
||||
@@ -13,5 +13,4 @@ module psb_renum_mod
|
||||
end subroutine psb_d_mat_renum
|
||||
end interface psb_mat_renum
|
||||
|
||||
|
||||
end module psb_renum_mod
|
||||
|
||||
Reference in New Issue
Block a user