mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
Added c interface for minimum of realtype distributed vectors
This commit is contained in:
@@ -71,6 +71,8 @@ psb_i_t psb_c_dgecmp(psb_c_dvector *xh,psb_d_t ch,psb_c_dvector *zh,psb_c_descri
|
||||
psb_d_t psb_c_dgenrm2_weight(psb_c_dvector *xh,psb_c_dvector *wh,psb_c_descriptor *cdh);
|
||||
psb_d_t psb_c_dgenrm2_weightmask(psb_c_dvector *xh,psb_c_dvector *wh,psb_c_dvector *idvh,psb_c_descriptor *cdh);
|
||||
psb_i_t psb_c_dmask(psb_c_dvector *ch,psb_c_dvector *xh,psb_c_dvector *mh, bool t, psb_c_descriptor *cdh);
|
||||
psb_d_t psb_c_dgemin(psb_c_dvector *xh,psb_c_descriptor *cdh);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -418,6 +418,7 @@ contains
|
||||
|
||||
end function psb_c_cgeamax
|
||||
|
||||
|
||||
function psb_c_cgeasum(xh,cdh) bind(c) result(res)
|
||||
implicit none
|
||||
real(c_float_complex) :: res
|
||||
|
||||
@@ -71,6 +71,8 @@ psb_i_t psb_c_sgecmp(psb_c_svector *xh,psb_s_t ch,psb_c_svector *zh,psb_c_descri
|
||||
psb_s_t psb_c_sgenrm2_weight(psb_c_svector *xh,psb_c_svector *wh,psb_c_descriptor *cdh);
|
||||
psb_s_t psb_c_sgenrm2_weightmask(psb_c_svector *xh,psb_c_svector *wh,psb_c_svector *idvh,psb_c_descriptor *cdh);
|
||||
psb_i_t psb_c_smask(psb_c_svector *ch,psb_c_svector *xh,psb_c_svector *mh, bool t, psb_c_descriptor *cdh);
|
||||
psb_s_t psb_c_sgemin(psb_c_svector *xh,psb_c_descriptor *cdh);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -461,6 +461,32 @@ contains
|
||||
|
||||
end function psb_c_dgeamax
|
||||
|
||||
function psb_c_dgemin(xh,cdh) bind(c) result(res)
|
||||
implicit none
|
||||
real(c_double) :: res
|
||||
|
||||
type(psb_c_dvector) :: xh
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_desc_type), pointer :: descp
|
||||
type(psb_d_vect_type), pointer :: xp
|
||||
integer(psb_c_ipk_) :: info
|
||||
|
||||
res = -1.0
|
||||
if (c_associated(cdh%item)) then
|
||||
call c_f_pointer(cdh%item,descp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(xh%item)) then
|
||||
call c_f_pointer(xh%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
res = psb_gemin(xp,descp,info)
|
||||
|
||||
end function psb_c_dgemin
|
||||
|
||||
function psb_c_dgeasum(xh,cdh) bind(c) result(res)
|
||||
implicit none
|
||||
real(c_double) :: res
|
||||
|
||||
@@ -461,6 +461,32 @@ contains
|
||||
|
||||
end function psb_c_sgeamax
|
||||
|
||||
function psb_c_sgemin(xh,cdh) bind(c) result(res)
|
||||
implicit none
|
||||
real(c_float) :: res
|
||||
|
||||
type(psb_c_svector) :: xh
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_desc_type), pointer :: descp
|
||||
type(psb_s_vect_type), pointer :: xp
|
||||
integer(psb_c_ipk_) :: info
|
||||
|
||||
res = -1.0
|
||||
if (c_associated(cdh%item)) then
|
||||
call c_f_pointer(cdh%item,descp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(xh%item)) then
|
||||
call c_f_pointer(xh%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
res = psb_gemin(xp,descp,info)
|
||||
|
||||
end function psb_c_sgemin
|
||||
|
||||
function psb_c_sgeasum(xh,cdh) bind(c) result(res)
|
||||
implicit none
|
||||
real(c_float) :: res
|
||||
|
||||
@@ -418,6 +418,7 @@ contains
|
||||
|
||||
end function psb_c_zgeamax
|
||||
|
||||
|
||||
function psb_c_zgeasum(xh,cdh) bind(c) result(res)
|
||||
implicit none
|
||||
real(c_double_complex) :: res
|
||||
|
||||
Reference in New Issue
Block a user