Added C interface to psb_cmp_ctxt

newG2L
Cirdans-Home 4 years ago
parent 734041d90f
commit 411d2dcdf0

@ -66,6 +66,7 @@ extern "C" {
void psb_c_barrier(psb_c_ctxt cctxt); void psb_c_barrier(psb_c_ctxt cctxt);
void psb_c_info(psb_c_ctxt cctxt, psb_i_t *iam, psb_i_t *np); void psb_c_info(psb_c_ctxt cctxt, psb_i_t *iam, psb_i_t *np);
void psb_c_get_i_ctxt(psb_c_ctxt cctxt, psb_i_t *ictxt, psb_i_t *info); void psb_c_get_i_ctxt(psb_c_ctxt cctxt, psb_i_t *ictxt, psb_i_t *info);
bool psb_c_cmp_ctxt(psb_c_ctxt cctxt1, psb_c_ctxt cctxt2);
psb_d_t psb_c_wtime(); psb_d_t psb_c_wtime();
psb_i_t psb_c_get_errstatus(); psb_i_t psb_c_get_errstatus();

@ -78,6 +78,23 @@ contains
end subroutine end subroutine
function psb_c_cmp_ctxt(cctxt1, cctxt2) result(res)
implicit none
type(psb_c_object_type), value :: cctxt1, cctxt2
logical(c_bool) :: res
logical :: equal
type(psb_ctxt_type), pointer :: ctxt1, ctxt2
ctxt1 => psb_c2f_ctxt(cctxt1)
ctxt2 => psb_c2f_ctxt(cctxt2)
equal = psb_cmp_ctxt(ctxt1, ctxt2)
res = equal
end
subroutine psb_c_exit_ctxt(cctxt) bind(c) subroutine psb_c_exit_ctxt(cctxt) bind(c)
use psb_base_mod, only : psb_exit, psb_ctxt_type use psb_base_mod, only : psb_exit, psb_ctxt_type
type(psb_c_object_type), value :: cctxt type(psb_c_object_type), value :: cctxt

Loading…
Cancel
Save