Changed names to match header

newG2L
Cirdans-Home 4 years ago
parent 50da50f557
commit 91c328baba

@ -3,150 +3,150 @@ module psb_c_comm_cbind_mod
use psb_base_mod use psb_base_mod
use psb_objhandle_mod use psb_objhandle_mod
use psb_base_string_cbind_mod use psb_base_string_cbind_mod
contains contains
function psb_c_c_ovrl(xh,cdh) bind(c) result(res) function psb_c_covrl(xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_cvector) :: xh type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: xp type(psb_c_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info) call psb_ovrl(xp,descp,info)
res = info res = info
end function psb_c_c_ovrl end function psb_c_covrl
function psb_c_c_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) function psb_c_covrl_opt(xh,cdh,update,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: update, mode integer(psb_c_ipk_), value :: update, mode
type(psb_c_cvector) :: xh type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: xp type(psb_c_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info,update=update,mode=mode) call psb_ovrl(xp,descp,info,update=update,mode=mode)
res = info res = info
end function psb_c_c_ovrl_opt end function psb_c_covrl_opt
function psb_c_chalo(xh,cdh) bind(c) result(res)
function psb_c_c_halo(xh,cdh) bind(c) result(res) implicit none
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_cvector) :: xh type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: xp type(psb_c_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_halo(xp,descp,info) call psb_halo(xp,descp,info)
res = info res = info
end function psb_c_c_halo end function psb_c_chalo
function psb_c_c_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) function psb_c_chalo_opt(xh,cdh,tran,data,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: data, mode integer(psb_c_ipk_), value :: data, mode
character(c_char) :: tran character(c_char) :: tran
type(psb_c_cvector) :: xh type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: xp type(psb_c_vect_type), pointer :: xp
character :: ftran character :: ftran
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
ftran = tran ftran = tran
call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran) call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran)
res = info res = info
end function psb_c_c_halo_opt
end function psb_c_chalo_opt
function psb_c_c_vscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
function psb_c_cvscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_lpk_), value :: ng integer(psb_c_lpk_), value :: ng
complex(c_float_complex), target :: gx(*) complex(c_float_complex), target :: gx(*)
type(psb_c_cvector) :: xh type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: vp type(psb_c_vect_type), pointer :: vp
complex(psb_spk_), pointer :: pgx(:) complex(psb_spk_), pointer :: pgx(:)
@ -154,32 +154,32 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
pgx => gx(1:ng) pgx => gx(1:ng)
call psb_scatter(pgx,vp,descp,info) call psb_scatter(pgx,vp,descp,info)
res = info res = info
end function psb_c_cvscatter
end function psb_c_c_vscatter
function psb_c_cvgather(v,xh,cdh) bind(c) result(res) function psb_c_cvgather(v,xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
complex(c_float_complex), target :: v(*) complex(c_float_complex), target :: v(*)
type(psb_c_cvector) :: xh type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: vp type(psb_c_vect_type), pointer :: vp
complex(psb_spk_), allocatable :: fv(:) complex(psb_spk_), allocatable :: fv(:)
@ -187,53 +187,53 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
call psb_gather(fv,vp,descp,info) call psb_gather(fv,vp,descp,info)
res = info res = info
if (res /=0) return if (res /=0) return
sz = size(fv) sz = size(fv)
v(1:sz) = fv(1:sz) v(1:sz) = fv(1:sz)
end function psb_c_cvgather end function psb_c_cvgather
function psb_c_cspgather(gah,ah,cdh) bind(c) result(res) function psb_c_cspgather(gah,ah,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_cspmat) :: ah, gah type(psb_c_cspmat) :: ah, gah
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_cspmat_type), pointer :: ap, gap type(psb_cspmat_type), pointer :: ap, gap
integer(psb_c_ipk_) :: info, sz integer(psb_c_ipk_) :: info, sz
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(ah%item)) then if (c_associated(ah%item)) then
call c_f_pointer(ah%item,ap) call c_f_pointer(ah%item,ap)
else else
return return
end if end if
if (c_associated(gah%item)) then if (c_associated(gah%item)) then
call c_f_pointer(gah%item,gap) call c_f_pointer(gah%item,gap)
else else
return return
end if end if
call psb_gather(gap,ap,descp,info) call psb_gather(gap,ap,descp,info)
res = info res = info
end function psb_c_cspgather end function psb_c_cspgather
end module psb_c_comm_cbind_mod end module psb_c_comm_cbind_mod

