mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-19 04:12:09 +00:00
Fix set_scal usage
This commit is contained in:
@@ -58,8 +58,10 @@ psb_i_t psb_c_ccopy_mat(psb_c_cspmat *ah,psb_c_cspmat *bh,psb_c_descriptor *cd
|
||||
/* const char *afmt, psb_i_t upd, psb_i_t dupl); */
|
||||
psb_i_t psb_c_csprn(psb_c_cspmat *mh, psb_c_descriptor *cdh, _Bool clear);
|
||||
psb_i_t psb_c_cmat_name_print(psb_c_cspmat *mh, char *name);
|
||||
psb_i_t psb_c_cvect_set_scal(psb_c_cvector *xh, psb_c_t val);
|
||||
psb_i_t psb_c_cvect_set_vect(psb_c_cvector *xh, psb_c_t *val, psb_i_t n);
|
||||
psb_i_t psb_c_cvect_set_scal(psb_c_cvector *xh, psb_c_t val);
|
||||
psb_i_t psb_c_cvect_set_scal_bound(psb_c_cvector *xh, psb_c_t val,
|
||||
psb_i_t ifirst, psb_i_t ilast);
|
||||
psb_i_t psb_c_cvect_set_vect(psb_c_cvector *xh, psb_c_t *val, psb_i_t n);
|
||||
psb_c_t psb_c_cvect_get_entry(psb_c_cvector *xh, psb_i_t index);
|
||||
psb_i_t psb_c_cvect_set_entry(psb_c_cvector *xh, psb_i_t index, psb_c_t val);
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ psb_i_t psb_c_dcopy_mat(psb_c_dspmat *ah,psb_c_dspmat *bh,psb_c_descriptor *cd
|
||||
psb_i_t psb_c_dsprn(psb_c_dspmat *mh, psb_c_descriptor *cdh, _Bool clear);
|
||||
psb_i_t psb_c_dmat_name_print(psb_c_dspmat *mh, char *name);
|
||||
psb_i_t psb_c_dvect_set_scal(psb_c_dvector *xh, psb_d_t val);
|
||||
psb_i_t psb_c_dvect_set_scal_bound(psb_c_dvector *xh, psb_d_t val,
|
||||
psb_i_t ifirst, psb_i_t ilast);
|
||||
psb_i_t psb_c_dvect_set_vect(psb_c_dvector *xh, psb_d_t *val, psb_i_t n);
|
||||
psb_d_t psb_c_dvect_get_entry(psb_c_dvector *xh, psb_i_t index);
|
||||
psb_i_t psb_c_dvect_set_entry(psb_c_dvector *xh, psb_i_t index, psb_d_t val);
|
||||
|
||||
@@ -59,6 +59,8 @@ psb_i_t psb_c_scopy_mat(psb_c_sspmat *ah,psb_c_sspmat *bh,psb_c_descriptor *cd
|
||||
psb_i_t psb_c_ssprn(psb_c_sspmat *mh, psb_c_descriptor *cdh, _Bool clear);
|
||||
psb_i_t psb_c_smat_name_print(psb_c_sspmat *mh, char *name);
|
||||
psb_i_t psb_c_svect_set_scal(psb_c_svector *xh, psb_s_t val);
|
||||
psb_i_t psb_c_svect_set_scal_bound(psb_c_svector *xh, psb_s_t val,
|
||||
psb_i_t ifirst, psb_i_t ilast);
|
||||
psb_i_t psb_c_svect_set_vect(psb_c_svector *xh, psb_s_t *val, psb_i_t n);
|
||||
psb_s_t psb_c_svect_get_entry(psb_c_svector *xh, psb_i_t index);
|
||||
psb_i_t psb_c_svect_set_entry(psb_c_svector *xh, psb_i_t index, psb_s_t val);
|
||||
|
||||
@@ -180,6 +180,30 @@ contains
|
||||
|
||||
end function psb_c_cvect_set_scal
|
||||
|
||||
function psb_c_cvect_set_scal_bound(x,val,ifirst,ilast) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
type(psb_c_cvector) :: x
|
||||
type(psb_c_vect_type), pointer :: xp
|
||||
integer(psb_c_ipk_) :: info
|
||||
integer(psb_c_ipk_), value :: ifirst, ilast
|
||||
complex(c_float_complex) :: val
|
||||
|
||||
info = -1;
|
||||
|
||||
if (c_associated(x%item)) then
|
||||
call c_f_pointer(x%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call xp%set(val,first=ifirst,last=ilast)
|
||||
|
||||
info = 0
|
||||
|
||||
end function psb_c_cvect_set_scal_bound
|
||||
|
||||
function psb_c_cvect_set_vect(x,val,n) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -204,7 +228,6 @@ contains
|
||||
|
||||
end function psb_c_cvect_set_vect
|
||||
|
||||
|
||||
function psb_c_cvect_set_entry(x,index,val) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -60,6 +60,8 @@ psb_i_t psb_c_zcopy_mat(psb_c_zspmat *ah,psb_c_zspmat *bh,psb_c_descriptor *cd
|
||||
psb_i_t psb_c_zsprn(psb_c_zspmat *mh, psb_c_descriptor *cdh, _Bool clear);
|
||||
psb_i_t psb_c_zmat_name_print(psb_c_zspmat *mh, char *name);
|
||||
psb_i_t psb_c_zvect_set_scal(psb_c_zvector *xh, psb_z_t val);
|
||||
psb_i_t psb_c_zvect_set_scal_bound(psb_c_zvector *xh, psb_z_t val,
|
||||
psb_i_t ifirst, psb_i_t ilast);
|
||||
psb_i_t psb_c_zvect_set_vect(psb_c_zvector *xh, psb_z_t *val, psb_i_t n);
|
||||
psb_z_t psb_c_zvect_get_entry(psb_c_zvector *xh, psb_i_t index);
|
||||
psb_i_t psb_c_zvect_set_entry(psb_c_zvector *xh, psb_i_t index, psb_z_t val);
|
||||
|
||||
@@ -180,6 +180,30 @@ contains
|
||||
|
||||
end function psb_c_dvect_set_scal
|
||||
|
||||
function psb_c_dvect_set_scal_bound(x,val,ifirst,ilast) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
type(psb_c_dvector) :: x
|
||||
type(psb_d_vect_type), pointer :: xp
|
||||
integer(psb_c_ipk_) :: info
|
||||
integer(psb_c_ipk_), value :: ifirst, ilast
|
||||
real(c_double) :: val
|
||||
|
||||
info = -1;
|
||||
|
||||
if (c_associated(x%item)) then
|
||||
call c_f_pointer(x%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call xp%set(val,first=ifirst,last=ilast)
|
||||
|
||||
info = 0
|
||||
|
||||
end function psb_c_dvect_set_scal_bound
|
||||
|
||||
function psb_c_dvect_set_vect(x,val,n) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -204,7 +228,6 @@ contains
|
||||
|
||||
end function psb_c_dvect_set_vect
|
||||
|
||||
|
||||
function psb_c_dvect_set_entry(x,index,val) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -180,6 +180,30 @@ contains
|
||||
|
||||
end function psb_c_svect_set_scal
|
||||
|
||||
function psb_c_svect_set_scal_bound(x,val,ifirst,ilast) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
type(psb_c_svector) :: x
|
||||
type(psb_s_vect_type), pointer :: xp
|
||||
integer(psb_c_ipk_) :: info
|
||||
integer(psb_c_ipk_), value :: ifirst, ilast
|
||||
real(c_float) :: val
|
||||
|
||||
info = -1;
|
||||
|
||||
if (c_associated(x%item)) then
|
||||
call c_f_pointer(x%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call xp%set(val,first=ifirst,last=ilast)
|
||||
|
||||
info = 0
|
||||
|
||||
end function psb_c_svect_set_scal_bound
|
||||
|
||||
function psb_c_svect_set_vect(x,val,n) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -204,7 +228,6 @@ contains
|
||||
|
||||
end function psb_c_svect_set_vect
|
||||
|
||||
|
||||
function psb_c_svect_set_entry(x,index,val) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -180,6 +180,30 @@ contains
|
||||
|
||||
end function psb_c_zvect_set_scal
|
||||
|
||||
function psb_c_zvect_set_scal_bound(x,val,ifirst,ilast) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
type(psb_c_zvector) :: x
|
||||
type(psb_z_vect_type), pointer :: xp
|
||||
integer(psb_c_ipk_) :: info
|
||||
integer(psb_c_ipk_), value :: ifirst, ilast
|
||||
complex(c_double_complex) :: val
|
||||
|
||||
info = -1;
|
||||
|
||||
if (c_associated(x%item)) then
|
||||
call c_f_pointer(x%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call xp%set(val,first=ifirst,last=ilast)
|
||||
|
||||
info = 0
|
||||
|
||||
end function psb_c_zvect_set_scal_bound
|
||||
|
||||
function psb_c_zvect_set_vect(x,val,n) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -204,7 +228,6 @@ contains
|
||||
|
||||
end function psb_c_zvect_set_vect
|
||||
|
||||
|
||||
function psb_c_zvect_set_entry(x,index,val) bind(c) result(info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
Reference in New Issue
Block a user