mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-19 04:12:09 +00:00
psblas3:
base/modules/comm/psb_c_linmap_mod.f90 base/modules/comm/psb_d_linmap_mod.f90 base/modules/comm/psb_s_linmap_mod.f90 base/modules/comm/psb_z_linmap_mod.f90 base/tools/psb_c_map.f90 base/tools/psb_d_map.f90 base/tools/psb_s_map.f90 base/tools/psb_z_map.f90 Added X_vect buffers to map_X2Y and map_Y2X: it makes a large difference on GPUs. Fixed CNV method to ignore unassembled maps.
This commit is contained in:
@@ -65,7 +65,7 @@ module psb_c_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_spk_), optional :: work(:)
|
||||
end subroutine psb_c_map_X2Y
|
||||
subroutine psb_c_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_c_map_X2Y_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_c_vect_mod, only : psb_c_vect_type
|
||||
import :: psb_ipk_, psb_spk_, psb_clinmap_type
|
||||
implicit none
|
||||
@@ -74,6 +74,7 @@ module psb_c_linmap_mod
|
||||
type(psb_c_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_spk_), optional :: work(:)
|
||||
type(psb_c_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_c_map_X2Y_vect
|
||||
end interface
|
||||
|
||||
@@ -88,7 +89,7 @@ module psb_c_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_spk_), optional :: work(:)
|
||||
end subroutine psb_c_map_Y2X
|
||||
subroutine psb_c_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_c_map_Y2X_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_c_vect_mod, only : psb_c_vect_type
|
||||
import :: psb_ipk_, psb_spk_, psb_clinmap_type
|
||||
implicit none
|
||||
@@ -97,6 +98,7 @@ module psb_c_linmap_mod
|
||||
type(psb_c_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_spk_), optional :: work(:)
|
||||
type(psb_c_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_c_map_Y2X_vect
|
||||
end interface
|
||||
|
||||
@@ -170,8 +172,9 @@ contains
|
||||
class(psb_c_base_sparse_mat), intent(in), optional :: mold
|
||||
class(psb_i_base_vect_type), intent(in), optional :: imold
|
||||
|
||||
call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_)&
|
||||
if (map%map_X2Y%is_asb())&
|
||||
& call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_ .and.map%map_Y2X%is_asb())&
|
||||
& call map%map_Y2X%cscnv(info,type=type,mold=mold)
|
||||
if (present(imold)) then
|
||||
call map%desc_X%cnv(mold=imold)
|
||||
|
||||
@@ -65,7 +65,7 @@ module psb_d_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_dpk_), optional :: work(:)
|
||||
end subroutine psb_d_map_X2Y
|
||||
subroutine psb_d_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_d_map_X2Y_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_d_vect_mod, only : psb_d_vect_type
|
||||
import :: psb_ipk_, psb_dpk_, psb_dlinmap_type
|
||||
implicit none
|
||||
@@ -74,6 +74,7 @@ module psb_d_linmap_mod
|
||||
type(psb_d_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_dpk_), optional :: work(:)
|
||||
type(psb_d_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_d_map_X2Y_vect
|
||||
end interface
|
||||
|
||||
@@ -88,7 +89,7 @@ module psb_d_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_dpk_), optional :: work(:)
|
||||
end subroutine psb_d_map_Y2X
|
||||
subroutine psb_d_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_d_map_Y2X_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_d_vect_mod, only : psb_d_vect_type
|
||||
import :: psb_ipk_, psb_dpk_, psb_dlinmap_type
|
||||
implicit none
|
||||
@@ -97,6 +98,7 @@ module psb_d_linmap_mod
|
||||
type(psb_d_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_dpk_), optional :: work(:)
|
||||
type(psb_d_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_d_map_Y2X_vect
|
||||
end interface
|
||||
|
||||
@@ -170,8 +172,9 @@ contains
|
||||
class(psb_d_base_sparse_mat), intent(in), optional :: mold
|
||||
class(psb_i_base_vect_type), intent(in), optional :: imold
|
||||
|
||||
call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_)&
|
||||
if (map%map_X2Y%is_asb())&
|
||||
& call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_ .and.map%map_Y2X%is_asb())&
|
||||
& call map%map_Y2X%cscnv(info,type=type,mold=mold)
|
||||
if (present(imold)) then
|
||||
call map%desc_X%cnv(mold=imold)
|
||||
|
||||
@@ -65,7 +65,7 @@ module psb_s_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_spk_), optional :: work(:)
|
||||
end subroutine psb_s_map_X2Y
|
||||
subroutine psb_s_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_s_map_X2Y_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_s_vect_mod, only : psb_s_vect_type
|
||||
import :: psb_ipk_, psb_spk_, psb_slinmap_type
|
||||
implicit none
|
||||
@@ -74,6 +74,7 @@ module psb_s_linmap_mod
|
||||
type(psb_s_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_spk_), optional :: work(:)
|
||||
type(psb_s_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_s_map_X2Y_vect
|
||||
end interface
|
||||
|
||||
@@ -88,7 +89,7 @@ module psb_s_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_spk_), optional :: work(:)
|
||||
end subroutine psb_s_map_Y2X
|
||||
subroutine psb_s_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_s_map_Y2X_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_s_vect_mod, only : psb_s_vect_type
|
||||
import :: psb_ipk_, psb_spk_, psb_slinmap_type
|
||||
implicit none
|
||||
@@ -97,6 +98,7 @@ module psb_s_linmap_mod
|
||||
type(psb_s_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
real(psb_spk_), optional :: work(:)
|
||||
type(psb_s_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_s_map_Y2X_vect
|
||||
end interface
|
||||
|
||||
@@ -170,8 +172,9 @@ contains
|
||||
class(psb_s_base_sparse_mat), intent(in), optional :: mold
|
||||
class(psb_i_base_vect_type), intent(in), optional :: imold
|
||||
|
||||
call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_)&
|
||||
if (map%map_X2Y%is_asb())&
|
||||
& call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_ .and.map%map_Y2X%is_asb())&
|
||||
& call map%map_Y2X%cscnv(info,type=type,mold=mold)
|
||||
if (present(imold)) then
|
||||
call map%desc_X%cnv(mold=imold)
|
||||
|
||||
@@ -65,7 +65,7 @@ module psb_z_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_dpk_), optional :: work(:)
|
||||
end subroutine psb_z_map_X2Y
|
||||
subroutine psb_z_map_X2Y_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_z_map_X2Y_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_z_vect_mod, only : psb_z_vect_type
|
||||
import :: psb_ipk_, psb_dpk_, psb_zlinmap_type
|
||||
implicit none
|
||||
@@ -74,6 +74,7 @@ module psb_z_linmap_mod
|
||||
type(psb_z_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_dpk_), optional :: work(:)
|
||||
type(psb_z_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_z_map_X2Y_vect
|
||||
end interface
|
||||
|
||||
@@ -88,7 +89,7 @@ module psb_z_linmap_mod
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_dpk_), optional :: work(:)
|
||||
end subroutine psb_z_map_Y2X
|
||||
subroutine psb_z_map_Y2X_vect(alpha,x,beta,y,map,info,work)
|
||||
subroutine psb_z_map_Y2X_vect(alpha,x,beta,y,map,info,work,vtx,vty)
|
||||
use psb_z_vect_mod, only : psb_z_vect_type
|
||||
import :: psb_ipk_, psb_dpk_, psb_zlinmap_type
|
||||
implicit none
|
||||
@@ -97,6 +98,7 @@ module psb_z_linmap_mod
|
||||
type(psb_z_vect_type), intent(inout) :: x,y
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
complex(psb_dpk_), optional :: work(:)
|
||||
type(psb_z_vect_type), optional, target, intent(inout) :: vtx,vty
|
||||
end subroutine psb_z_map_Y2X_vect
|
||||
end interface
|
||||
|
||||
@@ -170,8 +172,9 @@ contains
|
||||
class(psb_z_base_sparse_mat), intent(in), optional :: mold
|
||||
class(psb_i_base_vect_type), intent(in), optional :: imold
|
||||
|
||||
call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_)&
|
||||
if (map%map_X2Y%is_asb())&
|
||||
& call map%map_X2Y%cscnv(info,type=type,mold=mold)
|
||||
if (info == psb_success_ .and.map%map_Y2X%is_asb())&
|
||||
& call map%map_Y2X%cscnv(info,type=type,mold=mold)
|
||||
if (present(imold)) then
|
||||
call map%desc_X%cnv(mold=imold)
|
||||
|
||||
Reference in New Issue
Block a user