Added function psb_c_dvect_f_get_pnt to get pointer to vector data structure

merge-paraggr-newops
Cirdans-Home 5 years ago
parent 44f05510bc
commit 177bc6ecb3

@ -21,6 +21,7 @@ psb_i_t psb_c_cvect_get_nrows(psb_c_cvector *xh);
psb_c_t *psb_c_cvect_get_cpy( psb_c_cvector *xh);
psb_i_t psb_c_cvect_f_get_cpy(psb_c_t *v, psb_c_cvector *xh);
psb_i_t psb_c_cvect_zero(psb_c_cvector *xh);
psb_i_t *psb_c_cvect_f_get_pnt(psb_c_cvector *xh);
psb_i_t psb_c_cgeall(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_cgeins(psb_i_t nz, const psb_l_t *irw, const psb_c_t *val,

@ -21,6 +21,7 @@ psb_i_t psb_c_dvect_get_nrows(psb_c_dvector *xh);
psb_d_t *psb_c_dvect_get_cpy( psb_c_dvector *xh);
psb_i_t psb_c_dvect_f_get_cpy(psb_d_t *v, psb_c_dvector *xh);
psb_i_t psb_c_dvect_zero(psb_c_dvector *xh);
psb_d_t *psb_c_dvect_f_get_pnt( psb_c_dvector *xh);
psb_i_t psb_c_dgeall(psb_c_dvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_dgeins(psb_i_t nz, const psb_l_t *irw, const psb_d_t *val,

@ -21,6 +21,7 @@ psb_i_t psb_c_svect_get_nrows(psb_c_svector *xh);
psb_s_t *psb_c_svect_get_cpy( psb_c_svector *xh);
psb_i_t psb_c_svect_f_get_cpy(psb_s_t *v, psb_c_svector *xh);
psb_i_t psb_c_svect_zero(psb_c_svector *xh);
psb_s_t *psb_c_svect_f_get_pnt( psb_c_svector *xh);
psb_i_t psb_c_sgeall(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_sgeins(psb_i_t nz, const psb_l_t *irw, const psb_s_t *val,

@ -67,6 +67,24 @@ contains
end function psb_c_cvect_zero
function psb_c_cvect_f_get_pnt(xh) bind(c) result(res)
implicit none
type(c_ptr) :: res
type(psb_c_cvector) :: xh
type(psb_c_vect_type), pointer :: vp
res = c_null_ptr
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp)
if(vp%is_dev()) call vp%sync()
res = c_loc(vp%v%v)
end if
end function psb_c_cvect_f_get_pnt
function psb_c_cmat_get_nrows(mh) bind(c) result(res)
use psb_base_mod
@ -141,4 +159,3 @@ contains
end module psb_c_serial_cbind_mod

@ -21,6 +21,7 @@ psb_i_t psb_c_zvect_get_nrows(psb_c_zvector *xh);
psb_z_t *psb_c_zvect_get_cpy( psb_c_zvector *xh);
psb_i_t psb_c_zvect_f_get_cpy(psb_z_t *v, psb_c_zvector *xh);
psb_i_t psb_c_zvect_zero(psb_c_zvector *xh);
psb_z_t *psb_c_zvect_f_get_pnt( psb_c_zvector *xh);
psb_i_t psb_c_zgeall(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_zgeins(psb_i_t nz, const psb_l_t *irw, const psb_z_t *val,

@ -67,6 +67,24 @@ contains
end function psb_c_dvect_zero
function psb_c_dvect_f_get_pnt(xh) bind(c) result(res)
implicit none
type(c_ptr) :: res
type(psb_c_dvector) :: xh
type(psb_d_vect_type), pointer :: vp
res = c_null_ptr
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp)
if(vp%is_dev()) call vp%sync()
res = c_loc(vp%v%v)
end if
end function psb_c_dvect_f_get_pnt
function psb_c_dmat_get_nrows(mh) bind(c) result(res)
use psb_base_mod
@ -141,4 +159,3 @@ contains
end module psb_d_serial_cbind_mod

@ -67,6 +67,24 @@ contains
end function psb_c_svect_zero
function psb_c_svect_f_get_pnt(xh) bind(c) result(res)
implicit none
type(c_ptr) :: res
type(psb_c_svector) :: xh
type(psb_s_vect_type), pointer :: vp
res = c_null_ptr
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp)
if(vp%is_dev()) call vp%sync()
res = c_loc(vp%v%v)
end if
end function psb_c_svect_f_get_pnt
function psb_c_smat_get_nrows(mh) bind(c) result(res)
use psb_base_mod
@ -141,4 +159,3 @@ contains
end module psb_s_serial_cbind_mod

@ -67,6 +67,24 @@ contains
end function psb_c_zvect_zero
function psb_c_zvect_f_get_pnt(xh) bind(c) result(res)
implicit none
type(c_ptr) :: res
type(psb_c_zvector) :: xh
type(psb_z_vect_type), pointer :: vp
res = c_null_ptr
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,vp)
if(vp%is_dev()) call vp%sync()
res = c_loc(vp%v%v)
end if
end function psb_c_zvect_f_get_pnt
function psb_c_zmat_get_nrows(mh) bind(c) result(res)
use psb_base_mod
@ -141,4 +159,3 @@ contains
end module psb_z_serial_cbind_mod

Loading…
Cancel
Save