@ -3,150 +3,150 @@ module psb_d_comm_cbind_mod
use psb_base_mod use psb_base_mod
use psb_objhandle_mod use psb_objhandle_mod
use psb_base_string_cbind_mod use psb_base_string_cbind_mod
contains contains
function psb_c_d_ovrl(xh,cdh) bind(c) result(res) function psb_c_dovrl(xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_dvector) :: xh type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: xp type(psb_d_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info) call psb_ovrl(xp,descp,info)
res = info res = info
end function psb_c_d_ovrl end function psb_c_dovrl
function psb_c_d_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) function psb_c_dovrl_opt(xh,cdh,update,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: update, mode integer(psb_c_ipk_), value :: update, mode
type(psb_c_dvector) :: xh type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: xp type(psb_d_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info,update=update,mode=mode) call psb_ovrl(xp,descp,info,update=update,mode=mode)
res = info res = info
end function psb_c_d_ovrl_opt end function psb_c_dovrl_opt
function psb_c_dhalo(xh,cdh) bind(c) result(res)
function psb_c_d_halo(xh,cdh) bind(c) result(res) implicit none
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_dvector) :: xh type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: xp type(psb_d_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_halo(xp,descp,info) call psb_halo(xp,descp,info)
res = info res = info
end function psb_c_d_halo end function psb_c_dhalo
function psb_c_d_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) function psb_c_dhalo_opt(xh,cdh,tran,data,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: data, mode integer(psb_c_ipk_), value :: data, mode
character(c_char) :: tran character(c_char) :: tran
type(psb_c_dvector) :: xh type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: xp type(psb_d_vect_type), pointer :: xp
character :: ftran character :: ftran
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
ftran = tran ftran = tran
call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran) call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran)
res = info res = info
end function psb_c_d_halo_opt
end function psb_c_dhalo_opt
function psb_c_d_vscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
function psb_c_dvscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_lpk_), value :: ng integer(psb_c_lpk_), value :: ng
real(c_double), target :: gx(*) real(c_double), target :: gx(*)
type(psb_c_dvector) :: xh type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: vp type(psb_d_vect_type), pointer :: vp
real(psb_dpk_), pointer :: pgx(:) real(psb_dpk_), pointer :: pgx(:)
@ -154,32 +154,32 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
pgx => gx(1:ng) pgx => gx(1:ng)
call psb_scatter(pgx,vp,descp,info) call psb_scatter(pgx,vp,descp,info)
res = info res = info
end function psb_c_dvscatter
end function psb_c_d_vscatter
function psb_c_dvgather(v,xh,cdh) bind(c) result(res) function psb_c_dvgather(v,xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
real(c_double), target :: v(*) real(c_double), target :: v(*)
type(psb_c_dvector) :: xh type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: vp type(psb_d_vect_type), pointer :: vp
real(psb_dpk_), allocatable :: fv(:) real(psb_dpk_), allocatable :: fv(:)
@ -187,53 +187,53 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
call psb_gather(fv,vp,descp,info) call psb_gather(fv,vp,descp,info)
res = info res = info
if (res /=0) return if (res /=0) return
sz = size(fv) sz = size(fv)
v(1:sz) = fv(1:sz) v(1:sz) = fv(1:sz)
end function psb_c_dvgather end function psb_c_dvgather
function psb_c_dspgather(gah,ah,cdh) bind(c) result(res) function psb_c_dspgather(gah,ah,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_dspmat) :: ah, gah type(psb_c_dspmat) :: ah, gah
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_dspmat_type), pointer :: ap, gap type(psb_dspmat_type), pointer :: ap, gap
integer(psb_c_ipk_) :: info, sz integer(psb_c_ipk_) :: info, sz
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(ah%item)) then if (c_associated(ah%item)) then
call c_f_pointer(ah%item,ap) call c_f_pointer(ah%item,ap)
else else
return return
end if end if
if (c_associated(gah%item)) then if (c_associated(gah%item)) then
call c_f_pointer(gah%item,gap) call c_f_pointer(gah%item,gap)
else else
return return
end if end if
call psb_gather(gap,ap,descp,info) call psb_gather(gap,ap,descp,info)
res = info res = info
end function psb_c_dspgather end function psb_c_dspgather
end module psb_d_comm_cbind_mod end module psb_d_comm_cbind_mod

