Added C interface psb_c_cd_get_global_indices for descriptor objects

pizdaint-runs
Cirdans-Home 5 years ago
parent 3c3470b50e
commit ac3afe962d

@ -301,5 +301,34 @@ contains
end function psb_c_cd_get_global_cols
function psb_c_cd_get_global_indices(idx,nidx,owned,cdh) bind(c,name='psb_c_cd_get_global_indices') result(res)
implicit none
integer(psb_c_ipk_) :: res
type(psb_c_object_type) :: cdh
integer(psb_c_lpk_) :: idx(nidx)
integer(psb_c_ipk_), value :: nidx
logical(c_bool), value :: owned
type(psb_desc_type), pointer :: descp
integer(psb_lpk_), allocatable :: myidx(:)
logical :: fowned
res = -1
if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp)
fowned = owned
myidx = descp%get_global_indices(owned=fowned)
idx(1:nidx) = myidx(1:nidx)
res = 0
end if
end function psb_c_cd_get_global_indices
end module psb_base_tools_cbind_mod

@ -91,7 +91,7 @@ extern "C" {
psb_i_t psb_c_cd_get_local_cols(psb_c_descriptor *cd);
psb_l_t psb_c_cd_get_global_rows(psb_c_descriptor *cd);
psb_l_t psb_c_cd_get_global_rows(psb_c_descriptor *cd);
psb_i_t psb_c_cd_get_global_indices(psb_l_t idx[], psb_i_t nidx, bool owned, psb_c_descriptor *cd);
/* legal values for upd argument */
#define psb_upd_srch_ 98764

Loading…
Cancel
Save