diff --git a/cbind/amgprec/amg_c_dprec.c b/cbind/amgprec/amg_c_dprec.c index 296d667b..2a9ef0d9 100644 --- a/cbind/amgprec/amg_c_dprec.c +++ b/cbind/amgprec/amg_c_dprec.c @@ -11,7 +11,7 @@ amg_c_dprec* amg_c_dprec_new() } -psb_i_t amg_c_dprec_delete(amg_c_dprec* p) +psb_c_i_t amg_c_dprec_delete(amg_c_dprec* p) { int iret; iret=amg_c_dprecfree(p); diff --git a/cbind/amgprec/amg_c_dprec.h b/cbind/amgprec/amg_c_dprec.h index 8c82d3ac..f5c46903 100644 --- a/cbind/amgprec/amg_c_dprec.h +++ b/cbind/amgprec/amg_c_dprec.h @@ -17,25 +17,25 @@ extern "C" { } amg_c_dprec; amg_c_dprec* amg_c_dprec_new(); - psb_i_t amg_c_dprec_delete(amg_c_dprec* p); + psb_c_i_t amg_c_dprec_delete(amg_c_dprec* p); - psb_i_t amg_c_dprecinit(psb_c_ctxt cctxt, amg_c_dprec *ph, const char *ptype); - psb_i_t amg_c_dprecseti(amg_c_dprec *ph, const char *what, psb_i_t val); - psb_i_t amg_c_dprecsetc(amg_c_dprec *ph, const char *what, const char *val); - psb_i_t amg_c_dprecsetr(amg_c_dprec *ph, const char *what, double val); - psb_i_t amg_c_dprecbld(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph); - psb_i_t amg_c_dhierarchy_build(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph); - psb_i_t amg_c_dsmoothers_build(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph); - psb_i_t amg_c_dsmoothers_build_opt(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph, const char *afmt, const char *chfmt); - psb_i_t amg_c_dprecapply(amg_c_dprec *ph, psb_c_dvector *bh, psb_c_dvector *xh, psb_c_descriptor *cdh); - psb_i_t amg_c_dprecapply_opt(amg_c_dprec *ph, psb_c_dvector *bh, psb_c_dvector *xh, psb_c_descriptor *cdh, const char *ctrans); - psb_i_t amg_c_dprecfree(amg_c_dprec *ph); - psb_i_t amg_c_dprecbld_opt(psb_c_dspmat *ah, psb_c_descriptor *cdh, + psb_c_i_t amg_c_dprecinit(psb_c_ctxt cctxt, amg_c_dprec *ph, const char *ptype); + psb_c_i_t amg_c_dprecseti(amg_c_dprec *ph, const char *what, psb_c_i_t val); + psb_c_i_t amg_c_dprecsetc(amg_c_dprec *ph, const char *what, const char *val); + psb_c_i_t amg_c_dprecsetr(amg_c_dprec *ph, const char *what, double val); + psb_c_i_t amg_c_dprecbld(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph); + psb_c_i_t amg_c_dhierarchy_build(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph); + psb_c_i_t amg_c_dsmoothers_build(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph); + psb_c_i_t amg_c_dsmoothers_build_opt(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph, const char *afmt, const char *chfmt); + psb_c_i_t amg_c_dprecapply(amg_c_dprec *ph, psb_c_dvector *bh, psb_c_dvector *xh, psb_c_descriptor *cdh); + psb_c_i_t amg_c_dprecapply_opt(amg_c_dprec *ph, psb_c_dvector *bh, psb_c_dvector *xh, psb_c_descriptor *cdh, const char *ctrans); + psb_c_i_t amg_c_dprecfree(amg_c_dprec *ph); + psb_c_i_t amg_c_dprecbld_opt(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph, const char *afmt); - psb_i_t amg_c_ddescr(amg_c_dprec *ph); - psb_i_t amg_c_dallocate_wrk(amg_c_dprec *ph, const char *chfmt); + psb_c_i_t amg_c_ddescr(amg_c_dprec *ph); + psb_c_i_t amg_c_dallocate_wrk(amg_c_dprec *ph, const char *chfmt); - psb_i_t amg_c_dkrylov(const char *method, psb_c_dspmat *ah, amg_c_dprec *ph, + psb_c_i_t amg_c_dkrylov(const char *method, psb_c_dspmat *ah, amg_c_dprec *ph, psb_c_dvector *bh, psb_c_dvector *xh, psb_c_descriptor *cdh, psb_c_SolverOptions *opt); diff --git a/cbind/amgprec/amg_c_zprec.c b/cbind/amgprec/amg_c_zprec.c index 546e2160..5e65398a 100644 --- a/cbind/amgprec/amg_c_zprec.c +++ b/cbind/amgprec/amg_c_zprec.c @@ -11,7 +11,7 @@ amg_c_zprec* amg_c_new_zprec() } -psb_i_t amg_c_delete_zprec(amg_c_zprec* p) +psb_c_i_t amg_c_delete_zprec(amg_c_zprec* p) { int iret; iret=amg_c_zprecfree(p); diff --git a/cbind/amgprec/amg_c_zprec.h b/cbind/amgprec/amg_c_zprec.h index def2a8c4..fdb2d0d5 100644 --- a/cbind/amgprec/amg_c_zprec.h +++ b/cbind/amgprec/amg_c_zprec.h @@ -19,26 +19,26 @@ extern "C" } amg_c_zprec; amg_c_zprec *amg_c_zprec_new(); - psb_i_t amg_c_zprec_delete(amg_c_zprec *p); - - psb_i_t amg_c_zprecinit(psb_c_ctxt cctxt, amg_c_zprec *ph, const char *ptype); - psb_i_t amg_c_zprecseti(amg_c_zprec *ph, const char *what, psb_i_t val); - psb_i_t amg_c_zprecsetc(amg_c_zprec *ph, const char *what, const char *val); - psb_i_t amg_c_zprecsetr(amg_c_zprec *ph, const char *what, double val); - psb_i_t amg_c_zprecbld(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph); - psb_i_t amg_c_zhierarchy_build(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph); - psb_i_t amg_c_zsmoothers_build(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph); - psb_i_t amg_c_zsmoothers_build_opt(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph, const char *afmt, const char *chfmt); - psb_i_t amg_c_zprecapply(amg_c_zprec *ph, psb_c_zvector *bh, psb_c_zvector *xh, psb_c_descriptor *cdh); - psb_i_t amg_c_zprecapply_opt(amg_c_zprec *ph, psb_c_zvector *bh, psb_c_zvector *xh, psb_c_descriptor *cdh, const char *ctrans); - psb_i_t amg_c_zprecfree(amg_c_zprec *ph); - psb_i_t amg_c_zprecbld_opt(psb_c_zspmat *ah, psb_c_descriptor *cdh, + psb_c_i_t amg_c_zprec_delete(amg_c_zprec *p); + + psb_c_i_t amg_c_zprecinit(psb_c_ctxt cctxt, amg_c_zprec *ph, const char *ptype); + psb_c_i_t amg_c_zprecseti(amg_c_zprec *ph, const char *what, psb_c_i_t val); + psb_c_i_t amg_c_zprecsetc(amg_c_zprec *ph, const char *what, const char *val); + psb_c_i_t amg_c_zprecsetr(amg_c_zprec *ph, const char *what, double val); + psb_c_i_t amg_c_zprecbld(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph); + psb_c_i_t amg_c_zhierarchy_build(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph); + psb_c_i_t amg_c_zsmoothers_build(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph); + psb_c_i_t amg_c_zsmoothers_build_opt(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph, const char *afmt, const char *chfmt); + psb_c_i_t amg_c_zprecapply(amg_c_zprec *ph, psb_c_zvector *bh, psb_c_zvector *xh, psb_c_descriptor *cdh); + psb_c_i_t amg_c_zprecapply_opt(amg_c_zprec *ph, psb_c_zvector *bh, psb_c_zvector *xh, psb_c_descriptor *cdh, const char *ctrans); + psb_c_i_t amg_c_zprecfree(amg_c_zprec *ph); + psb_c_i_t amg_c_zprecbld_opt(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph, const char *afmt); - psb_i_t amg_c_zdescr(amg_c_zprec *ph); - psb_i_t amg_c_zallocate_wrk(amg_c_zprec *ph, const char *chfmt); + psb_c_i_t amg_c_zdescr(amg_c_zprec *ph); + psb_c_i_t amg_c_zallocate_wrk(amg_c_zprec *ph, const char *chfmt); - psb_i_t amg_c_zkrylov(const char *method, psb_c_zspmat *ah, amg_c_zprec *ph, + psb_c_i_t amg_c_zkrylov(const char *method, psb_c_zspmat *ah, amg_c_zprec *ph, psb_c_zvector *bh, psb_c_zvector *xh, psb_c_descriptor *cdh, psb_c_SolverOptions *opt); diff --git a/cbind/test/pargen/amgec.c b/cbind/test/pargen/amgec.c index 491337e0..8d5b3728 100644 --- a/cbind/test/pargen/amgec.c +++ b/cbind/test/pargen/amgec.c @@ -123,16 +123,16 @@ double g(double x, double y, double z) #define NBMAX 20 -psb_i_t matgen(psb_c_ctxt cctxt, psb_i_t nl, psb_i_t idim, psb_l_t vl[], +psb_c_i_t matgen(psb_c_ctxt cctxt, psb_c_i_t nl, psb_c_i_t idim, psb_c_l_t vl[], psb_c_dspmat *ah,psb_c_descriptor *cdh, psb_c_dvector *xh, psb_c_dvector *bh, psb_c_dvector *rh) { - psb_i_t iam, np; - psb_l_t ix, iy, iz, el,glob_row; - psb_i_t i, k, info,ret; + psb_c_i_t iam, np; + psb_c_l_t ix, iy, iz, el,glob_row; + psb_c_i_t i, k, info,ret; double x, y, z, deltah, sqdeltah, deltah2; double val[10*NBMAX], zt[NBMAX]; - psb_l_t irow[10*NBMAX], icol[10*NBMAX]; + psb_c_l_t irow[10*NBMAX], icol[10*NBMAX]; info = 0; psb_c_info(cctxt,&iam,&np); @@ -254,15 +254,15 @@ void get_hparm(FILE *fp, char *val) int main(int argc, char *argv[]) { psb_c_ctxt *cctxt; - psb_i_t iam, np; + psb_c_i_t iam, np; char methd[40], ptype[40], afmt[8]; - psb_i_t nparms; - psb_i_t idim,info,istop,itmax,itrace,irst,iter,ret; + psb_c_i_t nparms; + psb_c_i_t idim,info,istop,itmax,itrace,irst,iter,ret; amg_c_dprec *ph; psb_c_dspmat *ah; psb_c_dvector *bh, *xh, *rh; - psb_i_t nb,nlr, nl; - psb_l_t i,ng, *vl, k; + psb_c_i_t nb,nlr, nl; + psb_c_l_t i,ng, *vl, k; double t1,t2,eps,err; double *xv, *bv, *rv; double one=1.0, zero=0.0, res2; @@ -305,16 +305,16 @@ int main(int argc, char *argv[]) psb_c_set_index_base(0); /* Simple minded BLOCK data distribution */ - ng = ((psb_l_t) idim)*idim*idim; + ng = ((psb_c_l_t) idim)*idim*idim; nb = (ng+np-1)/np; nl = nb; if ( (ng -iam*nb) < nl) nl = ng -iam*nb; fprintf(stderr,"%d: Input data %d %ld %d %d\n",iam,idim,ng,nb, nl); - if ((vl=malloc(nb*sizeof(psb_l_t)))==NULL) { + if ((vl=malloc(nb*sizeof(psb_c_l_t)))==NULL) { fprintf(stderr,"On %d: malloc failure\n",iam); psb_c_abort(*cctxt); } - i = ((psb_l_t)iam) * nb; + i = ((psb_c_l_t)iam) * nb; for (k=0; k