diff --git a/cbind/base/psb_c_dbase.h b/cbind/base/psb_c_dbase.h index 0a5ea140..baa81eee 100644 --- a/cbind/base/psb_c_dbase.h +++ b/cbind/base/psb_c_dbase.h @@ -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 } diff --git a/cbind/base/psb_c_psblas_cbind_mod.f90 b/cbind/base/psb_c_psblas_cbind_mod.f90 index 57e3641f..595d6962 100644 --- a/cbind/base/psb_c_psblas_cbind_mod.f90 +++ b/cbind/base/psb_c_psblas_cbind_mod.f90 @@ -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 diff --git a/cbind/base/psb_c_sbase.h b/cbind/base/psb_c_sbase.h index fdc27834..6211f86a 100644 --- a/cbind/base/psb_c_sbase.h +++ b/cbind/base/psb_c_sbase.h @@ -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 */ diff --git a/cbind/base/psb_d_psblas_cbind_mod.f90 b/cbind/base/psb_d_psblas_cbind_mod.f90 index f644530d..143ab84b 100644 --- a/cbind/base/psb_d_psblas_cbind_mod.f90 +++ b/cbind/base/psb_d_psblas_cbind_mod.f90 @@ -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 diff --git a/cbind/base/psb_s_psblas_cbind_mod.f90 b/cbind/base/psb_s_psblas_cbind_mod.f90 index cdbb6116..cbf6fe11 100644 --- a/cbind/base/psb_s_psblas_cbind_mod.f90 +++ b/cbind/base/psb_s_psblas_cbind_mod.f90 @@ -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 diff --git a/cbind/base/psb_z_psblas_cbind_mod.f90 b/cbind/base/psb_z_psblas_cbind_mod.f90 index e6fef96b..81c1d2ca 100644 --- a/cbind/base/psb_z_psblas_cbind_mod.f90 +++ b/cbind/base/psb_z_psblas_cbind_mod.f90 @@ -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