@ -3,150 +3,150 @@ module psb_s_comm_cbind_mod
use psb_base_mod use psb_base_mod
use psb_objhandle_mod use psb_objhandle_mod
use psb_base_string_cbind_mod use psb_base_string_cbind_mod
contains contains
function psb_c_s_ovrl(xh,cdh) bind(c) result(res) function psb_c_sovrl(xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_svector) :: xh type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: xp type(psb_s_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info) call psb_ovrl(xp,descp,info)
res = info res = info
end function psb_c_s_ovrl end function psb_c_sovrl
function psb_c_s_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) function psb_c_sovrl_opt(xh,cdh,update,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: update, mode integer(psb_c_ipk_), value :: update, mode
type(psb_c_svector) :: xh type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: xp type(psb_s_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info,update=update,mode=mode) call psb_ovrl(xp,descp,info,update=update,mode=mode)
res = info res = info
end function psb_c_s_ovrl_opt end function psb_c_sovrl_opt
function psb_c_shalo(xh,cdh) bind(c) result(res)
function psb_c_s_halo(xh,cdh) bind(c) result(res) implicit none
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_svector) :: xh type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: xp type(psb_s_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_halo(xp,descp,info) call psb_halo(xp,descp,info)
res = info res = info
end function psb_c_s_halo end function psb_c_shalo
function psb_c_s_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) function psb_c_shalo_opt(xh,cdh,tran,data,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: data, mode integer(psb_c_ipk_), value :: data, mode
character(c_char) :: tran character(c_char) :: tran
type(psb_c_svector) :: xh type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: xp type(psb_s_vect_type), pointer :: xp
character :: ftran character :: ftran
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
ftran = tran ftran = tran
call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran) call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran)
res = info res = info
end function psb_c_s_halo_opt
end function psb_c_shalo_opt
function psb_c_s_vscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
function psb_c_svscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_lpk_), value :: ng integer(psb_c_lpk_), value :: ng
real(c_float), target :: gx(*) real(c_float), target :: gx(*)
type(psb_c_svector) :: xh type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: vp type(psb_s_vect_type), pointer :: vp
real(psb_spk_), pointer :: pgx(:) real(psb_spk_), pointer :: pgx(:)
@ -154,32 +154,32 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
pgx => gx(1:ng) pgx => gx(1:ng)
call psb_scatter(pgx,vp,descp,info) call psb_scatter(pgx,vp,descp,info)
res = info res = info
end function psb_c_svscatter
end function psb_c_s_vscatter
function psb_c_svgather(v,xh,cdh) bind(c) result(res) function psb_c_svgather(v,xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
real(c_float), target :: v(*) real(c_float), target :: v(*)
type(psb_c_svector) :: xh type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: vp type(psb_s_vect_type), pointer :: vp
real(psb_spk_), allocatable :: fv(:) real(psb_spk_), allocatable :: fv(:)
@ -187,53 +187,53 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
call psb_gather(fv,vp,descp,info) call psb_gather(fv,vp,descp,info)
res = info res = info
if (res /=0) return if (res /=0) return
sz = size(fv) sz = size(fv)
v(1:sz) = fv(1:sz) v(1:sz) = fv(1:sz)
end function psb_c_svgather end function psb_c_svgather
function psb_c_sspgather(gah,ah,cdh) bind(c) result(res) function psb_c_sspgather(gah,ah,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_sspmat) :: ah, gah type(psb_c_sspmat) :: ah, gah
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_sspmat_type), pointer :: ap, gap type(psb_sspmat_type), pointer :: ap, gap
integer(psb_c_ipk_) :: info, sz integer(psb_c_ipk_) :: info, sz
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(ah%item)) then if (c_associated(ah%item)) then
call c_f_pointer(ah%item,ap) call c_f_pointer(ah%item,ap)
else else
return return
end if end if
if (c_associated(gah%item)) then if (c_associated(gah%item)) then
call c_f_pointer(gah%item,gap) call c_f_pointer(gah%item,gap)
else else
return return
end if end if
call psb_gather(gap,ap,descp,info) call psb_gather(gap,ap,descp,info)
res = info res = info
end function psb_c_sspgather end function psb_c_sspgather
end module psb_s_comm_cbind_mod end module psb_s_comm_cbind_mod

