diff --git a/cbind/base/psb_c_dbase.h b/cbind/base/psb_c_dbase.h index 7ee41f59..ece7b840 100644 --- a/cbind/base/psb_c_dbase.h +++ b/cbind/base/psb_c_dbase.h @@ -82,8 +82,8 @@ psb_i_t psb_c_dgeinv(psb_c_dvector *xh,psb_c_dvector *yh,psb_c_descriptor *cdh); psb_i_t psb_c_dgeinv_check(psb_c_dvector *xh,psb_c_dvector *yh,psb_c_descriptor *cdh, bool flag); psb_i_t psb_c_dgeabs(psb_c_dvector *xh,psb_c_dvector *yh,psb_c_descriptor *cdh); psb_i_t psb_c_dgecmp(psb_c_dvector *xh,psb_d_t ch,psb_c_dvector *zh,psb_c_descriptor *cdh); -bool psb_c_dgecmpmat(psb_c_dspmat *ah,psb_c_dspmat *bh,psb_d_t tol,psb_c_descriptor *cdh); -bool psb_c_dgecmpmat_val(psb_c_dspmat *ah,psb_d_t val,psb_d_t tol,psb_c_descriptor *cdh); +bool psb_c_dgecmpmat(psb_c_dspmat *ah,psb_c_dspmat *bh,psb_d_t tol,psb_c_descriptor *cdh); +bool psb_c_dgecmpmat_val(psb_c_dspmat *ah,psb_d_t val,psb_d_t tol,psb_c_descriptor *cdh); psb_i_t psb_c_dgeaddconst(psb_c_dvector *xh,psb_d_t bh,psb_c_dvector *zh,psb_c_descriptor *cdh); 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); diff --git a/cbind/base/psb_c_psblas_cbind_mod.f90 b/cbind/base/psb_c_psblas_cbind_mod.f90 index 703f86a2..c849b3c6 100644 --- a/cbind/base/psb_c_psblas_cbind_mod.f90 +++ b/cbind/base/psb_c_psblas_cbind_mod.f90 @@ -465,7 +465,7 @@ contains function psb_c_cgecmpmat(ah,bh,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_cspmat) :: ah,bh type(psb_c_descriptor) :: cdh @@ -474,6 +474,7 @@ contains type(psb_cspmat_type), pointer :: ap,bp integer(psb_c_ipk_) :: info real(c_float_complex), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -491,13 +492,15 @@ contains return end if - call psb_gecmp(ap,bp,tol,descp,res,info) + call psb_gecmp(ap,bp,tol,descp,isequal,info) + + res = isequal end function psb_c_cgecmpmat function psb_c_cgecmpmat_val(ah,val,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_cspmat) :: ah type(psb_c_descriptor) :: cdh @@ -507,6 +510,7 @@ contains integer(psb_c_ipk_) :: info complex(c_float_complex), value :: val real(c_float_complex), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -519,7 +523,9 @@ contains return end if - call psb_gecmp(ap,val,tol,descp,res,info) + call psb_gecmp(ap,val,tol,descp,isequal,info) + + res = isequal end function psb_c_cgecmpmat_val diff --git a/cbind/base/psb_d_psblas_cbind_mod.f90 b/cbind/base/psb_d_psblas_cbind_mod.f90 index 198c6f79..e42725ff 100644 --- a/cbind/base/psb_d_psblas_cbind_mod.f90 +++ b/cbind/base/psb_d_psblas_cbind_mod.f90 @@ -465,7 +465,7 @@ contains function psb_c_dgecmpmat(ah,bh,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_dspmat) :: ah,bh type(psb_c_descriptor) :: cdh @@ -474,6 +474,7 @@ contains type(psb_dspmat_type), pointer :: ap,bp integer(psb_c_ipk_) :: info real(c_double), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -491,13 +492,15 @@ contains return end if - call psb_gecmp(ap,bp,tol,descp,res,info) + call psb_gecmp(ap,bp,tol,descp,isequal,info) + + res = isequal end function psb_c_dgecmpmat function psb_c_dgecmpmat_val(ah,val,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_dspmat) :: ah type(psb_c_descriptor) :: cdh @@ -507,6 +510,7 @@ contains integer(psb_c_ipk_) :: info real(c_double), value :: val real(c_double), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -519,7 +523,9 @@ contains return end if - call psb_gecmp(ap,val,tol,descp,res,info) + call psb_gecmp(ap,val,tol,descp,isequal,info) + + res = isequal end function psb_c_dgecmpmat_val diff --git a/cbind/base/psb_s_psblas_cbind_mod.f90 b/cbind/base/psb_s_psblas_cbind_mod.f90 index 96a0f304..38c6afc3 100644 --- a/cbind/base/psb_s_psblas_cbind_mod.f90 +++ b/cbind/base/psb_s_psblas_cbind_mod.f90 @@ -465,7 +465,7 @@ contains function psb_c_sgecmpmat(ah,bh,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_sspmat) :: ah,bh type(psb_c_descriptor) :: cdh @@ -474,6 +474,7 @@ contains type(psb_sspmat_type), pointer :: ap,bp integer(psb_c_ipk_) :: info real(c_float), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -491,13 +492,15 @@ contains return end if - call psb_gecmp(ap,bp,tol,descp,res,info) + call psb_gecmp(ap,bp,tol,descp,isequal,info) + + res = isequal end function psb_c_sgecmpmat function psb_c_sgecmpmat_val(ah,val,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_sspmat) :: ah type(psb_c_descriptor) :: cdh @@ -507,6 +510,7 @@ contains integer(psb_c_ipk_) :: info real(c_float), value :: val real(c_float), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -519,7 +523,9 @@ contains return end if - call psb_gecmp(ap,val,tol,descp,res,info) + call psb_gecmp(ap,val,tol,descp,isequal,info) + + res = isequal end function psb_c_sgecmpmat_val diff --git a/cbind/base/psb_z_psblas_cbind_mod.f90 b/cbind/base/psb_z_psblas_cbind_mod.f90 index fbd5797a..300eee29 100644 --- a/cbind/base/psb_z_psblas_cbind_mod.f90 +++ b/cbind/base/psb_z_psblas_cbind_mod.f90 @@ -465,7 +465,7 @@ contains function psb_c_zgecmpmat(ah,bh,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_zspmat) :: ah,bh type(psb_c_descriptor) :: cdh @@ -474,6 +474,7 @@ contains type(psb_zspmat_type), pointer :: ap,bp integer(psb_c_ipk_) :: info real(c_double_complex), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -491,13 +492,15 @@ contains return end if - call psb_gecmp(ap,bp,tol,descp,res,info) + call psb_gecmp(ap,bp,tol,descp,isequal,info) + + res = isequal end function psb_c_zgecmpmat function psb_c_zgecmpmat_val(ah,val,tol,cdh) bind(c) result(res) implicit none - logical :: res + logical(c_bool) :: res type(psb_c_zspmat) :: ah type(psb_c_descriptor) :: cdh @@ -507,6 +510,7 @@ contains integer(psb_c_ipk_) :: info complex(c_double_complex), value :: val real(c_double_complex), value :: tol + logical :: isequal if (c_associated(cdh%item)) then call c_f_pointer(cdh%item,descp) @@ -519,7 +523,9 @@ contains return end if - call psb_gecmp(ap,val,tol,descp,res,info) + call psb_gecmp(ap,val,tol,descp,isequal,info) + + res = isequal end function psb_c_zgecmpmat_val