|
|
|
@ -1,4 +1,4 @@
|
|
|
|
module psb_d_psblas_cbind_mod
|
|
|
|
omodule psb_d_psblas_cbind_mod
|
|
|
|
use iso_c_binding
|
|
|
|
use iso_c_binding
|
|
|
|
use psb_base_mod
|
|
|
|
use psb_base_mod
|
|
|
|
use psb_objhandle_mod
|
|
|
|
use psb_objhandle_mod
|
|
|
|
@ -1040,234 +1040,6 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
end function psb_c_dspsm
|
|
|
|
end function psb_c_dspsm
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dnnz(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = psb_nnz(ap,descp,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end function psb_c_dnnz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dis_matupd(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
logical(c_bool) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = .false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = ap%is_upd()
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dis_matasb(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
logical(c_bool) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = .false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = ap%is_asb()
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dis_matbld(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
logical(c_bool) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = .false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = ap%is_bld()
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dset_matupd(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call ap%set_upd()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = psb_success_
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dset_matasb(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call ap%set_asb()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = psb_success_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dset_matbld(ah,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call ap%set_bld()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = psb_success_
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dcopy_mat(ah,bh,cdh) bind(c) result(res)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_c_dspmat) :: ah,bh
|
|
|
|
|
|
|
|
type(psb_c_descriptor) :: cdh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type(psb_desc_type), pointer :: descp
|
|
|
|
|
|
|
|
type(psb_dspmat_type), pointer :: ap,bp
|
|
|
|
|
|
|
|
integer(psb_c_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = -1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c_associated(cdh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(cdh%item,descp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(ah%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(ah%item,ap)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (c_associated(bh%item)) then
|
|
|
|
|
|
|
|
call c_f_pointer(bh%item,bp)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call ap%clone(bp,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = info
|
|
|
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function psb_c_dspscal(alpha,ah,cdh) bind(c) result(res)
|
|
|
|
function psb_c_dspscal(alpha,ah,cdh) bind(c) result(res)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
integer(psb_c_ipk_) :: res
|
|
|
|
|