@ -3,150 +3,150 @@ module psb_z_comm_cbind_mod
use psb_base_mod use psb_base_mod
use psb_objhandle_mod use psb_objhandle_mod
use psb_base_string_cbind_mod use psb_base_string_cbind_mod
contains contains
function psb_c_z_ovrl(xh,cdh) bind(c) result(res) function psb_c_zovrl(xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_zvector) :: xh type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: xp type(psb_z_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info) call psb_ovrl(xp,descp,info)
res = info res = info
end function psb_c_z_ovrl end function psb_c_zovrl
function psb_c_z_ovrl_opt(xh,cdh,update,mode) bind(c) result(res) function psb_c_zovrl_opt(xh,cdh,update,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: update, mode integer(psb_c_ipk_), value :: update, mode
type(psb_c_zvector) :: xh type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: xp type(psb_z_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_ovrl(xp,descp,info,update=update,mode=mode) call psb_ovrl(xp,descp,info,update=update,mode=mode)
res = info res = info
end function psb_c_z_ovrl_opt end function psb_c_zovrl_opt
function psb_c_zhalo(xh,cdh) bind(c) result(res)
function psb_c_z_halo(xh,cdh) bind(c) result(res) implicit none
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_zvector) :: xh type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: xp type(psb_z_vect_type), pointer :: xp
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
call psb_halo(xp,descp,info) call psb_halo(xp,descp,info)
res = info res = info
end function psb_c_z_halo end function psb_c_zhalo
function psb_c_z_halo_opt(xh,cdh,tran,data,mode) bind(c) result(res) function psb_c_zhalo_opt(xh,cdh,tran,data,mode) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_ipk_), value :: data, mode integer(psb_c_ipk_), value :: data, mode
character(c_char) :: tran character(c_char) :: tran
type(psb_c_zvector) :: xh type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: xp type(psb_z_vect_type), pointer :: xp
character :: ftran character :: ftran
integer(psb_c_ipk_) :: info integer(psb_c_ipk_) :: info
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp) call c_f_pointer(xh%item,xp)
else else
return return
end if end if
ftran = tran ftran = tran
call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran) call psb_halo(xp,descp,info,data=data,mode=mode,tran=ftran)
res = info res = info
end function psb_c_z_halo_opt
end function psb_c_zhalo_opt
function psb_c_z_vscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
function psb_c_zvscatter(ng,gx,xh,cdh) bind(c) result(res)
implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
integer(psb_c_lpk_), value :: ng integer(psb_c_lpk_), value :: ng
complex(c_double_complex), target :: gx(*) complex(c_double_complex), target :: gx(*)
type(psb_c_zvector) :: xh type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: vp type(psb_z_vect_type), pointer :: vp
complex(psb_dpk_), pointer :: pgx(:) complex(psb_dpk_), pointer :: pgx(:)
@ -154,32 +154,32 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
pgx => gx(1:ng) pgx => gx(1:ng)
call psb_scatter(pgx,vp,descp,info) call psb_scatter(pgx,vp,descp,info)
res = info res = info
end function psb_c_zvscatter
end function psb_c_z_vscatter
function psb_c_zvgather(v,xh,cdh) bind(c) result(res) function psb_c_zvgather(v,xh,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
complex(c_double_complex), target :: v(*) complex(c_double_complex), target :: v(*)
type(psb_c_zvector) :: xh type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: vp type(psb_z_vect_type), pointer :: vp
complex(psb_dpk_), allocatable :: fv(:) complex(psb_dpk_), allocatable :: fv(:)
@ -187,53 +187,53 @@ contains
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(xh%item)) then if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp) call c_f_pointer(xh%item,vp)
else else
return return
end if end if
call psb_gather(fv,vp,descp,info) call psb_gather(fv,vp,descp,info)
res = info res = info
if (res /=0) return if (res /=0) return
sz = size(fv) sz = size(fv)
v(1:sz) = fv(1:sz) v(1:sz) = fv(1:sz)
end function psb_c_zvgather end function psb_c_zvgather
function psb_c_zspgather(gah,ah,cdh) bind(c) result(res) function psb_c_zspgather(gah,ah,cdh) bind(c) result(res)
implicit none implicit none
integer(psb_c_ipk_) :: res integer(psb_c_ipk_) :: res
type(psb_c_zspmat) :: ah, gah type(psb_c_zspmat) :: ah, gah
type(psb_c_descriptor) :: cdh type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp type(psb_desc_type), pointer :: descp
type(psb_zspmat_type), pointer :: ap, gap type(psb_zspmat_type), pointer :: ap, gap
integer(psb_c_ipk_) :: info, sz integer(psb_c_ipk_) :: info, sz
res = -1 res = -1
if (c_associated(cdh%item)) then if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp) call c_f_pointer(cdh%item,descp)
else else
return return
end if end if
if (c_associated(ah%item)) then if (c_associated(ah%item)) then
call c_f_pointer(ah%item,ap) call c_f_pointer(ah%item,ap)
else else
return return
end if end if
if (c_associated(gah%item)) then if (c_associated(gah%item)) then
call c_f_pointer(gah%item,gap) call c_f_pointer(gah%item,gap)
else else
return return
end if end if
call psb_gather(gap,ap,descp,info) call psb_gather(gap,ap,descp,info)
res = info res = info
end function psb_c_zspgather end function psb_c_zspgather
end module psb_z_comm_cbind_mod end module psb_z_comm_cbind_mod

Loading…
Cancel
Save