Implemented C interface for dist1Didx

newG2L
Cirdans-Home 4 years ago
parent 81fc75a091
commit a7ba9f7a7e

@ -10,6 +10,6 @@ psb_i_t psb_c_i_idx2ijk(psb_i_t ijk[],psb_i_t idx,psb_i_t sizes[],psb_i_t modes,
psb_i_t psb_c_l_idx2ijk(psb_i_t ijk[],psb_l_t idx,psb_i_t sizes[],psb_i_t modes,psb_i_t base); psb_i_t psb_c_l_idx2ijk(psb_i_t ijk[],psb_l_t idx,psb_i_t sizes[],psb_i_t modes,psb_i_t base);
psb_i_t psb_c_i_ijk2idx(psb_i_t ijk[],psb_i_t sizes[],psb_i_t modes,psb_i_t base); psb_i_t psb_c_i_ijk2idx(psb_i_t ijk[],psb_i_t sizes[],psb_i_t modes,psb_i_t base);
psb_l_t psb_c_l_ijk2idx(psb_i_t ijk[],psb_i_t sizes[],psb_i_t modes,psb_i_t base); psb_l_t psb_c_l_ijk2idx(psb_i_t ijk[],psb_i_t sizes[],psb_i_t modes,psb_i_t base);
psb_i_t psb_c_dist1didx(psb_i_t n, psb_i_t np, psb_i_t base, psb_i_t indexsize, psb_i_t v[]);
#endif #endif

@ -96,4 +96,29 @@ contains
end function end function
function psb_c_dist1didx(n,np,base,indexsize,v) bind(c) result(res)
use psb_base_mod, only : psb_ipk_, psb_lpk_, psb_mpk_, psb_epk_
use psb_util_mod
implicit none
integer(psb_c_ipk_) :: res
! C inputs
integer(psb_c_ipk_), value :: n
integer(psb_c_ipk_), value :: np, base, indexsize
integer(psb_c_ipk_) :: v(indexsize)
! Fortran variables
integer(psb_ipk_) :: fv(indexsize)
res = -1
call dist1Didx(fv,n,np,base)
v(1:indexsize) = fv(1:indexsize)
res = 0
end function
end module psb_base_util_cbind_mod end module psb_base_util_cbind_mod

Loading…
Cancel
Save