New C interface for psb_genrmi sum_i |x_i|

merge-paraggr-newops
Cirdans-Home 5 years ago
parent 28c1efe650
commit 82db0f43b4

@ -51,7 +51,7 @@ psb_c_t psb_c_cgedot(psb_c_cvector *xh, psb_c_cvector *yh, psb_c_descriptor *cdh
psb_s_t psb_c_cgenrm2(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_s_t psb_c_cgeamax(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_s_t psb_c_cgeasum(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_s_t psb_c_cspnrmi(psb_c_cspmat *ah, psb_c_descriptor *cdh);
psb_s_t psb_c_cgenrmi(psb_c_cspmat *ah, psb_c_descriptor *cdh);
psb_i_t psb_c_cgeaxpby(psb_c_t alpha, psb_c_cvector *xh,
psb_c_t beta, psb_c_cvector *yh, psb_c_descriptor *cdh);
psb_i_t psb_c_cgeaxpbyz(psb_c_t alpha, psb_c_cvector *xh,

@ -51,7 +51,7 @@ psb_d_t psb_c_dgedot(psb_c_dvector *xh, psb_c_dvector *yh, psb_c_descriptor *cdh
psb_d_t psb_c_dgenrm2(psb_c_dvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_dgeamax(psb_c_dvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_dgeasum(psb_c_dvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_dspnrmi(psb_c_dvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_dgenrmi(psb_c_dvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_dgeaxpby(psb_d_t alpha, psb_c_dvector *xh,
psb_d_t beta, psb_c_dvector *yh, psb_c_descriptor *cdh);
psb_i_t psb_c_dgeaxpbyz(psb_d_t alpha, psb_c_dvector *xh,

@ -563,6 +563,37 @@ contains
end function psb_c_cgenrm2
function psb_c_cgenrmi(xh,cdh) bind(c) result(res)
implicit none
real(c_float_complex) :: res
type(psb_c_cvector) :: xh
type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp
type(psb_c_vect_type), pointer :: xp
type(psb_c_vect_type) :: yp
integer(psb_c_ipk_) :: info
res = -1.0
if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp)
else
return
end if
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp)
else
return
end if
call psb_geall(yp,descp,info)
call psb_geabs(xp,yp,descp,info)
res = psb_geasum(yp,descp,info)
call psb_gefree(yp,descp,info)
end function psb_c_cgenrmi
function psb_c_cgenrm2_weight(xh,wh,cdh) bind(c) result(res)
implicit none
real(c_float_complex) :: res

@ -51,7 +51,7 @@ psb_s_t psb_c_sgedot(psb_c_svector *xh, psb_c_svector *yh, psb_c_descriptor *cdh
psb_s_t psb_c_sgenrm2(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_s_t psb_c_sgeamax(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_s_t psb_c_sgeasum(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_s_t psb_c_sspnrmi(psb_c_sspmat *ah, psb_c_descriptor *cdh);
psb_s_t psb_c_sgenrmi(psb_c_sspmat *ah, psb_c_descriptor *cdh);
psb_i_t psb_c_sgeaxpby(psb_s_t alpha, psb_c_svector *xh,
psb_s_t beta, psb_c_svector *yh, psb_c_descriptor *cdh);
psb_i_t psb_c_sgeaxpbyz(psb_s_t alpha, psb_c_svector *xh,

@ -51,7 +51,7 @@ psb_z_t psb_c_zgedot(psb_c_zvector *xh, psb_c_zvector *yh, psb_c_descriptor *cdh
psb_d_t psb_c_zgenrm2(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_zgeamax(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_zgeasum(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_d_t psb_c_zspnrmi(psb_c_zspmat *ah, psb_c_descriptor *cdh);
psb_d_t psb_c_zgenrmi(psb_c_zspmat *ah, psb_c_descriptor *cdh);
psb_i_t psb_c_zgeaxpby(psb_z_t alpha, psb_c_zvector *xh,
psb_z_t beta, psb_c_zvector *yh, psb_c_descriptor *cdh);
psb_i_t psb_c_zgeaxpbyz(psb_z_t alpha, psb_c_zvector *xh,

@ -640,6 +640,37 @@ contains
end function psb_c_dgenrm2
function psb_c_dgenrmi(xh,cdh) bind(c) result(res)
implicit none
real(c_double) :: res
type(psb_c_dvector) :: xh
type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp
type(psb_d_vect_type), pointer :: xp
type(psb_d_vect_type) :: yp
integer(psb_c_ipk_) :: info
res = -1.0
if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp)
else
return
end if
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp)
else
return
end if
call psb_geall(yp,descp,info)
call psb_geabs(xp,yp,descp,info)
res = psb_geasum(yp,descp,info)
call psb_gefree(yp,descp,info)
end function psb_c_dgenrmi
function psb_c_dgenrm2_weight(xh,wh,cdh) bind(c) result(res)
implicit none
real(c_double) :: res

@ -640,6 +640,37 @@ contains
end function psb_c_sgenrm2
function psb_c_sgenrmi(xh,cdh) bind(c) result(res)
implicit none
real(c_float) :: res
type(psb_c_svector) :: xh
type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp
type(psb_s_vect_type), pointer :: xp
type(psb_s_vect_type) :: yp
integer(psb_c_ipk_) :: info
res = -1.0
if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp)
else
return
end if
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp)
else
return
end if
call psb_geall(yp,descp,info)
call psb_geabs(xp,yp,descp,info)
res = psb_geasum(yp,descp,info)
call psb_gefree(yp,descp,info)
end function psb_c_sgenrmi
function psb_c_sgenrm2_weight(xh,wh,cdh) bind(c) result(res)
implicit none
real(c_float) :: res

@ -563,6 +563,37 @@ contains
end function psb_c_zgenrm2
function psb_c_zgenrmi(xh,cdh) bind(c) result(res)
implicit none
real(c_double_complex) :: res
type(psb_c_zvector) :: xh
type(psb_c_descriptor) :: cdh
type(psb_desc_type), pointer :: descp
type(psb_z_vect_type), pointer :: xp
type(psb_z_vect_type) :: yp
integer(psb_c_ipk_) :: info
res = -1.0
if (c_associated(cdh%item)) then
call c_f_pointer(cdh%item,descp)
else
return
end if
if (c_associated(xh%item)) then
call c_f_pointer(xh%item,xp)
else
return
end if
call psb_geall(yp,descp,info)
call psb_geabs(xp,yp,descp,info)
res = psb_geasum(yp,descp,info)
call psb_gefree(yp,descp,info)
end function psb_c_zgenrmi
function psb_c_zgenrm2_weight(xh,wh,cdh) bind(c) result(res)
implicit none
real(c_double_complex) :: res

Loading…
Cancel
Save