diff options
Diffstat (limited to 'thirdparty/linux/include/coin/ThirdParty')
16 files changed, 3493 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin/ThirdParty/arith.h b/thirdparty/linux/include/coin/ThirdParty/arith.h new file mode 100644 index 0000000..356d34f --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/arith.h @@ -0,0 +1,8 @@ +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Long int +#define Intcast (int)(long) +#define Double_Align +#define X64_bit_pointers +#define QNaN0 0x0 +#define QNaN1 0xfff80000 diff --git a/thirdparty/linux/include/coin/ThirdParty/asl.h b/thirdparty/linux/include/coin/ThirdParty/asl.h new file mode 100644 index 0000000..ec8a379 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/asl.h @@ -0,0 +1,1199 @@ +/**************************************************************** +Copyright (C) 1997-2001 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#ifndef ASL_included +#define ASL_included + +#include "arith.h" /* for Long and Double_Align */ +#include "math.h" +#include "stdio1.h" +#include "string.h" + +#ifdef KR_headers +#define Const /* */ +#define VOID /*void*/ +extern char *malloc(), *realloc(); +extern double strtod(); +#else +#define Const const +#define VOID void +#include "stdlib.h" +#endif +#include "errno.h" + +#ifdef __cplusplus +#define Cextern extern "C" +extern "C" { +#else +#define Cextern extern +#endif + +#ifndef Stderr +extern FILE *Stderr; +#endif + +#ifndef real +#define real double +#endif + +#ifndef Long +#define Long long +#endif +#ifndef F2C_INCLUDE +typedef Long fint; +typedef Long ftnlen; +#endif +#ifndef Intcast +#define Intcast (size_t) +#endif + +#ifndef Not_Used +#define Not_Used(x) x = x /* silence non-use warnings */ +#endif + +#define Malloc(x) mymalloc((size_t)(x)) +#define Realloc(x,y) myralloc(x,(size_t)(y)) +#define Sizeof(x) sizeof(x) +/* prior to 20110912, Sizeof(x) was (fint)sizeof(x) */ + + /* Place qsortv declaration ahead of funcadd.h in case Permit_AE_redefs is #defined. */ + extern void qsortv(void*, size_t, size_t, int(*)(const void*,const void*,void*), void*); + +#ifndef FUNCADD_H_INCLUDED +#ifndef Permit_AE_redefs +#define No_AE_redefs +#endif +#include "funcadd.h" +#endif +#include "setjmp.h" + + typedef size_t (*Fwrite)(const void*, size_t, size_t, FILE*); + typedef int (*Add_Indicator)(void*, int, int, int, int, int*, real*, real); + typedef struct {jmp_buf jb;} Jmp_buf; + typedef struct ASL ASL; + typedef struct MPEC_Adjust MPEC_Adjust; + typedef struct Objrep Objrep; + typedef struct Option_Info Option_Info; + typedef struct cgrad cgrad; + typedef struct cplist cplist; + typedef struct derp derp; + typedef struct expr_n expr_n; + typedef struct func_info func_info; + typedef struct linpart linpart; + typedef struct ograd ograd; + typedef struct plterm plterm; + typedef struct relo relo; + + typedef struct +SputInfo { + fint *hcolstarts; + fint *hrownos; + size_t *hcs[2]; + fint *hrn[2]; + ssize_t *ulinc; + ssize_t *ulcopy; + ssize_t *ulinc0; + ssize_t *ulcopy0; + ssize_t *ulcend; + ssize_t nod; + int nobj; /* from sphsetup() */ + int ow; /* from sphsetup() */ + int y; /* from sphsetup() */ + int khinfo; /* mblk size in sphes_setup */ + int khinfob; + int uptri; /* from sphsetup() */ + int *uptolow; + size_t *hcolstartsZ; + } SputInfo; + + typedef union +uirp { + int i; + real *rp; + void *vp; + } uirp; + +#ifdef ASL_big_goff /*{{ for jacval() with nzc >= 2^31 */ + struct +cgrad { + real coef; + cgrad *next; + ssize_t varno; + size_t goff; + }; + + struct +ograd { + real coef; + ograd *next; + ssize_t varno; + }; +typedef ssize_t varno_t; +#else /*}{ less memory */ + struct +cgrad { + real coef; + cgrad *next; + int varno; + int goff; + }; + + struct +ograd { + real coef; + ograd *next; + int varno; + }; +typedef int varno_t; +#endif /*}}*/ + + struct +cplist { + cplist *next; + uirp ca; + real *cfa; + }; + + struct +derp { + derp *next; + uirp a, b, c; + }; + +typedef real efunc_n(expr_n*); + + struct +expr_n { + efunc_n *op; + real v; + }; + + struct +func_info { + func_info *next, *fnext; + Const char *name; + ufunc *funcp; + int ftype; + int nargs; + void *funcinfo; + int findex; /* for fg_write */ + }; + + struct +linpart { + uirp v; + real fac; + }; + + struct +plterm { + int n; /* number of slopes */ + int z; /* bs[z] == slope at 0 */ + real bs[1]; /* slope 1, bkpt 1, slope 2, bkpt 2, ..., slope n */ + }; + + struct +relo { + relo *next, *next2; + derp *D, *Dnext, *Dcond; + }; + + typedef struct +EdRead_ASL { + ASL *asl; + FILE *nl; + void *S; /* Static */ + Long Line; + int lineinc; + int can_end; + char rl_buf[80]; + void (*iadjfcn)(void*, size_t); + void (*dadjfcn)(void*, size_t); + } EdRead_ASL; +#define EdRead EdRead_ASL + + typedef struct ASLhead ASLhead; struct +ASLhead { ASLhead *next, *prev; }; + +#define NFHASH 23 + + typedef struct +Edagpars { + ASLhead h; + /* stuff initialized to nonzero values */ + real hffactor; + int FUNNEL_MIN_; + int maxfwd_; + int need_funcadd_; + int vrefGulp_; + int want_derivs_; + int ihd_limit_; + int solve_code_; + real (*Objval) (ASL*, int nobj, real *X, fint *nerror); + real (*Objval_nomap) (ASL*, int nobj, real *X, fint *nerror); + void (*Objgrd) (ASL*, int nobj, real *X, real *G, fint *nerror); + void (*Objgrd_nomap) (ASL*, int nobj, real *X, real *G, fint *nerror); + void (*Conval) (ASL*, real *X, real *R, fint *nerror); + void (*Jacval) (ASL*, real *X, real *J, fint *nerror); + real (*Conival) (ASL*, int ncon, real *X, fint *nerror); + real (*Conival_nomap) (ASL*, int ncon, real *X, fint *nerror); + void (*Congrd) (ASL*, int nc, real *X, real *G, fint *nerror); + void (*Congrd_nomap) (ASL*, int nc, real *X, real *G, fint *nerror); + void (*Hvcomp) (ASL*, real *hv, real *p, int no, real *ow, real *y); + void (*Hvcomp_nomap) (ASL*, real *hv, real *p, int no, real *ow, real *y); + void (*Hvcompd) (ASL*, real *hv, real *p, int co); + varno_t (*Hvcomps) (ASL*, real *hv, real *p, int co, varno_t nz, varno_t *z); + void (*Hvinit) (ASL*, int hid_limit, int nobj, real *ow, real *y); + void (*Hvinit_nomap) (ASL*, int hid_limit, int nobj, real *ow, real *y); + void (*Hesset) (ASL*, int flags, int no, int nno, int nc, int nnc); + int (*Lconval) (ASL*, int ncon, real *X, fint *nerror); + void (*Xknown) (ASL*, real*, fint*); + void (*Duthes) (ASL*, real *H, int nobj, real *ow, real *y); + void (*Duthes_nomap) (ASL*, real *H, int nobj, real *ow, real *y); + void (*Fulhes) (ASL*, real *H, fint LH, int no, real *ow, real *y); + void (*Fulhes_nomap) (ASL*, real *H, fint LH, int no, real *ow, real *y); + void (*Sphes) (ASL*, SputInfo**, real *H, int nobj, real *ow, real *y); + void (*Sphes_nomap) (ASL*, SputInfo**, real *H, int nobj, real *ow, real *y); + fint (*Sphset) (ASL*, SputInfo**, int nobj, int ow, int y, int uptri); + fint (*Sphset_nomap) (ASL*, SputInfo**, int nobj, int ow, int y, int uptri); + } Edagpars; + + extern Edagpars edagpars_ASL; + +#define objval(np,x,ne) (*((ASL*)asl)->p.Objval)((ASL*)asl,np,x,ne) +#define objgrd(np,x,g,ne) (*((ASL*)asl)->p.Objgrd)((ASL*)asl,np,x,g,ne) +#define conval(x,r,ne) (*((ASL*)asl)->p.Conval)((ASL*)asl,x,r,ne) +#define jacval(x,j,ne) (*((ASL*)asl)->p.Jacval)((ASL*)asl,x,j,ne) +#define conival(i,x,ne) (*((ASL*)asl)->p.Conival)((ASL*)asl,i,x,ne) +#define congrd(i,x,g,ne) (*((ASL*)asl)->p.Congrd)((ASL*)asl,i,x,g,ne) +#define hvcomp(hv,P,no,ow,y) (*((ASL*)asl)->p.Hvcomp)((ASL*)asl,hv,P,no,ow,y) +#define hvcompd(hv,P,co) (*((ASL*)asl)->p.Hvcompd)((ASL*)asl,hv,P,co) +#define hvcomps(hv,P,co,nz,z) (*((ASL*)asl)->p.Hvcomps)((ASL*)asl,hv,P,co,nz,z) +#define hvinit(no,ow,y) (*((ASL*)asl)->p.Hvinit)((ASL*)asl,ihd_limit,no,ow,y) +#define hesset(f,o,n,c,nc) (*((ASL*)asl)->p.Hesset)((ASL*)asl,f,o,n,c,nc) +#define duthes(h,n,ow,y) (*((ASL*)asl)->p.Duthes)((ASL*)asl,h,n,ow,y) +#define fullhes(h,lh,n,ow,y) (*((ASL*)asl)->p.Fulhes)((ASL*)asl,h,lh,n,ow,y) +#define lconval(i,x,ne) (*((ASL*)asl)->p.Lconval)((ASL*)asl,i,x,ne) +#define sphes(h,no,ow,y) (*((ASL*)asl)->p.Sphes)( (ASL*)asl,0,h,no,ow,y) +#define sphsetup(no,ow,y,b) (*((ASL*)asl)->p.Sphset)((ASL*)asl,0,no,ow,y,b) +#define xknown(x) (*((ASL*)asl)->p.Xknown)((ASL*)asl,x,0) +#define xknowne(x,ne) (*((ASL*)asl)->p.Xknown)((ASL*)asl,x,ne) +#define xunknown() (asl->i.x_known = 0) + +#define FUNNEL_MIN asl->p.FUNNEL_MIN_ +#define ihd_limit asl->p.ihd_limit_ +#define maxfwd asl->p.maxfwd_ +#define need_funcadd asl->p.need_funcadd_ +#define solve_code asl->p.solve_code_ +#define solve_result_num asl->p.solve_code_ +#define vrefGulp asl->p.vrefGulp_ +#define want_derivs asl->p.want_derivs_ + + typedef struct +SufDesc { /* suffix description */ + char *sufname; /* suffix name */ + char *table; /* for return to AMPL, suffix_table value */ + int kind; + int nextra; /* extra entries to allocate in u.i or u.r */ + struct { /* was union, but this made debugging harder */ + int *i; + real *r; + } u; + struct SufDesc *next; + /* The number of entries in u.i or u.r is */ + /* (&asl->i.n_var_)[kind & ASL_Sufkind_mask] . */ + } SufDesc; + + enum { /* kind bits for SufDesc */ + ASL_Sufkind_var = 0, + ASL_Sufkind_con = 1, + ASL_Sufkind_obj = 2, + ASL_Sufkind_prob = 3, + ASL_Sufkind_mask = 3, /* mask for getting one of the above */ + /* values from SufDesc.kind */ + ASL_Sufkind_real = 4, /* use SufDesc.u.r rather than .i */ + ASL_Sufkind_iodcl = 8, /* tell AMPL to make this an INOUT suffix */ + ASL_Sufkind_output = 16,/* return this suffix to AMPL */ + ASL_Sufkind_input = 32, /* input values were received from AMPL */ + ASL_Sufkind_outonly = 64/* reject as an input value */ + }; + + typedef struct +SufDecl { /* Pass array of SufDecl's to suf_declare(). */ + char *name; + char *table; + int kind; + int nextra; + } SufDecl; + + typedef struct Exitcall Exitcall; struct +Exitcall { + Exitcall *prev; + Exitfunc *ef; + void *v; + }; + + typedef struct DerivErrInfo DerivErrInfo; + + typedef struct +Edaginfo { + int ASLtype; + /* stuff initialized to zero values */ + int amplflag_; + int need_nl_; + int nlmode; + func_info **funcs_, *funcsfirst_, *funcslast_; + int (*xscanf_)(EdRead*, const char*, ...); + + func_info *fhash_[NFHASH]; + + real *adjoints_; /* partials of result w.r.t. current oper. */ + real *adjoints_nv1_; /* internal use: start of portion to zero */ + real *LUrhs_, /* constraint lower (and, if Urhsx == 0, */ + /* upper) bounds */ + *Urhsx_, /* constraint upper bounds (if nonzero) */ + *X0_, /* initial guess (if nonzero) */ + *LUv_, /* variable lower (and, if Uvx == 0, upper) */ + /* bounds */ + *Uvx_, /* variable upper bounds (if nonzero) */ + *Lastx_, /* internal use: copy of X */ + *pi0_; /* dual initial guess */ + + char *objtype_; /* object type array: 0 == min, 1 == max */ + char *havex0_; /* if nonzero, havex0_[i] != 0 ==> */ + /* X0_[i] was specified: this lets you */ + /* tell explicit 0's from default 0's */ + char *havepi0_; /* analogous to havex0_, but for dual values */ + real *A_vals_; /* If nonzero, store constant Jacobian values */ + /* (possibly 0 when nonlinearities are involved) */ + /* in A_vals, A_rownos, and A_colstarts, */ + /* rather than in Cgrad_. */ + int *A_rownos_, /* row numbers corresponding to A_vals_ */ + *A_colstarts_; /* offsets of columns in A_vals_ */ + size_t *A_colstartsZ_; /* for huge problems -- 2^31 or more nonzeros */ + + cgrad **Cgrad_; /* constraint gradient info. (linear part) */ + ograd **Ograd_; /* objective gradient info. (linear part) */ + cgrad **Cgrad0; /* unmapped */ + + int Fortran_; /* adjustment to A_rownos, A_colstarts, */ + /* ccind1, and ccind2 */ + int amax_; /* number of adjoint cells */ + + /* stuff for common expressions (from "defined" vars) */ + int c_vars_; + int comb_; + int combc_; + int comc1_; + int comc_; + int como1_; + int como_; + + int lnc_; /* no. of linear network constraints */ + int nbv_; /* no. of linear binary variables */ + int niv_; /* no. of linear non-binary integer variables */ + int nlc_; /* total no. of nonlinear constraints */ + int n_eqn_; /* number of equality constraints or -1 */ + /* if unknown (ampl prior to 19970627) */ + int n_cc_; /* total complementarity conditions */ + int nlcc_; /* nonlinear complementarity conditions */ + int ndcc_; /* number of complementarities involving */ + /* double inequalities (for ASL_cc_simplify) */ + int nzlb_; /* number of complemented variables with a */ + /* nonzero lower bound (for ASL_cc_simplify) */ + int nlnc_; /* no. of nonlinear network constraints */ + int nlo_; /* no. of nonlinear objectives */ + int nlvb_; /* no. of nonlinear variables in both */ + /* constraints and objectives */ + int nlvc_; /* no. of nonlinear variables in constraints */ + int nlvo_; /* no. of nonlinear variables in objectives */ + /* nlvc_ and nlvo_ include nlvb_ */ + int nlvbi_; /* integer nonlinear variables in both */ + /* constraints and objectives */ + int nlvci_; /* integer nonlinear vars just in constraints */ + int nlvoi_; /* integer nonlinear vars just in objectives */ + int nwv_; /* no. of (linear) network variables (arcs) */ + int nzc_; /* no. of nonzeros in constraints' Jacobian */ + int nzo_; /* no. of nonzeros in all objective gradients */ + int n_var_; /* total no. of variables */ + int n_con_; /* total no. of constraints */ + int n_obj_; /* total no. of objectives */ + int n_prob; /* 1 (for use with SufDesc): SufDesc.u has */ + /* (&asl->i.n_var_)[SufDesc.kind & ASL_Sufkind_mask] entries */ + int n_lcon_; /* no. of logical constraints */ + int flags; /* 1 = want output suffixes */ + int n_conjac_[2]; /* Conval and Jacval operate on constraint i */ + /* for n_conjac_[0] <= i < n_conjac_[1]. */ + /* Initialized by jac0dim to 0 and n_con. */ + /* The .nl reader may adjust these values when */ + /* processing ASL_cc_simplify or ASL_obj_replace. */ + + + /* internal stuff */ + + int nclcon_; /* n_con + n_lcon */ + int ncom0_; + int ncom1_; + int nderps_; + int nfunc_; + int o_vars_; + int want_deriv_; + int x0kind_; + int rflags; /* flags given to the .nl reader */ + size_t nzjac_; + size_t x0len_; + size_t nZc_; /* no. of nonzeros in constraints' Jacobian */ + size_t nZo_; /* no. of nonzeros in all objective gradients */ + + char *filename_; /* stub + current extension */ + char *stub_end_; /* copy new extension (starting with ".") */ + /* here to adjust filename */ + void *archan_; /* channel for reading from AMPL */ + void *awchan_; /* channel from writing to AMPL */ + int binary_nl_; /* 0 = ASCII format, 1 = binary */ + int return_nofile_; /* 0 ==> jacdim0 should exit if stub.nl */ + /* does not exist; 1 ==> return 0 */ + int plterms_; /* no. of piecewise-linear terms */ + int maxrownamelen_; /* length of longest constraint name */ + /* (if stub.row exists) */ + int maxcolnamelen_; /* length of longest constraint name */ + /* (if stub.col exists) */ + int co_index_; /* set this to (constraint number - 1) or */ + /* -(objective number) to identify the */ + /* constraint or objective being evaluated */ + /* (used in report_where()) */ + int cv_index_; /* used internally */ + Jmp_buf *err_jmp_; /* If nonzero when an error is detected, */ + /* longjmp here (without printing an error */ + /* message). */ + Jmp_buf *err_jmp1_; /* If nonzero when an error is detected */ + /* (and err_jmp_ == 0), longjmp here after */ + /* printing an error message. */ + fint ampl_options_[10]; + fint obj_no_; /* objective number (for write_sol and */ + /* read_sol) */ + int nranges_; /* no. of ranges (constraints with */ + /* negInfinity < lhs < rhs < Infinity) */ + int want_xpi0_; /* & 1 ==> allocate X0_ if an */ + /* initial guess is available */ + /* & 2 ==> allocate pi0_ if a dual */ + /* initial guess is available */ + + /* starting subscripts for cexp1's: request by */ + /* assigning these pointers before invoking edagread */ + + int *c_cexp1st_; /* cexp1 starts for constraints */ + int *o_cexp1st_; /* cexp1 starts for objectives */ + + /* for complementarity constraints */ + + int *cvar_; /* cvar[i] > 0 means constraint i complements */ + /* variable cvar[i] - 1 */ + + int *ccind1, *ccind2; /* populated when ASL_cc_simplify is */ + /* "on" in the flags argument to the .nl reader */ + + unsigned size_expr_n_; /* size for struct expr_n, for nlc */ + + /* extra info for write_sol */ + real ampl_vbtol_; + + /* relocated adjoints for common expressions */ + /* (used by nlc; request by allocating) */ + + int **zaC_; /* for common expressions */ + int **zac_; /* for constraints */ + int **zao_; /* for objectives */ + + /* for nlc */ + + int skip_int_derivs_; + + /* for suffixes */ + + int nsuffixes; + int nsufext[4]; + int nsuff[4]; + SufDesc *suffixes[4]; + + /* for sparse gradients */ + + int **zerograds_; + int congrd_mode; /* How to treat arg G to Congrd: */ + /* 0 == expand to n_var vector (default) */ + /* 1 == compact storage in G */ + /* 2 == use goff fields of struct cgrad */ + int x_known; /* used by xknown(), xunknown() */ + Long xknown_ignore; /* for debugging: ignore xknown */ + size_t zap_J; /* used by dense_j */ + int nxval; /* used by conival and objval */ + int nlvog; /* objgrd(np,x,g,ne) sets g[i] = 0 */ + /* if the objective does not depend on x[i] */ + /* and i < nlvog (or i < max(c_vars, o_vars) */ + /* if nlvog is left at 0); nlvog must be set */ + /* before the .nl reader is called. */ + int *ncxval; /* for conival */ + int *noxval; /* for objval */ + SputInfo *sputinfo_; /* used by sputhes() */ + + /* for ASL_free */ + void **Mbnext, **Mblast, *Mb; + /* for mem */ + char *memNext, *memLast; + + /* for user-defined functions */ + AmplExports *ae; + + /* for con_name(), obj_name(), var_name() */ + + char **connames; + char **lconnames; + char **objnames; + char **varnames; + int vcochecked; + + /* for possible user-specific use */ + void *uinfo; + + /* for reading alternate binary formats */ + void (*iadjfcn)(void*, size_t); + void (*dadjfcn)(void*, size_t); + const char *opfmt; /* format of opcodes */ + + /* for scaling */ + real *cscale; /* constraints */ + real *vscale; /* variables */ + real *lscale; /* Lagrange-multiplier scale */ + + /* for at_reset() */ + + Exitcall *arlast; + Exitcall *arnext; + Exitcall *arprev; + + /* for suf_sos() */ + + SufDesc *csd; + SufDesc *rsd; + int n_var0; /* number of variables before suf_sos() */ + int n_con0; /* number of constraints before suf_sos() */ + int n_var1; /* index of next variable to be added */ + int n_con1; /* index of next constraint to be added */ + int *vmap; /* for mapping variables, length n_var */ + int *cmap; /* for mapping constraints, length n_con */ + int *vzap; /* for zeroing primal variables in eliminated suf_sos */ + /* constraints: vzmap[i] for 1 <= i <= vzmap[0] */ + int *czap; /* for zeroing dual variables of eliminated suf_sos */ + /* constraints: czap[i] for 1 <= i <= czmap[0] */ + int *vminv; /* inverse of vmap; allocated on demand */ + + /* for modifying objectives */ + Objrep **Or; + real *orscratch; /* scratch (if needed) */ + + /* for simplifying complementarities */ + MPEC_Adjust *mpa; + + /* for derivative errors */ + DerivErrInfo *Derrs, *Derrs0; + + /* bounds and solution filenames */ + char *boundsfile; + char *solfile; + } Edaginfo; + + struct +ASL { + Edagpars p; + Edaginfo i; + }; + + typedef struct +NewVCO { + int nnv; /* number of new variables */ + int nnc; /* number of new constraints */ + int nno; /* number of new objectives */ + ograd **newc; /* new constraint nonzeros */ + ograd **newo; /* new objective nonzeros */ + real *LUnv; /* nnv variable lower bounds or, if Unv is null, */ + /* nnv (lower,upper) bound pairs */ + real *Unv; /* null or nnv variable upper bounds */ + real *LUnc; /* nnc constraint lower bounds or, if Unc is null, */ + /* nnc (lower,upper) bound pairs */ + real *Unc; /* null or nnc constraint upper bounds */ + real *oc; /* null or nno objective constants */ + char *ot; /* objective types (1 = max, 0 = min) */ + /* taken to be all zeros (min) if null */ + real *x0; /* null or nnv primal initial guesses */ + real *d0; /* null or nnc dual initial guesses */ + } NewVCO; + + struct +TMInfo { + union { + TMInfo *prev; + double align; + } u; + }; + +#define A_colstarts asl->i.A_colstarts_ +#define A_colstartsZ asl->i.A_colstartsZ_ +#define A_rownos asl->i.A_rownos_ +#define A_vals asl->i.A_vals_ +#define Cgrad asl->i.Cgrad_ +#define CgradZ asl->i.CgradZ_ +#define Fortran asl->i.Fortran_ +#define LUrhs asl->i.LUrhs_ +#define LUv asl->i.LUv_ +#define Lastx asl->i.Lastx_ +#define Ograd asl->i.Ograd_ +#define Urhsx asl->i.Urhsx_ +#define Uvx asl->i.Uvx_ +#define X0 asl->i.X0_ +#define adjoints asl->i.adjoints_ +#define adjoints_nv1 asl->i.adjoints_nv1_ +#define amax asl->i.amax_ +#define ampl_options asl->i.ampl_options_ +#define ampl_vbtol asl->i.ampl_vbtol_ +#define amplflag asl->i.amplflag_ +#define archan asl->i.archan_ +#define awchan asl->i.awchan_ +#define binary_nl asl->i.binary_nl_ +#define c_cexp1st asl->i.c_cexp1st_ +#define c_vars asl->i.c_vars_ +#define co_index asl->i.co_index_ +#define comb asl->i.comb_ +#define combc asl->i.combc_ +#define comc asl->i.comc_ +#define comc1 asl->i.comc1_ +#define como asl->i.como_ +#define como1 asl->i.como1_ +#define cv_index asl->i.cv_index_ +#define cvar asl->i.cvar_ +#define err_jmp asl->i.err_jmp_ +#define err_jmp1 asl->i.err_jmp1_ +#define fhash asl->i.fhash_ +#define filename asl->i.filename_ +#define funcs asl->i.funcs_ +#define funcsfirst asl->i.funcsfirst_ +#define funcslast asl->i.funcslast_ +#define havepi0 asl->i.havepi0_ +#define havex0 asl->i.havex0_ +#define lnc asl->i.lnc_ +#define maxcolnamelen asl->i.maxcolnamelen_ +#define maxrownamelen asl->i.maxrownamelen_ +#define nZc asl->i.nZc_ +#define nZo asl->i.nZo_ +#define n_cc asl->i.n_cc_ +#define n_con asl->i.n_con_ +#define n_conjac asl->i.n_conjac_ +#define n_eqn asl->i.n_eqn_ +#define n_lcon asl->i.n_lcon_ +#define n_obj asl->i.n_obj_ +#define n_var asl->i.n_var_ +#define nbv asl->i.nbv_ +#define nclcon asl->i.nclcon_ +#define ncom0 asl->i.ncom0_ +#define ncom1 asl->i.ncom1_ +#define nderps asl->i.nderps_ +#define need_nl asl->i.need_nl_ +#define nfunc asl->i.nfunc_ +#define niv asl->i.niv_ +#define nlc asl->i.nlc_ +#define nlcc asl->i.nlcc_ +#define nlnc asl->i.nlnc_ +#define nlo asl->i.nlo_ +#define nlogv asl->i.nbv_ /* nbv used to be called nlogv */ +#define nlvb asl->i.nlvb_ +#define nlvbi asl->i.nlvbi_ +#define nlvc asl->i.nlvc_ +#define nlvci asl->i.nlvci_ +#define nlvo asl->i.nlvo_ +#define nlvoi asl->i.nlvoi_ +#define nranges asl->i.nranges_ +#define nwv asl->i.nwv_ +#define nzc asl->i.nzc_ +#define nzjac asl->i.nzjac_ +#define nzo asl->i.nzo_ +#define o_cexp1st asl->i.o_cexp1st_ +#define o_vars asl->i.o_vars_ +#define obj_no asl->i.obj_no_ +#define objtype asl->i.objtype_ +#define pi0 asl->i.pi0_ +#define plterms asl->i.plterms_ +#define return_nofile asl->i.return_nofile_ +#define size_expr_n asl->i.size_expr_n_ +#define skip_int_derivs asl->i.skip_int_derivs_ +#define sputinfo asl->i.sputinfo_ +#define stub_end asl->i.stub_end_ +#define want_deriv asl->i.want_deriv_ +#define want_xpi0 asl->i.want_xpi0_ +#define x0kind asl->i.x0kind_ +#define x0len asl->i.x0len_ +#define xscanf asl->i.xscanf_ +#define zaC asl->i.zaC_ +#define zac asl->i.zac_ +#define zao asl->i.zao_ +#define zerograds asl->i.zerograds_ + +#define M1alloc(n) M1alloc_ASL(&asl->i,n) +#define M1free M1free_ASL +#define M1record(n) M1record_ASL(&asl->i,n) +#define M1zapalloc(n) M1zapalloc_ASL(&asl->i,n) +#define Mach Mach_ASL +#define ascanf ascanf_ASL +#define badline badline_ASL +#define badread badread_ASL +#define bscanf bscanf_ASL +#define derprop derprop_ASL +#define dynlink dynlink_ASL +#define edag_peek edag_peek_ASL +#define edagread_one edag_one_ASL +#define fpecatch fpecatch_ASL +#define fpe_jmpbuf fpe_jmpbuf_ASL +#define func_add func_add_ASL +#define func_lookup func_lookup_ASL +#define g_fmt g_fmt_ASL +#define g_fmtp g_fmtp_ASL +#define g_fmtop g_fmtop_ASL +#define g_fmt_E gfmt_E_ASL +#define g_fmt_decpt gfmt_decpt_ASL +#define hscanf hscanf_ASL +#define htcl htcl_ASL +#define mem(n) mem_ASL((ASL*)asl,n) +#define mymalloc mymalloc_ASL +#define mypow mypow_ASL +#define myralloc myralloc_ASL +#define obj_prec obj_prec_ASL +#define optype op_type_ASL +#define optypeb op_typeb_ASL +#define pr_unknown pr_unknown_ASL +#define read_line read_line_ASL +#define report_where report_where_ASL +#define scream scream_ASL +#define what_prog what_prog_ASL + + extern real Infinity, edagread_one, negInfinity; + extern char g_fmt_E, *progname; + extern int g_fmt_decpt; + extern ASL *cur_ASL; + +enum { /* mode bits for ASLtype */ + ASL_read_f = 1, + ASL_read_fg = 2, + ASL_read_fgh = 3, + ASL_read_pfg = 4, + ASL_read_pfgh = 5 + }; + +enum { /* bits for x0kind */ + ASL_have_conval = 1, + ASL_have_objcom = 2, + ASL_first_x = 4, + ASL_have_funnel = 8, /* in con[12]ival */ + ASL_need_funnel = 16, /* in pshvprod */ + ASL_have_concom = 32 + }; + +enum ASL_reader_flag_bits { /* bits in flags arg */ + /* values just relevant to pfg_read and pfgh_read: */ + /* If you do not need the sparsity pattern, */ + /* you can omit linear coefficients of zero. */ + ASL_J_zerodrop = 1, /* Omit 0 linear terms in constraint derivs. */ + ASL_G_zerodrop = 2, /* Omit 0 linear terms in objective derivs. */ + ASL_GJ_zerodrop = 3, /* Omit both kinds of zero linear terms. */ + ASL_findOgroups = 4, /* Find objective group structure. */ + ASL_findCgroups = 8, /* Find constraint group structure. */ + ASL_findgroups = 12, /* Find both group structures; you want this */ + /* unless you're a solver like LANCELOT that */ + /* deals explicitly with group structure. */ + ASL_find_c_class = 32, /* Find c_class and c_class_max: see nlp.h */ + ASL_find_o_class = 64, /* Find o_class and o_class_max: or nlp2.h */ + ASL_find_co_class = 96, /* Find all four */ + + /* applicable to all .nl file readers: */ + ASL_return_read_err = 16, + ASL_keep_all_suffixes = 0x80, + ASL_allow_CLP = 0x1000, /* permit CLP extensions */ + ASL_find_default_no_groups = 0x2000, /* Assume ASL_findgroups */ + /* when this bit is off. */ + /* When ASL_find_default_no_groups is on, pfg_read and pfgh_read */ + /* only honor explicit specification of the ASL_findgroups bits. */ + + /* Stuff for fg_wread: */ + + ASL_omit_all_suffixes = 0x100, + ASL_keep_derivs = 0x200, + ASL_allow_missing_funcs = 0x400, + ASL_forbid_missing_funcs = 0x800, + + /* problem adjustments */ + + ASL_no_linear_cc_rhs_adjust = 0x4000, /* Omit constant term adjustment */ + /* of linear complementarities. */ + + ASL_cc_simplify = 0x8000, /* Provide arrays ccind1 and ccind2 and */ + /* modify complementarities (possibly */ + /* increasing n_cc) so the complementarity */ + /* constraints have the form */ + /* _svar[i] >= 0 complements _svar[j] >= 0 */ + /* for i = ccind1[k] - Fortran */ + /* and j = ccind2[k] - Fortran, */ + /* 0 <= k < n_cc. */ + + ASL_obj_replace_ineq = 0x10000, /* Whether to replace an objective of the */ + /* form minimize or maximize const*var and */ + /* a corresponding constraint of the form */ + /* var relop expr with const*expr, where */ + /* relop is either >= or <=, depending */ + /* on the sense of optimization, and var */ + /* does not appear elsewhere. */ + + ASL_obj_replace_eq = 0x20000, /* Similar to ASL_obj_replace, but where */ + /* relop is == . */ + + ASL_rowwise_jac = 0x40000, /* Whether Jacobian nonzeros should be stored */ + /* row-wise rather than column-wise, in which */ + /* case the A_colstarts array provides offsets */ + /* of rows rather than columns. */ + + ASL_want_A_vals = 0x80000, /* Allocate and use A_vals (if NULL), allowing */ + /* space needed for ASL_cc_simplify. */ + + ASL_sep_U_arrays = 0x100000, /* Allocate and use Uvx and Urhsx */ + + ASL_allow_Z = 0x200000, /* Accept problems with nZc >= 2^31, populating */ + /* A_colstarsZ rather than A_colstarts. */ + ASL_use_Z = 0x400000, /* Use A_colstartsZ rather than A_colstarts, */ + /* regardless of problem size. */ + ASL_opified = 0x800000 /* internal use: qp_opify called */ + }; + +enum ASL_reader_error_codes { + /* return codes from .nl readers with flag ASL_ret_read_err */ + ASL_readerr_none = 0, /* all went well */ + ASL_readerr_nofile = 1, /* cannot open .nl file */ + ASL_readerr_nonlin = 2, /* model involves nonlinearities (ed0read) */ + ASL_readerr_argerr = 3, /* user-defined function with bad args */ + ASL_readerr_unavail= 4, /* user-defined function not available */ + ASL_readerr_corrupt= 5, /* corrupt .nl file */ + ASL_readerr_bug = 6, /* bug in .nl reader */ + ASL_readerr_CLP = 7 /* solver cannot handle CLP extensions */ + }; + +enum ASL_suf_sos_flags { /* bits in flags parameter of suf_sos() */ + ASL_suf_sos_explict_free = 1, /* caller will explicitly free */ + /* returned arrays */ + ASL_suf_sos_ignore_sosno = 2, /* ignore .sosno */ + ASL_suf_sos_ignore_amplsos = 4 /* ignore SOS information from */ + /* transformations of piecewise- */ + /* linear terms (etc.) by AMPL */ + }; + +enum ASL_write_flags { + ASL_write_ASCII = 1, + ASL_write_CR = 2 + }; + +enum ASL_writer_error_codes { + ASL_writeerr_openfail = 1, + ASL_writeerr_badrops = 2, + ASL_writeerr_badcexp1st = 3, + ASL_writeerr_badNewVCO = 4 + }; + +#define f_OPNUM f_OPNUM_ASL +#undef basename +#define basename basename_ASL +#ifndef Sig_ret_type +#define Sig_ret_type void +#endif + + typedef struct +QPinfo { + int nc; /* number of nonempty columns */ + int nz; /* number of nonzeros */ + int *colno; /* column numbers of nonempty columns */ + size_t *colbeg; /* nonzeros for column colno[i]: (rowno[j], delsq[j]) */ + int *rowno; /* for colbeg[i] <= j < colbeg[i+1], except that values */ + real *delsq; /* in colno, colbeg, and rowno are incremented by Fortran */ + } QPinfo; + + extern ASL *ASL_alloc(int); + extern void ASL_free(ASL**); + extern long ASLdate_ASL; + extern void Del_mblk_ASL(ASL*, int, void*); + extern EdRead *EdReadInit_ASL(EdRead*, ASL*, FILE*, void*); + extern void LUcopy_ASL(int, real*, real*, real*); + extern void *M1alloc_ASL(Edaginfo*, size_t); + extern void M1free(Edaginfo*, void**, void**); + extern void **M1record_ASL(Edaginfo*, void*); + extern void *M1zapalloc_ASL(Edaginfo*, size_t); + extern void MAIN__(VOID); + extern void Mach_ASL(VOID); + extern void No_derivs_ASL(const char*); + extern int Sprintf(char*, const char*, ...); + extern void Stderr_init_ASL(void); + extern void Suf_read_ASL(EdRead*, int); + extern void adjust_zerograds_ASL(ASL*, int); + extern int already_ASL(const char*); + extern int ascanf(EdRead*, const char*, ...); + extern void auxinfo_ASL(AmplExports*); + extern void *b_search_ASL(void *ow, int owsize, int n, char **sp, char **peq); + extern void badasl_ASL(ASL*,int,const char*); + extern void badline(EdRead*); + extern void badread(EdRead*); + extern char *basename(const char*); + extern int bscanf(EdRead*, const char*, ...); + extern char *con_name_ASL(ASL*,int); + extern char *con_name_nomap_ASL(ASL*,int,int*); + extern int conadj_ASL(ASL*,int*,int); + extern void congrd_(fint *N, fint *I, real *X, real *G, fint *nerror); + extern real cnival_(fint *N, fint *I, real *X, fint *nerror); + extern void colstart_inc_ASL(ASL*); + extern void conscale_ASL(ASL*, int, real, fint*); + extern void conval_(fint *M, fint *N, real *X, real *F, fint *nerror); + extern void delprb_(VOID); + extern void dense_j_ASL(ASL*); + extern void densej_(VOID); + extern void deriv_errchk_ASL(ASL*, fint*, int coi, int n); + extern void deriv_errclear_ASL(Edaginfo*); + extern void derprop(derp *); + extern char *dtoa(double, int, int, int*, int*, char **); + extern ufunc *dynlink_ASL(const char*); + extern int edag_peek(EdRead*); + extern void equ_adjust_ASL(ASL*, int*, int*); + extern void exit_ASL(EdRead*,int); + extern real f_OPNUM(expr_n*); + extern int f_read_ASL(ASL*, FILE*, int); + extern int fg_read_ASL(ASL*, FILE*, int); + extern int fg_wread_ASL(ASL*, FILE*, int); + extern int fgh_read_ASL(ASL*, FILE*, int); + extern int fg_write_ASL(ASL*, const char*, NewVCO*, int); + extern void fintrouble_ASL(ASL*, func_info*, const char*, TMInfo*); + extern void flagsave_ASL(ASL*, int); + extern void freedtoa(char*); + extern func_info *func_lookup(ASL*, const char*, int add); + extern void func_add(ASL*); + extern int g_fmt(char*, double); + extern int g_fmtop(char*, double); + extern int g_fmtp(char*, double, int); + extern void gen_rownos_ASL(ASL*); + extern ASL *get_cur_ASL(VOID); + extern int *get_vcmap_ASL(ASL*, int); + extern int *get_vminv_ASL(ASL*); + extern char *getenv_ASL(const char*); + extern void goff_comp_ASL(ASL*); + extern int hscanf(EdRead*, const char*, ...); + extern int htcl_ASL(unsigned int); + extern void hvcomp_(real *hv, real *p, fint *nobj, real *ow, real *y); + extern void hvinit_(fint *nobj, real *ow, real *y); + extern int indicator_constrs_ASL(ASL*, void*, Add_Indicator, int errinfo[2]); + extern void intcatch_ASL(ASL*, void (*)(int,void*), void*); + extern void introuble_ASL(ASL*, const char *who, real a, int jv); + extern void introuble2_ASL(ASL*, const char *who, real a, real b, int jv); + extern FILE *jac0dim_ASL(ASL*, const char *stub, ftnlen stub_len); + extern int jac1dim_ASL(ASL*, const char *stub, fint *M, fint *N, fint *NO, + fint *NZ, fint *MXROW, fint *MXCOL, ftnlen stub_len); + extern int jac2dim_ASL (ASL*, const char *stub, fint *M, fint *N, fint *NO, + fint *NZ, fint *MXROW, fint *MXCOL, ftnlen stub_len); + extern FILE *jac_dim_ASL(ASL*, const char *stub, fint *M, fint *N, fint *NO, + fint *NZ, fint *MXROW, fint *MXCOL, ftnlen stub_len); + extern int jacdim_(const char *stub, fint *M, fint *N, fint *NO, fint *NZ, + fint *MXROW, fint *MXCOL, ftnlen stub_len); + extern void jacinc_(fint *M, fint *N, fint *NZ, + fint *JP, short *JI, real *X, real *L, real *U, + real *Lrhs, real *Urhs, real *Inf); + extern int jacpdim_ASL(ASL*, const char *stub, fint *M, fint *N, fint *NO, + fint *NZ, fint *MXROW, fint *MXCOL, ftnlen stub_len); + extern void jacval_(fint *M, fint *N, fint *NZ, real *X, + real *JAC, fint *nerror); + extern Sig_ret_type fpecatch(int); + extern jmp_buf fpe_jmpbuf_ASL; + extern int ka_read_ASL(ASL *, EdRead *, int, int**, size_t**); + extern void lagscale_ASL(ASL*, real, fint*); + extern char *lcon_name_ASL(ASL*,int); + extern void mainexit_ASL(int); + extern void *mem_ASL(ASL*, unsigned int); + extern int mip_pri_ASL(ASL*,int**startp,int**nump,int**prip,fint pmax); + extern void mnnzchk_ASL(ASL*asl,fint*M,fint*N,size_t NZ,const char*who); + extern void mpec_adjust_ASL(ASL*); + extern void mpec_auxvars_ASL(ASL*, real *c, real *x); + extern fint mqpcheck_ASL(ASL*, int co, fint **rowqp, fint **colqp, real **delsqp); + extern ssize_t mqpcheckZ_ASL(ASL*, int co, fint **rowqp, size_t **colqp, real **delsqp); + extern ssize_t mqpcheckv_ASL(ASL*, int co, QPinfo **QPIp, void **vp); + extern void mqpcheckv_free_ASL(ASL*, void **vp); + extern void *mymalloc(size_t); + extern real mypow(real,real); + extern void *myralloc(void *, size_t); + extern void *new_mblk_ASL(ASL*, int k); + extern int nl_obj_ASL(ASL*,int); + extern fint nqpcheck_ASL(ASL*, int co, fint **rowqp, fint **colqp, real **delsqp); + extern ssize_t nqpcheckZ_ASL(ASL*, int co, fint **rowqp, size_t **colqp, real **delsqp); + extern char *obj_name_ASL(ASL*,int); + extern int obj_prec(VOID); + extern void obj_adj_ASL(ASL*); + extern void obj_adj_xy_ASL(ASL *asl, real *x, real *x0, real *y); + extern real objconst_ASL(ASL*,int); + extern void objgrd_(fint *N, real *X, fint *NOBJ, real *G, fint *nerror); + extern real objval_(fint *N, real *X, fint *NOBJ, fint *nerror); + extern char optype[], optypeb[]; + extern int pfg_read_ASL(ASL*, FILE*, int flags); + extern int pfgh_read_ASL(ASL*, FILE*, int flags); + extern char *pr_unknown(FILE*, char*); + extern int prob_adj_ASL(ASL*); + extern void qp_opify_ASL(ASL*); + extern int qp_read_ASL(ASL*, FILE*, int); + extern fint qpcheck_ASL(ASL*, fint **rowqp, fint **colqp, real **delsqp); + extern ssize_t qpcheckZ_ASL(ASL*, fint **rowqp, size_t **colqp, real **delsqp); + extern char *read_line(EdRead*); + extern char *read_sol_ASL(ASL*, real**xp, real **yp); + extern void report_where(ASL*); + extern void scream(EdRead*, int rc, const char *fmt, ...); + extern ASL *set_cur_ASL(ASL*); /* returns previous value */ + extern real set_randseed_ASL(real nseed); /* returns new seed, usually nseed, but */ + /* automaticaally chosen if nseed == 0. */ + extern void show_funcs_ASL(ASL*); + extern void sigcatch_ASL(VOID); + extern void* sos_add_ASL(ASL*, FILE*, int); + extern int sos_finish_ASL(ASL*,void**,int,int*,int**,int*,int**,int**,real**); + extern void student_check_ASL(ASL*); + extern void suf_declare_ASL(ASL*, SufDecl*, int); + extern SufDesc *suf_get_ASL(ASL*, const char*, int); + extern SufDesc *suf_iput_ASL(ASL*, const char*, int, int*); + extern SufDesc *suf_rput_ASL(ASL*, const char*, int, real*); + extern int suf_sos_ASL(ASL*,int,int*,char**,int**,int*,int**,int**,real**); + extern char *var_name_ASL(ASL*,int); + extern char *var_name_nomap_ASL(ASL*,int,int*); + extern void varscale_ASL(ASL*, int, real, fint*); + extern void what_prog(VOID); + extern void write_sol_ASL(ASL*, const char *msg, double *x, double *y, Option_Info*); + extern int write_solf_ASL(ASL*, const char *msg, double *x, double *y, Option_Info *, + const char*); + extern int write_solfx_ASL(ASL*, const char *msg, double *x, double *y, Option_Info *, + Fwrite, Fwrite, Fwrite, const char*); + extern void wrsolw_(char *msg, fint *nmsg, real *x, real *y, fint *wantsol, + ftnlen msg_len); + extern void wrtsol_(char *msg, fint *nmsg, real *x, real *y, + ftnlen msg_len); + extern real xectim_(VOID); + extern void xknowe_(real *x, fint *nerror); + extern void xknown_(real *x); + extern void xunkno_(VOID); + extern void zero_div_ASL(ASL*, real, const char*); + +#ifndef No_dtoa + extern double strtod_ASL(Const char*, char**); +#ifndef strtod /* if not set by previous funcadd.h */ +#define strtod strtod_ASL +#endif +#endif + +#ifdef __cplusplus + } +#endif + +#define con_name(n) con_name_ASL((ASL*)asl,n) +#define conadj(cv) conadj_ASL((ASL*)asl,cv,1) +#define conscale(i,s,ie) conscale_ASL((ASL*)asl,i,s,ie) +#define dense_j() dense_j_ASL((ASL*)asl) +#define edagread(f) fg_read_ASL((ASL*)asl,f,0) /* dreg */ +#define equ_adjust(x,y) equ_adjust_ASL((ASL*)asl,x,y) +#define f_read(a,b) f_read_ASL((ASL*)asl,a,b) +#define fg_read(a,b) fg_read_ASL((ASL*)asl,a,b) +#define fg_wread(a,b) fg_wread_ASL((ASL*)asl,a,b) +#define fg_write(a,b,c) fg_write_ASL((ASL*)asl,a,b,c) +#define fgh_read(a,b) fgh_read_ASL((ASL*)asl,a,b) +#define gen_rownos() gen_rownos_ASL((ASL*)asl) +#undef getenv +#define getenv getenv_ASL +#define int_catch(f,v) intcatch_ASL((ASL*)asl,f,v) +#define jac0dim(stub,len) jac0dim_ASL((ASL*)asl,stub,len) +#define jac1dim(s,m,n,no,nz,mxr,mxc,L) jac1dim_ASL((ASL*)asl,s,m,n,no,nz,mxr,mxc,L) +#define jac2dim(s,m,n,no,nz,mxr,mxc,L) jac2dim_ASL((ASL*)asl,s,m,n,no,nz,mxr,mxc,L) +#define jacdim(stub,M,N,NO,NZ,MXR,MXC,len) jac_dim_ASL((ASL*)asl,stub,M,N,NO,NZ,MXR,MXC,len) +#define jacdim0(stub,len) jac0dim_ASL((ASL*)asl,stub,len) +#define jacpdim(s,m,n,no,nz,mxr,mxc,L) jacpdim_ASL((ASL*)asl,s,m,n,no,nz,mxr,mxc,L) +#define lagscale(s,ie) lagscale_ASL((ASL*)asl,s,ie) +#define lcon_name(n) lcon_name_ASL((ASL*)asl,n) +#define mip_pri(a,b,c,d) mip_pri_ASL((ASL*)asl,a,b,c,d) +#define mqpcheck(a,b,c,d) mqpcheck_ASL((ASL*)asl,a,b,c,d) +#define mqpcheckv(a,b,c) mqpcheckv_ASL((ASL*)asl,a,b,c) +#define mqpcheckv_free(a) mqpcheckv_free_ASL((ASL*)asl,a) +#define nl_obj(n) nl_obj_ASL((ASL*)asl,n) +#define nqpcheck(a,b,c,d) nqpcheck_ASL((ASL*)asl,a,b,c,d) +#define obj_name(n) obj_name_ASL((ASL*)asl,n) +#define objconst(n) objconst_ASL((ASL*)asl,n) +#define pfg_read(a,b) pfg_read_ASL((ASL*)asl,a,b) +#define pfgh_read(a,b) pfgh_read_ASL((ASL*)asl,a,b) +#define qp_opify() qp_opify_ASL((ASL*)asl) +#define qp_read(a,b) qp_read_ASL((ASL*)asl,a,b) +#define qpcheck(a,b,c) qpcheck_ASL((ASL*)asl,a,b,c) +#define read_soln(x,y) read_sol_ASL((ASL*)asl,x,y) +#define show_funcs() show_funcs_ASL((ASL*)asl) +#define sos_add(a,b) sos_add_ASL((ASL*)asl,a,b) +#define sos_finish(a,b,c,d,e,f,g,h) sos_finish_ASL((ASL*)asl,a,b,c,d,e,f,g,h) +#define suf_declare(x,n) suf_declare_ASL((ASL*)asl,x,(int)(n)) +#define suf_get(s,i) suf_get_ASL((ASL*)asl,s,i) +#define suf_iput(n,i,x) suf_iput_ASL((ASL*)asl,n,i,x) +#define suf_rput(n,i,x) suf_rput_ASL((ASL*)asl,n,i,x) +#define suf_sos(a,b,c,d,e,f,g,h) suf_sos_ASL((ASL*)asl,a,b,c,d,e,f,g,h) +#define var_name(n) var_name_ASL((ASL*)asl,n) +#define varscale(i,s,ie) varscale_ASL((ASL*)asl,i,s,ie) +#define write_sol(m,x,y,oi) write_sol_ASL((ASL*)asl,m,x,y,oi) +#define write_soln(m,x,y) write_sol_ASL((ASL*)asl,m,x,y,0) +#ifdef KR_headers +#define del_mblk(a,b) Del_mblk_ASL((ASL*)asl, a, (void*)(b)) +#else +#define del_mblk(a,b) Del_mblk_ASL((ASL*)asl,a,b) +#endif +#define new_mblk(n) new_mblk_ASL((ASL*)asl,n) + +#define exit mainexit_ASL + +#ifdef MULTIPLE_THREADS +#define A_ASL , ASL *asl +#define C_ASL , (ASL*)asl +#define D_ASL ASL *asl; +#define K_ASL , asl +#ifndef MEM_LOCK +#define MEM_LOCK 3 +#endif +#ifndef MBLK_LOCK +#define MBLK_LOCK 4 +#endif +#ifndef HESOPROD_LOCK +#define HESOPROD_LOCK 5 +#endif +#else /* MULTIPLE_THREADS */ +#define A_ASL /*nothing*/ +#define C_ASL /*nothing*/ +#define D_ASL /*nothing*/ +#define K_ASL /*nothing*/ +#define ACQUIRE_DTOA_LOCK(n) /*nothing*/ +#define FREE_DTOA_LOCK(n) /*nothing*/ +#endif /* MULTIPLE_THREADS */ + +#define ASL_CHECK(a,n,w) if(!a||a->i.ASLtype!=n)badasl_ASL(a,n,w);cur_ASL=a; +#endif /* ASL_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/asl_pfg.h b/thirdparty/linux/include/coin/ThirdParty/asl_pfg.h new file mode 100644 index 0000000..e3d26be --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/asl_pfg.h @@ -0,0 +1,29 @@ +/**************************************************************** +Copyright (C) 1997 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#undef PSHVREAD +#ifndef ASL_PFG_included +#define ASL_PFG_included +#include "psinfo.h" +#endif /* ASL_PFG_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/asl_pfgh.h b/thirdparty/linux/include/coin/ThirdParty/asl_pfgh.h new file mode 100644 index 0000000..fc3e71c --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/asl_pfgh.h @@ -0,0 +1,30 @@ +/**************************************************************** +Copyright (C) 1997 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#undef PSHVREAD +#define PSHVREAD +#ifndef ASL_PFGH_included +#define ASL_PFGH_included +#include "psinfo.h" +#endif /* ASL_PFGH_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/dmumps_c.h b/thirdparty/linux/include/coin/ThirdParty/dmumps_c.h new file mode 100644 index 0000000..1d5c2c9 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/dmumps_c.h @@ -0,0 +1,159 @@ +/* + * + * This file is part of MUMPS 4.10.0, built on Tue May 10 12:56:32 UTC 2011 + * + * + * This version of MUMPS is provided to you free of charge. It is public + * domain, based on public domain software developed during the Esprit IV + * European project PARASOL (1996-1999). Since this first public domain + * version in 1999, research and developments have been supported by the + * following institutions: CERFACS, CNRS, ENS Lyon, INPT(ENSEEIHT)-IRIT, + * INRIA, and University of Bordeaux. + * + * The MUMPS team at the moment of releasing this version includes + * Patrick Amestoy, Maurice Bremond, Alfredo Buttari, Abdou Guermouche, + * Guillaume Joslin, Jean-Yves L'Excellent, Francois-Henry Rouet, Bora + * Ucar and Clement Weisbecker. + * + * We are also grateful to Emmanuel Agullo, Caroline Bousquet, Indranil + * Chowdhury, Philippe Combes, Christophe Daniel, Iain Duff, Vincent Espirat, + * Aurelia Fevre, Jacko Koster, Stephane Pralet, Chiara Puglisi, Gregoire + * Richard, Tzvetomila Slavova, Miroslav Tuma and Christophe Voemel who + * have been contributing to this project. + * + * Up-to-date copies of the MUMPS package can be obtained + * from the Web pages: + * http://mumps.enseeiht.fr/ or http://graal.ens-lyon.fr/MUMPS + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY + * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * + * User documentation of any code that uses this software can + * include this complete notice. You can acknowledge (using + * references [1] and [2]) the contribution of this package + * in any scientific publication dependent upon the use of the + * package. You shall use reasonable endeavours to notify + * the authors of the package of this publication. + * + * [1] P. R. Amestoy, I. S. Duff, J. Koster and J.-Y. L'Excellent, + * A fully asynchronous multifrontal solver using distributed dynamic + * scheduling, SIAM Journal of Matrix Analysis and Applications, + * Vol 23, No 1, pp 15-41 (2001). + * + * [2] P. R. Amestoy and A. Guermouche and J.-Y. L'Excellent and + * S. Pralet, Hybrid scheduling for the parallel solution of linear + * systems. Parallel Computing Vol 32 (2), pp 136-156 (2006). + * + */ + +/* Mostly written in march 2002 (JYL) */ + +#ifndef DMUMPS_C_H +#define DMUMPS_C_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "mumps_compat.h" +/* Next line defines MUMPS_INT, DMUMPS_COMPLEX and DMUMPS_REAL */ +#include "mumps_c_types.h" + +#ifndef MUMPS_VERSION +/* Protected in case headers of other arithmetics are included */ +#define MUMPS_VERSION "4.10.0" +#endif +#ifndef MUMPS_VERSION_MAX_LEN +#define MUMPS_VERSION_MAX_LEN 14 +#endif + +/* + * Definition of the (simplified) MUMPS C structure. + * NB: DMUMPS_COMPLEX are REAL types in s and d arithmetics. + */ +typedef struct { + + MUMPS_INT sym, par, job; + MUMPS_INT comm_fortran; /* Fortran communicator */ + MUMPS_INT icntl[40]; + DMUMPS_REAL cntl[15]; + MUMPS_INT n; + + MUMPS_INT nz_alloc; /* used in matlab interface to decide if we + free + malloc when we have large variation */ + + /* Assembled entry */ + MUMPS_INT nz; + MUMPS_INT *irn; + MUMPS_INT *jcn; + DMUMPS_COMPLEX *a; + + /* Distributed entry */ + MUMPS_INT nz_loc; + MUMPS_INT *irn_loc; + MUMPS_INT *jcn_loc; + DMUMPS_COMPLEX *a_loc; + + /* Element entry */ + MUMPS_INT nelt; + MUMPS_INT *eltptr; + MUMPS_INT *eltvar; + DMUMPS_COMPLEX *a_elt; + + /* Ordering, if given by user */ + MUMPS_INT *perm_in; + + /* Orderings returned to user */ + MUMPS_INT *sym_perm; /* symmetric permutation */ + MUMPS_INT *uns_perm; /* column permutation */ + + /* Scaling (input only in this version) */ + DMUMPS_REAL *colsca; + DMUMPS_REAL *rowsca; + + /* RHS, solution, ouptput data and statistics */ + DMUMPS_COMPLEX *rhs, *redrhs, *rhs_sparse, *sol_loc; + MUMPS_INT *irhs_sparse, *irhs_ptr, *isol_loc; + MUMPS_INT nrhs, lrhs, lredrhs, nz_rhs, lsol_loc; + MUMPS_INT schur_mloc, schur_nloc, schur_lld; + MUMPS_INT mblock, nblock, nprow, npcol; + MUMPS_INT info[40],infog[40]; + DMUMPS_REAL rinfo[40], rinfog[40]; + + /* Null space */ + MUMPS_INT deficiency; + MUMPS_INT *pivnul_list; + MUMPS_INT *mapping; + + /* Schur */ + MUMPS_INT size_schur; + MUMPS_INT *listvar_schur; + DMUMPS_COMPLEX *schur; + + /* Internal parameters */ + MUMPS_INT instance_number; + DMUMPS_COMPLEX *wk_user; + + /* Version number: length=14 in FORTRAN + 1 for final \0 + 1 for alignment */ + char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1]; + /* For out-of-core */ + char ooc_tmpdir[256]; + char ooc_prefix[64]; + /* To save the matrix in matrix market format */ + char write_problem[256]; + MUMPS_INT lwk_user; + +} DMUMPS_STRUC_C; + + +void MUMPS_CALL +dmumps_c( DMUMPS_STRUC_C * dmumps_par ); + +#ifdef __cplusplus +} +#endif + +#endif /* DMUMPS_C_H */ + diff --git a/thirdparty/linux/include/coin/ThirdParty/funcadd.h b/thirdparty/linux/include/coin/ThirdParty/funcadd.h new file mode 100644 index 0000000..ec30d97 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/funcadd.h @@ -0,0 +1,487 @@ +/**************************************************************** +Copyright (C) 1997-2001 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#ifndef FUNCADD_H_INCLUDED +#define FUNCADD_H_INCLUDED +#include "stdio1.h" /* for ANSI and any printing */ + +#ifndef VA_LIST +#define VA_LIST va_list +#endif + +#ifdef _WIN32 +#define Stdio_redefs +#endif + + typedef struct cryptblock cryptblock; + +#ifdef __cplusplus +#undef KR_headers +extern "C" { +#endif + +#ifndef real +typedef double real; +#endif +typedef struct arglist arglist; +typedef struct function function; +typedef struct TVA TVA; +typedef struct AmplExports AmplExports; +typedef struct AuxInfo AuxInfo; +typedef struct TableInfo TableInfo; +typedef struct TMInfo TMInfo; + +#ifndef No_arglist_def + +#undef Const +#ifdef KR_headers +#define Const /* nothing */ +#else +#define Const const +#endif + + struct +arglist { /* Information sent to user-defined functions */ + int n; /* number of args */ + int nr; /* number of real input args */ + int *at; /* argument types -- see DISCUSSION below */ + real *ra; /* pure real args (IN, OUT, and INOUT) */ + Const char **sa; /* symbolic IN args */ + real *derivs; /* for partial derivatives (if nonzero) */ + real *hes; /* for second partials (if nonzero) */ + char *dig; /* if (dig && dig[i]) { partials w.r.t. */ + /* ra[i] will not be used } */ + Char *funcinfo; /* for use by the function (if desired) */ + AmplExports *AE; /* functions made visible (via #defines below) */ + function *f; /* for internal use by AMPL */ + TVA *tva; /* for internal use by AMPL */ + char *Errmsg; /* To indicate an error, set this to a */ + /* description of the error. When derivs */ + /* is nonzero and the error is that first */ + /* derivatives cannot or are not computed, */ + /* a single quote character (') should be */ + /* the first character in the text assigned */ + /* to Errmsg, followed by the actual error */ + /* message. Similarly, if hes is nonzero */ + /* and the error is that second derivatives */ + /* are not or cannot be computed, a double */ + /* quote character (") should be the first */ + /* character in Errmsg, followed by the */ + /* actual error message text. */ + TMInfo *TMI; /* used in Tempmem calls */ + Char *Private; + /* The following fields are relevant */ + /* only when imported functions are called */ + /* by AMPL commands (not declarations). */ + + int nin; /* number of input (IN and INOUT) args */ + int nout; /* number of output (OUT and INOUT) args */ + int nsin; /* number of symbolic input arguments */ + int nsout; /* number of symbolic OUT and INOUT args */ + }; + +typedef real (*rfunc) ANSI((arglist *)); +typedef real (ufunc) ANSI((arglist *)); + +#endif /* No_arglist_def */ + + enum AMPLFUNC_AT_BITS { /* Intrepretation of at[i] when the type */ + /* arg to addfunc has the */ + /* FUNCADD_OUTPUT_ARGS bit on.*/ + AMPLFUNC_INARG = 1, /* IN or INOUT */ + AMPLFUNC_OUTARG = 2, /* OUT or INOUT */ + AMPLFUNC_STRING = 4, /* Input value is a string (sa[i]) */ + AMPLFUNC_STROUT = 8 /* String output value allowed */ + }; + + enum FUNCADD_TYPE { /* bits in "type" arg to addfunc */ + + /* The type arg to addfunc should consist of one of the */ + /* following values ... */ + + FUNCADD_REAL_VALUED = 0, /* real (double) valued function */ + FUNCADD_STRING_VALUED = 2, /* char* valued function (AMPL only) */ + FUNCADD_RANDOM_VALUED = 4, /* real random valued */ + FUNCADD_012ARGS = 6, /* Special case: real random valued */ + /* with 0 <= nargs <= 2 arguments */ + /* passed directly, rather than in */ + /* an arglist structure (AMPL only). */ + + /* possibly or-ed with the following... */ + + FUNCADD_STRING_ARGS = 1, /* allow string args */ + FUNCADD_OUTPUT_ARGS = 16, /* allow output args (AMPL only) */ + FUNCADD_TUPLE_VALUED = 32, /* not yet allowed */ + + /* internal use */ + FUNCADD_NO_ARGLIST = 8, + FUNCADD_NO_DUPWARN = 64, /* no complaint if already defined */ + FUNCADD_NONRAND_BUILTIN = 128 /* mean, variance, moment, etc. */ + }; + +/* If a constraint involves an imported function and presolve fixes all + * the arguments of the function, AMPL may later need to ask the + * function for its partial derivatives -- even though the solver had + * no reason to call the function. If so, it will pass an arglist *al + * with al->derivs nonzero, and it will expect the function to set + * al->derivs[i] to the partial derivative of the function with respect + * to al->ra[i]. Solvers that need to evaluate an imported function + * work the same way -- they set al->derivs to a nonzero value if they + * require both the function value and its first derivatives. Solvers + * that expect Hessians to be supplied to them also set al->hes to a + * nonzero value if they require second derivatives at the current + * argument. In this case, the function should set + * al->hes[i + j*(j+1)/2] to the partial derivative of the function with + * respect to al->ra[i] and al->ra[j] for all 0 <= i <= j < al->nr. + */ + +typedef void AddFunc ANSI(( + const char *name, + rfunc f, /* cast f to (rfunc) if it returns char* */ + int type, /* see FUNCADD_TYPE above */ + int nargs, /* >= 0 ==> exactly that many args + * <= -1 ==> at least -(nargs+1) args + */ + void *funcinfo, /* for use by the function (if desired) */ + AmplExports *ae + )); + +typedef void AddRand ANSI(( + const char *name, + rfunc f, /* assumed to be a random function */ + rfunc icdf, /* inverse CDF */ + int type, /* FUNCADD_STRING_ARGS or 0 */ + int nargs, /* >= 0 ==> exactly that many args + * <= -1 ==> at least -(nargs+1) args + */ + void *funcinfo, /* for use by the function (if desired) */ + AmplExports *ae + )); + +typedef void (*RandSeedSetter) ANSI((void*, unsigned long)); +typedef void AddRandInit ANSI((AmplExports *ae, RandSeedSetter, void*)); +typedef void Exitfunc ANSI((void*)); + + struct +AuxInfo { + AuxInfo *next; + char *auxname; + void *v; + void (*f) ANSI((AmplExports*, void*, ...)); + }; + + struct +AmplExports { + FILE *StdErr; + AddFunc *Addfunc; + long ASLdate; + int (*FprintF) ANSI((FILE*, const char*, ...)); + int (*PrintF) ANSI((const char*, ...)); + int (*SprintF) ANSI((char*, const char*, ...)); + int (*VfprintF) ANSI((FILE*, const char*, VA_LIST)); + int (*VsprintF) ANSI((char*, const char*, VA_LIST)); + double (*Strtod) ANSI((const char*, char**)); + cryptblock *(*Crypto) ANSI((char *key, size_t scrbytes)); + Char *asl; + void (*AtExit) ANSI((AmplExports *ae, Exitfunc*, void*)); + void (*AtReset) ANSI((AmplExports *ae, Exitfunc*, void*)); + Char *(*Tempmem) ANSI((TMInfo*, size_t)); + void (*Add_table_handler) ANSI(( + int (*DbRead) (AmplExports *ae, TableInfo *TI), + int (*DbWrite)(AmplExports *ae, TableInfo *TI), + char *handler_info, + int flags, + void *Vinfo + )); + Char *Private; + void (*Qsortv) ANSI((void*, size_t, size_t, int(*)(const void*,const void*,void*), void*)); + + /* More stuff for stdio in DLLs... */ + + FILE *StdIn; + FILE *StdOut; + void (*Clearerr) ANSI((FILE*)); + int (*Fclose) ANSI((FILE*)); + FILE* (*Fdopen) ANSI((int, const char*)); + int (*Feof) ANSI((FILE*)); + int (*Ferror) ANSI((FILE*)); + int (*Fflush) ANSI((FILE*)); + int (*Fgetc) ANSI((FILE*)); + char* (*Fgets) ANSI((char*, int, FILE*)); + int (*Fileno) ANSI((FILE*)); + FILE* (*Fopen) ANSI((const char*, const char*)); + int (*Fputc) ANSI((int, FILE*)); + int (*Fputs) ANSI((const char*, FILE*)); + size_t (*Fread) ANSI((void*, size_t, size_t, FILE*)); + FILE* (*Freopen) ANSI((const char*, const char*, FILE*)); + int (*Fscanf) ANSI((FILE*, const char*, ...)); + int (*Fseek) ANSI((FILE*, long, int)); + long (*Ftell) ANSI((FILE*)); + size_t (*Fwrite) ANSI((const void*, size_t, size_t, FILE*)); + int (*Pclose) ANSI((FILE*)); + void (*Perror) ANSI((const char*)); + FILE* (*Popen) ANSI((const char*, const char*)); + int (*Puts) ANSI((const char*)); + void (*Rewind) ANSI((FILE*)); + int (*Scanf) ANSI((const char*, ...)); + void (*Setbuf) ANSI((FILE*, char*)); + int (*Setvbuf) ANSI((FILE*, char*, int, size_t)); + int (*Sscanf) ANSI((const char*, const char*, ...)); + char* (*Tempnam) ANSI((const char*, const char*)); + FILE* (*Tmpfile) ANSI((void)); + char* (*Tmpnam) ANSI((char*)); + int (*Ungetc) ANSI((int, FILE*)); + AuxInfo *AI; + char* (*Getenv) ANSI((const char*)); + void (*Breakfunc) ANSI((int,void*)); + Char *Breakarg; + /* Items available with ASLdate >= 20020501 start here. */ + int (*SnprintF) ANSI((char*, size_t, const char*, ...)); + int (*VsnprintF) ANSI((char*, size_t, const char*, VA_LIST)); + + AddRand *Addrand; /* for random function/inverse CDF pairs */ + AddRandInit *Addrandinit; /* for adding a function to receive a new random seed */ + }; + +extern const char *i_option_ASL, *ix_details_ASL[]; + +#define funcadd funcadd_ASL + +#if defined(_WIN32) && !defined(__MINGW32__) +__declspec(dllexport) +#endif +extern void funcadd ANSI((AmplExports*)); /* dynamically linked */ +extern void af_libnamesave_ASL ANSI((AmplExports*, const char *fullname, const char *name, int nlen)); +extern void note_libuse_ASL ANSI((void)); /* If funcadd() does not provide any imported */ + /* functions, it can call note_libuse_ASL() to */ + /* keep the library loaded; note_libuse_ASL() is */ + /* called, e.g., by the tableproxy table handler. */ + +#ifdef __cplusplus + } +#endif + + typedef struct +DbCol { + real *dval; + char **sval; + } DbCol; + + struct +TableInfo { + int (*AddRows) ANSI((TableInfo *TI, DbCol *cols, long nrows)); + char *tname; /* name of this table */ + char **strings; + char **colnames; + DbCol *cols; + char *Missing; + char *Errmsg; + void *Vinfo; + TMInfo *TMI; + int nstrings; + int arity; + int ncols; + int flags; + long nrows; + void *Private; + int (*Lookup) ANSI((real*, char**, TableInfo*)); + long (*AdjustMaxrows) ANSI((TableInfo*, long new_maxrows)); + void *(*ColAlloc) ANSI((TableInfo*, int ncol, int sval)); + long maxrows; + }; + +enum { /* return values from (*DbRead)(...) and (*DbWrite)(...) */ + DB_Done = 0, /* Table read or written. */ + DB_Refuse = 1, /* Refuse to handle this table. */ + DB_Error = 2 /* Error reading or writing table. */ + }; + +enum { /* bits in flags field of TableInfo */ + DBTI_flags_IN = 1, /* table has IN or INOUT entities */ + DBTI_flags_OUT = 2, /* table has OUT or INOUT entities */ + DBTI_flags_INSET = 4 /* table has "in set" phrase: */ + /* DbRead could omit rows for */ + /* which Lookup(...) == -1; AMPL */ + /* will ignore such rows if DbRead */ + /* offers them. */ + }; + +#endif /* FUNCADD_H_INCLUDED */ + +#ifndef No_AE_redefs +/* Assume "{extern|static} AmplExports *ae;" is given elsewhere. */ +#undef Stderr +#undef addfunc +#undef fprintf +#undef getenv +#undef printf +#undef sprintf +#undef snprintf +#undef strtod +#undef vfprintf +#undef vsprintf +#undef vsnprintf +#define Stderr (ae->StdErr) +#define addfunc(a,b,c,d,e) (*ae->Addfunc)(a,b,c,d,e,ae) +#define addrand(a,b,c,d,e,f) (*ae->Addrand)(a,b,c,d,e,f,ae) +#define addrandinit(a,b) (*ae->Addrandinit)(ae,a,b) +#define printf (*ae->PrintF) +#define fprintf (*ae->FprintF) +#define snprintf (*ae->SnprintF) +#define sprintf (*ae->SprintF) +#define strtod (*ae->Strtod) +#define vfprintf (*ae->VfprintF) +#define vsprintf (*ae->VsprintF) +#define vsnprintf (*ae->VsnprintF) +#define TempMem(x,y) (*ae->Tempmem)(x,y) +#define at_exit(x,y) (*ae->AtExit)(ae,x,y) +#define at_reset(x,y) (*ae->AtReset)(ae,x,y) +#define add_table_handler(a,b,c,d,e) (*ae->Add_table_handler)(a,b,c,d,e) +#define qsortv(a,b,c,d,e) (*ae->Qsortv)(a,b,c,d,e) +#define getenv(x) (*ae->Getenv)(x) +#ifdef Stdio_redefs +#undef clearerr +#undef fclose +#undef fdopen +#undef feof +#undef ferror +#undef fflush +#undef fgetc +#undef fgets +#undef fileno +#undef fopen +#undef fputc +#undef fputs +#undef fread +#undef freopen +#undef fscanf +#undef fseek +#undef ftell +#undef fwrite +#undef getc +#undef getchar +#undef gets +#undef pclose +#undef perror +#undef popen +#undef putc +#undef putchar +#undef puts +#undef rewind +#undef scanf +#undef setbuf +#undef setvbuf +#undef sscanf +#undef tempnam +#undef tmpfile +#undef tmpnam +#undef ungetc +#undef vprintf +#define clearerr (*ae->Clearerr) +#define fclose (*ae->Fclose) +#define fdopen (*ae->Fdopen) +#define feof (*ae->Feof) +#define ferror (*ae->Ferror) +#define fflush (*ae->Fflush) +#define fgetc (*ae->Fgetc) +#define fgets (*ae->Fgets) +#define fileno (*ae->Fileno) +#define fopen (*ae->Fopen) +#define fputc (*ae->Fputc) +#define fputs (*ae->Fputs) +#define fread (*ae->Fread) +#define freopen (*ae->Freopen) +#define fscanf (*ae->Fscanf) +#define fseek (*ae->Fseek) +#define ftell (*ae->Ftell) +#define fwrite (*ae->Fwrite) +#define getc (*ae->Fgetc) +#define getchar() (*ae->Getc)(ae->StdIn) +#define gets Error - use "fgets" rather than "gets" +#define pclose (*ae->Pclose) +#define perror (*ae->Perror) +#define popen (*ae->Popen) +#define putc (*ae->Fputc) +#define putchar(x) (*ae->Fputc)(ae->StdOut,(x)) +#define puts (*ae->Puts) +#define rewind (*ae->Rewind) +#define scanf (*ae->Scanf) +#define setbuf (*ae->Setbuf) +#define setvbuf (*ae->Setvbuf) +#define sscanf (*ae->Sscanf) +#define tempnam (*ae->Tempnam) +#define tmpfile (*ae->Tmpfile) +#define tmpnam (*ae->Tmpnam) +#define ungetc (*ae->Ungetc) +#define vprintf(x,y) (*ae->VfprintF)(ae->StdOut,(x),(y)) +#define Stdin (ae->StdIn) +#define Stdout (ae->StdOut) +#ifndef No_std_FILE_redefs /* may elicit compiler warnings */ +#undef stdin +#undef stdout +#undef stderr +#define stdin (ae->StdIn) +#define stdout (ae->StdOut) +#define stderr (ae->StdErr) +#endif /* No_std_FILE_redefs */ +#endif /* Stdio_redefs */ +#endif /* ifndef No_AE_redefs */ + +/* DISCUSSION: the "at" field of an arglist... + * + * OUT and INOUT arguments are only permitted in AMPL commands, + * such as "let" and "call" commands (and not in declarations, e.g., + * of constraints and variables). + * + * When addfunc was called with type <= 6 (so there can be no OUT or + * INOUT arguments), for 0 <= i < n, + * at[i] >= 0 ==> arg i is ra[at[i]] + * at[i] < 0 ==> arg i is sa[-(at[i]+1)]. + * + * When addfunc was called with type & FUNCADD_OUTPUT_ARGS on (permitting + * OUT and INOUT arguments), arg i is in ra[i] or sa[i] (as explained + * below), derivs and hes are both null, and at[i] is the union of bits + * that describe arg i: + * AMPLFUNC_INARG = 1 ==> input arg; + * AMPLFUNC_OUTARG = 2 ==> output arg; + * AMPLFUNC_STROUT = 4 ==> can be assigned a string value. + * + * INOUT args have both the AMPLFUNC_INARG and the AMPLFUNC_OUTARG bits + * are on, i.e., (at[i] & 3) == 3. + * + * Symbolic OUT and INOUT arguments are a bit complicated. They can only + * correspond to symbolic parameters in AMPL, which may have either a + * string or a numeric value. Thus there is provision for specifying + * output values to be either numbers or strings. For simplicity, when + * the function accepts output arguments, ra[i] and sa[i] together describe + * argument i. In general (whentype & FUNCADD_OUTPUT_ARGS is nonzero in + * the addfunc call), the incoming value of argument i is ra[i] + * (a numeric value) if sa[i] is null and is otherwise sa[i]. + * To assign a value to argument i, either assign a numeric value to + * ra[i] and set sa[i] = 0, or assign a non-null value to sa[i] + * (in which case ra[i] will be ignored). A value assigned to argument + * i is ignored unless at[i] & AMPLFUNC_OUTARG is nonzero; if so + * and if (at[i] & AMPLFUNC_STROUT) == 0, string values cause an error + * message. + */ diff --git a/thirdparty/linux/include/coin/ThirdParty/getstub.h b/thirdparty/linux/include/coin/ThirdParty/getstub.h new file mode 100644 index 0000000..a5d7631 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/getstub.h @@ -0,0 +1,206 @@ +/**************************************************************** +Copyright (C) 1997-1998, 2000-2001 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#ifndef GETSTUB_H_included +#define GETSTUB_H_included +#ifndef ASL_included +#include "asl.h" +#endif + + typedef struct keyword keyword; + + typedef char * +Kwfunc(Option_Info *oi, keyword *kw, char *value); + + struct +keyword { + char *name; + Kwfunc *kf; + void *info; + char *desc; + }; + +#define KW(a,b,c,d) {a,b,(void*)(c),d} +#define nkeywds (int)(sizeof(keywds)/sizeof(keyword)) + + typedef fint Solver_KW_func(char*, fint); + typedef fint Fileeq_func(fint*, char*, fint); + + struct +Option_Info { + char *sname; /* invocation name of solver */ + char *bsname; /* solver name in startup "banner" */ + char *opname; /* name of solver_options environment var */ + keyword *keywds; /* key words */ + int n_keywds; /* number of key words */ + int flags; /* whether funcadd will be called, etc.: */ + /* see the first enum below */ + char *version; /* for -v and Ver_key_ASL() */ + char **usage; /* solver-specific usage message */ + Solver_KW_func *kwf; /* solver-specific keyword function */ + Fileeq_func *feq; /* for nnn=filename */ + keyword *options; /* command-line options (with -) before stub */ + int n_options; /* number of options */ + long driver_date; /* YYYYMMDD for driver */ + + /* For write_sol: */ + + int wantsol; /* write .sol file without -AMPL */ + int nS; /* transmit S[i], 0 <= i < nS */ + SufDesc *S; + + /* For possible use by "nonstandard" Kwfunc's: */ + + char *uinfo; + + /* Stuff provided/used by getopts (and getstops): */ + + ASL *asl; + char *eqsign; + int n_badopts; /* number of bad options: bail out if != 0*/ + int option_echo;/* whether to echo: see the second enum below. */ + /* Kwfunc's may set option_echo &= ~ASL_OI_echo to turn off all */ + /* keyword echoing or option_echo &= ~ASL_OI_echothis to turn */ + /* off echoing of the present keyword. If they detect but do */ + /* not themselves report a bad value, they should set */ + /* option_echo |= ASL_OI_badvalue. During command-line option */ + /* processing (for -... args), (option_echo & ASL_OI_clopt) is */ + /* nonzero. */ + + int nnl; /* internal use: copied to asl->i.need_nl_ */ + }; + + enum { /* bits for Option_Info.flags */ + ASL_OI_want_funcadd = 1, + ASL_OI_keep_underscores = 2, + ASL_OI_show_version = 4 + } ; + + enum { /* bits for Option_Info.option_echo */ + ASL_OI_echo = 1, + ASL_OI_echothis = 2, + ASL_OI_clopt = 4, + ASL_OI_badvalue = 8, + ASL_OI_never_echo = 16, + ASL_OI_tabexpand = 32, /* have shownames() expand tabs */ + ASL_OI_addnewline = 64, /* have shownames() add a newline */ + /* after each keyword description */ + ASL_OI_showname_bits = 96, + ASL_OI_defer_bsname = 128 /* print "bsname: " only if there */ + /* are options to echo */ + } ; + +#ifdef __cplusplus + extern "C" { +#endif + +/* Kwfuncs should invoke badopt_ASL() if they complain. */ +extern void badopt_ASL (Option_Info*); +extern char *badval_ASL (Option_Info*, keyword*, char *value, char *badc); +extern char* get_opt_ASL (Option_Info*, char*); +extern int getopts_ASL (ASL*, char **argv, Option_Info*); +extern char* getstops_ASL (ASL*, char **argv, Option_Info*); +extern char* getstub_ASL (ASL*, char ***pargv, Option_Info*); +extern void show_version_ASL(Option_Info*); +extern char sysdetails_ASL[]; +extern void usage_ASL(Option_Info*, int exit_code); +extern void usage_noexit_ASL(Option_Info*, int exit_code); + +#define getstub(a,b) getstub_ASL((ASL*)asl,a,b) +#define getstops(a,b) getstops_ASL((ASL*)asl,a,b) +#define getopts(a,b) getopts_ASL((ASL*)asl,a,b) + +#define CK_val CK_val_ASL /* known character value in known place */ +#define C_val C_val_ASL /* character value in known place */ +#define DA_val DA_val_ASL /* real (double) value in asl */ +#define DK_val DK_val_ASL /* known real (double) value in known place */ +#define DU_val DU_val_ASL /* real (double) value: offset from uinfo */ +#define D_val D_val_ASL /* real (double) value in known place */ +#define FI_val FI_val_ASL /* fint value in known place */ +#define IA_val IA_val_ASL /* int value in asl */ +#define IK0_val IK0_val_ASL /* int value 0 in known place */ +#define IK1_val IK1_val_ASL /* int value 1 in known place */ +#define IK_val IK_val_ASL /* known int value in known place */ +#define IU_val IU_val_ASL /* int value: offset from uinfo */ +#define I_val I_val_ASL /* int value in known place */ +#define LK_val LK_val_ASL /* known Long value in known place */ +#define LU_val LU_val_ASL /* Long value: offset from uinfo */ +#define L_val L_val_ASL /* Long value in known place */ +#define SU_val SU_val_ASL /* short value: offset from uinfo */ +#define Ver_val Ver_val_ASL /* report version */ +#define WS_val WS_val_ASL /* set wantsol in Option_Info */ + +extern char *Lic_info_add_ASL; /* for show_version_ASL() */ +extern char WS_desc_ASL[]; /* desc for WS_val, constrained problems */ +extern char WSu_desc_ASL[]; /* desc for WS_val, unconstrained problems */ + +extern Kwfunc C_val, CK_val, DA_val, DK_val, DU_val, D_val, FI_val, IA_val; +extern Kwfunc IK0_val, IK1_val, IK_val, IU_val, I_val, LK_val, LU_val; +extern Kwfunc L_val, Ver_val, WS_val; +extern Kwfunc SU_val; + +/* Routines for converting Double (real), Long, and int values: */ + +extern char *Dval_ASL (Option_Info*, keyword*, char*, real*); +extern char *Ival_ASL (Option_Info*, keyword*, char*, int*); +extern char *Lval_ASL (Option_Info*, keyword*, char*, Long*); + +#define voffset_of(t,c) ((void *)&((t*)0)->c) + +/* Structs whose address can be the info field for known values... */ + +#define C_Known C_Known_ASL /* char* value for CK_val */ +#define D_Known D_Known_ASL /* real (double) value for DK_val */ +#define I_Known I_Known_ASL /* int value for IK_val */ +#define L_Known L_Known_ASL /* Long value for LK_val */ + + typedef struct +C_Known { + char *val; + char **valp; + } C_Known; + + typedef struct +D_Known { + real val; + real *valp; + } D_Known; + + typedef struct +I_Known { + int val; + int *valp; + } I_Known; + + typedef struct +L_Known { + Long val; + Long *valp; + } L_Known; + +#ifdef __cplusplus + } +#endif + +#endif /* GETSTUB_H_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/mpi.h b/thirdparty/linux/include/coin/ThirdParty/mpi.h new file mode 100644 index 0000000..7ab0c37 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/mpi.h @@ -0,0 +1,77 @@ +/* + * + * This file is part of MUMPS 4.10.0, built on Tue May 10 12:56:32 UTC 2011 + * + * + * This version of MUMPS is provided to you free of charge. It is public + * domain, based on public domain software developed during the Esprit IV + * European project PARASOL (1996-1999). Since this first public domain + * version in 1999, research and developments have been supported by the + * following institutions: CERFACS, CNRS, ENS Lyon, INPT(ENSEEIHT)-IRIT, + * INRIA, and University of Bordeaux. + * + * The MUMPS team at the moment of releasing this version includes + * Patrick Amestoy, Maurice Bremond, Alfredo Buttari, Abdou Guermouche, + * Guillaume Joslin, Jean-Yves L'Excellent, Francois-Henry Rouet, Bora + * Ucar and Clement Weisbecker. + * + * We are also grateful to Emmanuel Agullo, Caroline Bousquet, Indranil + * Chowdhury, Philippe Combes, Christophe Daniel, Iain Duff, Vincent Espirat, + * Aurelia Fevre, Jacko Koster, Stephane Pralet, Chiara Puglisi, Gregoire + * Richard, Tzvetomila Slavova, Miroslav Tuma and Christophe Voemel who + * have been contributing to this project. + * + * Up-to-date copies of the MUMPS package can be obtained + * from the Web pages: + * http://mumps.enseeiht.fr/ or http://graal.ens-lyon.fr/MUMPS + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY + * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * + * User documentation of any code that uses this software can + * include this complete notice. You can acknowledge (using + * references [1] and [2]) the contribution of this package + * in any scientific publication dependent upon the use of the + * package. You shall use reasonable endeavours to notify + * the authors of the package of this publication. + * + * [1] P. R. Amestoy, I. S. Duff, J. Koster and J.-Y. L'Excellent, + * A fully asynchronous multifrontal solver using distributed dynamic + * scheduling, SIAM Journal of Matrix Analysis and Applications, + * Vol 23, No 1, pp 15-41 (2001). + * + * [2] P. R. Amestoy and A. Guermouche and J.-Y. L'Excellent and + * S. Pralet, Hybrid scheduling for the parallel solution of linear + * systems. Parallel Computing Vol 32 (2), pp 136-156 (2006). + * + */ + +#ifndef MUMPS_MPI_H +#define MUMPS_MPI_H + +/* We define all symbols as extern "C" for users who call MUMPS with its + libseq from a C++ driver. */ +#ifdef __cplusplus +extern "C" { +#endif + +/* This is the minimum to have the C interface of MUMPS work. + * Most of the time, users who need this file have no call to MPI functions in + * their own code. Hence it is not worth declaring all MPI functions here. + * However if some users come to request some more stub functions of the MPI + * standards, we may add them. But it is not worth doing it until then. */ + +typedef int MPI_Comm; /* Simple type for MPI communicator */ +static MPI_Comm MPI_COMM_WORLD=(MPI_Comm)0; + +int MPI_Init(int *pargc, char ***pargv); +int MPI_Comm_rank(int comm, int *rank); +int MPI_Finalize(void); + +#ifdef __cplusplus +} +#endif + +#endif /* MUMPS_MPI_H */ diff --git a/thirdparty/linux/include/coin/ThirdParty/mumps_c_types.h b/thirdparty/linux/include/coin/ThirdParty/mumps_c_types.h new file mode 100644 index 0000000..aef6212 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/mumps_c_types.h @@ -0,0 +1,92 @@ +/* + * + * This file is part of MUMPS 4.10.0, built on Tue May 10 12:56:32 UTC 2011 + * + * + * This version of MUMPS is provided to you free of charge. It is public + * domain, based on public domain software developed during the Esprit IV + * European project PARASOL (1996-1999). Since this first public domain + * version in 1999, research and developments have been supported by the + * following institutions: CERFACS, CNRS, ENS Lyon, INPT(ENSEEIHT)-IRIT, + * INRIA, and University of Bordeaux. + * + * The MUMPS team at the moment of releasing this version includes + * Patrick Amestoy, Maurice Bremond, Alfredo Buttari, Abdou Guermouche, + * Guillaume Joslin, Jean-Yves L'Excellent, Francois-Henry Rouet, Bora + * Ucar and Clement Weisbecker. + * + * We are also grateful to Emmanuel Agullo, Caroline Bousquet, Indranil + * Chowdhury, Philippe Combes, Christophe Daniel, Iain Duff, Vincent Espirat, + * Aurelia Fevre, Jacko Koster, Stephane Pralet, Chiara Puglisi, Gregoire + * Richard, Tzvetomila Slavova, Miroslav Tuma and Christophe Voemel who + * have been contributing to this project. + * + * Up-to-date copies of the MUMPS package can be obtained + * from the Web pages: + * http://mumps.enseeiht.fr/ or http://graal.ens-lyon.fr/MUMPS + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY + * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * + * User documentation of any code that uses this software can + * include this complete notice. You can acknowledge (using + * references [1] and [2]) the contribution of this package + * in any scientific publication dependent upon the use of the + * package. You shall use reasonable endeavours to notify + * the authors of the package of this publication. + * + * [1] P. R. Amestoy, I. S. Duff, J. Koster and J.-Y. L'Excellent, + * A fully asynchronous multifrontal solver using distributed dynamic + * scheduling, SIAM Journal of Matrix Analysis and Applications, + * Vol 23, No 1, pp 15-41 (2001). + * + * [2] P. R. Amestoy and A. Guermouche and J.-Y. L'Excellent and + * S. Pralet, Hybrid scheduling for the parallel solution of linear + * systems. Parallel Computing Vol 32 (2), pp 136-156 (2006). + * + */ + + +#ifndef MUMPS_C_TYPES_H +#define MUMPS_C_TYPES_H + +#define MUMPS_INT int + +#define SMUMPS_COMPLEX float +#define SMUMPS_REAL float + +#define DMUMPS_COMPLEX double +#define DMUMPS_REAL double + +/* Complex datatypes */ +typedef struct {float r,i;} mumps_complex; +typedef struct {double r,i;} mumps_double_complex; + +#define CMUMPS_COMPLEX mumps_complex +#define CMUMPS_REAL float + +#define ZMUMPS_COMPLEX mumps_double_complex +#define ZMUMPS_REAL double + + +#ifndef mumps_ftnlen +/* When passing a string, what is the type of the extra argument + * passed by value ? */ +# define mumps_ftnlen int +#endif + + +#define MUMPS_ARITH_s 1 +#define MUMPS_ARITH_d 2 +#define MUMPS_ARITH_c 4 +#define MUMPS_ARITH_z 8 + +#define MUMPS_ARITH_REAL ( MUMPS_ARITH_s | MUMPS_ARITH_d ) +#define MUMPS_ARITH_CMPLX ( MUMPS_ARITH_c | MUMPS_ARITH_z ) +#define MUMPS_ARITH_SINGLE ( MUMPS_ARITH_s | MUMPS_ARITH_c ) +#define MUMPS_ARITH_DBL ( MUMPS_ARITH_d | MUMPS_ARITH_z ) + + +#endif /* MUMPS_C_TYPES_H */ diff --git a/thirdparty/linux/include/coin/ThirdParty/mumps_compat.h b/thirdparty/linux/include/coin/ThirdParty/mumps_compat.h new file mode 100644 index 0000000..d63120e --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/mumps_compat.h @@ -0,0 +1,78 @@ +/* + * + * This file is part of MUMPS 4.10.0, built on Tue May 10 12:56:32 UTC 2011 + * + * + * This version of MUMPS is provided to you free of charge. It is public + * domain, based on public domain software developed during the Esprit IV + * European project PARASOL (1996-1999). Since this first public domain + * version in 1999, research and developments have been supported by the + * following institutions: CERFACS, CNRS, ENS Lyon, INPT(ENSEEIHT)-IRIT, + * INRIA, and University of Bordeaux. + * + * The MUMPS team at the moment of releasing this version includes + * Patrick Amestoy, Maurice Bremond, Alfredo Buttari, Abdou Guermouche, + * Guillaume Joslin, Jean-Yves L'Excellent, Francois-Henry Rouet, Bora + * Ucar and Clement Weisbecker. + * + * We are also grateful to Emmanuel Agullo, Caroline Bousquet, Indranil + * Chowdhury, Philippe Combes, Christophe Daniel, Iain Duff, Vincent Espirat, + * Aurelia Fevre, Jacko Koster, Stephane Pralet, Chiara Puglisi, Gregoire + * Richard, Tzvetomila Slavova, Miroslav Tuma and Christophe Voemel who + * have been contributing to this project. + * + * Up-to-date copies of the MUMPS package can be obtained + * from the Web pages: + * http://mumps.enseeiht.fr/ or http://graal.ens-lyon.fr/MUMPS + * + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY + * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * + * User documentation of any code that uses this software can + * include this complete notice. You can acknowledge (using + * references [1] and [2]) the contribution of this package + * in any scientific publication dependent upon the use of the + * package. You shall use reasonable endeavours to notify + * the authors of the package of this publication. + * + * [1] P. R. Amestoy, I. S. Duff, J. Koster and J.-Y. L'Excellent, + * A fully asynchronous multifrontal solver using distributed dynamic + * scheduling, SIAM Journal of Matrix Analysis and Applications, + * Vol 23, No 1, pp 15-41 (2001). + * + * [2] P. R. Amestoy and A. Guermouche and J.-Y. L'Excellent and + * S. Pralet, Hybrid scheduling for the parallel solution of linear + * systems. Parallel Computing Vol 32 (2), pp 136-156 (2006). + * + */ + +/* Compatibility issues between various Windows versions */ +#ifndef MUMPS_COMPAT_H +#define MUMPS_COMPAT_H + + +#if defined(_WIN32) && ! defined(__MINGW32__) +# define MUMPS_WIN32 1 +#endif + +#ifndef MUMPS_CALL +# ifdef MUMPS_WIN32 +/* Modify/choose between next 2 lines depending + * on your Windows calling conventions */ +/* # define MUMPS_CALL __stdcall */ +# define MUMPS_CALL +# else +# define MUMPS_CALL +# endif +#endif + +#if (__STDC_VERSION__ >= 199901L) +# define MUMPS_INLINE static inline +#else +# define MUMPS_INLINE +#endif + + +#endif /* MUMPS_COMPAT_H */ diff --git a/thirdparty/linux/include/coin/ThirdParty/nlp.h b/thirdparty/linux/include/coin/ThirdParty/nlp.h new file mode 100644 index 0000000..67d00c4 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/nlp.h @@ -0,0 +1,260 @@ +/**************************************************************** +Copyright (C) 1997-1998, 2001 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#ifndef NLP_H_included +#define NLP_H_included + +#ifndef ASL_included +#include "asl.h" +#endif + +typedef struct argpair argpair; +typedef struct cde cde; +typedef struct cexp cexp; +typedef struct cexp1 cexp1; +typedef struct de de; +typedef union ei ei; +typedef struct expr expr; +typedef struct expr_f expr_f; +typedef struct expr_h expr_h; +typedef struct expr_if expr_if; +typedef struct expr_v expr_v; +typedef struct expr_va expr_va; +typedef struct funnel funnel; +typedef struct list list; + +typedef real efunc ANSI((expr * A_ASL)); + +#define r_ops r_ops_ASL +#define obj1val obj1val_ASL +#define obj1grd obj1grd_ASL +#define con1val con1val_ASL +#define jac1val jac1val_ASL +#define con1ival con1ival_ASL +#define con1grd con1grd_ASL +#define lcon1val lcon1val_ASL +#define x1known x1known_ASL + + union +ei { + expr *e; + expr **ep; + expr_if *eif; + expr_n *en; + int i; + plterm *p; + de *d; + real *rp; + derp *D; + cexp *ce; + }; + + struct +expr { + efunc *op; + int a; + real dL; + ei L, R; + real dR; + }; + + struct +expr_v { + efunc *op; + int a; + real v; + }; + + struct +expr_if { + efunc *op; + int a; + expr *e, *T, *F; + derp *D, *dT, *dF, *d0; + ei Tv, Fv; + expr_if *next, *next2; + }; + + struct +expr_va { + efunc *op; + int a; + ei L, R; + expr_va *next, *next2; + derp *d0; + }; + + struct +cde { + expr *e; + derp *d; + int zaplen; + }; + + struct +de { + expr *e; + derp *d; + ei dv; + }; + + struct +list { + list *next; + ei item; + }; + + struct +cexp1 { + expr *e; + int nlin; + linpart *L; + }; + + struct +cexp { + expr *e; + int nlin; + linpart *L; + funnel *funneled; + list *cref; + ei z; + int zlen; + derp *d; + int *vref; + }; + + struct +funnel { + funnel *next; + cexp *ce; + derp *fulld; + cplist *cl; + cde fcde; + }; + + struct +argpair { + expr *e; + union { + char **s; + real *v; + } u; + }; + + struct +expr_f { + efunc *op; + int a; + func_info *fi; + arglist *al; + argpair *ap, *ape, *sap, *sape; + expr *args[1]; + }; + + struct +expr_h { + efunc *op; + int a; + char sym[1]; + }; + + typedef struct +Edag1info { + cde *con_de_; /* constraint deriv. and expr. info */ + cde *lcon_de_; /* logical constraints */ + cde *obj_de_; /* objective deriv. and expr. info */ + expr_v *var_e_; /* variable values (and related items) */ + + /* stuff for "defined" variables */ + funnel *f_b_; + funnel *f_c_; + funnel *f_o_; + expr_v *var_ex_, + *var_ex1_; + cexp *cexps_; + cexp1 *cexps1_; + efunc **r_ops_; + char *c_class; /* class of each constraint: */ + /* 0 = constant */ + /* 1 = linear */ + /* 2 = quadratic */ + /* 3 = general nonlinear */ + char *o_class; /* class of each objective */ + char *v_class; /* class of each defined variable */ + int c_class_max; /* max of c_class values */ + int o_class_max; /* max of o_class values */ + /* The above are only computed if requested */ + /* by the ASL_find_c_class and */ + /* ASL_find_o_class bits of the flags arg */ + /* to pfgh_read() and pfg_read() */ + } Edag1info; + + typedef struct +ASL_fg { + Edagpars p; + Edaginfo i; + Edag1info I; + } ASL_fg; + +#ifdef __cplusplus + extern "C" { +#endif + extern efunc *r_ops_ASL[]; + extern void com1eval_ASL ANSI((ASL_fg*, int, int)); + extern void comeval_ASL ANSI((ASL_fg*, int, int)); + extern void funnelset_ASL ANSI((ASL_fg*, funnel *)); + extern real obj1val ANSI((ASL*, int nobj, real *X, fint *nerror)); + extern void obj1grd ANSI((ASL*, int nobj, real *X, real *G, fint *nerror)); + extern void con1val ANSI((ASL*, real *X, real *F, fint *nerror)); + extern void jac1val ANSI((ASL*, real *X, real *JAC, fint *nerror)); + extern real con1ival ANSI((ASL*,int nc, real *X, fint *ne)); + extern void con1grd ANSI((ASL*, int nc, real *X, real *G, fint *nerror)); + extern int lcon1val ANSI((ASL*,int nc, real *X, fint *ne)); + extern int x0_check_ASL ANSI((ASL_fg*, real *)); + extern void x1known ANSI((ASL*, real*, fint*)); +#ifdef __cplusplus + } +#endif + +#define comeval(a,b) comeval_ASL((ASL_fg*)asl,a,b) +#define com1eval(a,b) com1eval_ASL((ASL_fg*)asl,a,b) +#define funnelset(a) funnelset_ASL((ASL_fg*)asl,a) + +#define cexps asl->I.cexps_ +#define cexps1 asl->I.cexps1_ +#define con_de asl->I.con_de_ +#define f_b asl->I.f_b_ +#define f_c asl->I.f_c_ +#define f_o asl->I.f_o_ +#define lcon_de asl->I.lcon_de_ +#define obj_de asl->I.obj_de_ +#define var_e asl->I.var_e_ +#define var_ex asl->I.var_ex_ +#define var_ex1 asl->I.var_ex1_ + +#undef f_OPNUM +#define f_OPNUM (efunc*)f_OPNUM_ASL + +#endif /* NLP_H_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/nlp2.h b/thirdparty/linux/include/coin/ThirdParty/nlp2.h new file mode 100644 index 0000000..ceefe2b --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/nlp2.h @@ -0,0 +1,342 @@ +/**************************************************************** +Copyright (C) 1997-1998, 2000-2001 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +/* Variant of nlp.h for Hessian times vector computations. */ + +#ifndef NLP_H2_included +#define NLP_H2_included + +#ifndef ASL_included +#include "asl.h" +#endif + +#ifdef __cplusplus + extern "C" { +#endif + +typedef struct argpair2 argpair2; +typedef struct cde2 cde2; +typedef struct cexp2 cexp2; +typedef struct cexp21 cexp21; +typedef struct de2 de2; +typedef union ei2 ei2; +typedef struct expr2 expr2; +typedef struct expr2_f expr2_f; +typedef struct expr2_h expr2_h; +typedef struct expr2_if expr2_if; +typedef struct expr2_v expr2_v; +typedef struct expr2_va expr2_va; +typedef struct funnel2 funnel2; +typedef struct hes_fun hes_fun; +typedef struct list2 list2; +typedef union uir uir; + +typedef real efunc2 ANSI((expr2* A_ASL)); +typedef char *sfunc ANSI((expr2* A_ASL)); + + union +uir { + int i; + real r; + }; + + union +ei2 { + expr2 *e; + expr2 **ep; + expr2_if*eif; + expr_n *en; + expr2_v *ev; + int i; + plterm *p; + de2 *d; + real *rp; + derp *D; + cexp2 *ce; + }; + + struct +expr2 { + efunc2 *op; + int a; /* adjoint index (for gradient computation) */ + expr2 *fwd, *bak; + uir dO; /* deriv of op w.r.t. t in x + t*p */ + real aO; /* adjoint (in Hv computation) of op */ + real adO; /* adjoint (in Hv computation) of dO */ + real dL; /* deriv of op w.r.t. left operand */ + ei2 L, R; /* left and right operands */ + real dR; /* deriv of op w.r.t. right operand */ + real dL2; /* second partial w.r.t. L, L */ + real dLR; /* second partial w.r.t. L, R */ + real dR2; /* second partial w.r.t. R, R */ + }; + + struct +expr2_v { + efunc2 *op; + int a; + expr2 *fwd, *bak; + uir dO; + real aO, adO; + real v; + }; + + struct +expr2_if { + efunc2 *op; + int a; + expr2 *fwd, *bak; + uir dO; + real aO, adO; + expr2 *val, *vale, *valf, *e, *T, *Te, *Tf, *F, *Fe, *Ff; + derp *D, *dT, *dF, *d0; + ei2 Tv, Fv; + expr2_if *next, *next2; + derp *dTlast; + }; + + struct +expr2_va { + efunc2 *op; + int a; + expr2 *fwd, *bak; + uir dO; + real aO, adO; + expr2 *val, *vale, *valf; + ei2 L, R; + expr2_va *next, *next2; + derp *d0; + }; + + struct +cde2 { + expr2 *e, *ee, *ef; + derp *d; + int zaplen; + int com11, n_com1; + }; + + struct +de2 { /* for varargs */ + expr2 *e, *ee, *ef; + derp *d; + ei2 dv; + derp *dlast; /* for sputhes setup */ + }; + + struct +list2 { + list2 *next; + ei2 item; + }; + + struct +cexp21 { + expr2 *e, *ee, *ef; + linpart *L; + int nlin; + }; + + struct +cexp2 { + expr2 *e, *ee, *ef; + linpart *L; + int nlin; + funnel2 *funneled; + list2 *cref; + ei2 z; + int zlen; + derp *d; + int *vref; + hes_fun *hfun; + }; + + struct +funnel2 { + funnel2 *next; + cexp2 *ce; + cde2 fcde; + derp *fulld; + cplist *cl; + }; + + struct +argpair2 { + expr2 *e; + union { + char **s; + real *v; + } u; + }; + + struct +expr2_f { + efunc2 *op; + int a; + expr2 *fwd, *bak; + uir dO; + real aO, adO; + func_info *fi; + arglist *al; + argpair2 *ap, *ape, *sap, *sape; + argpair2 *da; /* differentiable args -- nonconstant */ + argpair2 *dae; + real **fh; /* Hessian info */ + expr2 *args[1]; + }; + + struct +expr2_h { + efunc2 *op; + int a; + char sym[1]; + }; + + typedef struct +Edag2info { + cde2 *con2_de_; /* constraint deriv. and expr. info */ + cde2 *lcon2_de_; /* logical constraints */ + cde2 *obj2_de_; /* objective deriv. and expr. info */ + expr2_v *var2_e_; /* variable values (and related items) */ + + /* stuff for "defined" variables */ + funnel2 *f2_b_; + funnel2 *f2_c_; + funnel2 *f2_o_; + expr2_v *var2_ex_, + *var2_ex1_; + cexp2 *cexps2_, *cexpsc_, *cexpso_, *cexpse_; + cexp21 *cexps21_; + hes_fun *hesthread; + char *c_class; /* class of each constraint: */ + /* 0 = constant */ + /* 1 = linear */ + /* 2 = quadratic */ + /* 3 = general nonlinear */ + char *o_class; /* class of each objective */ + char *v_class; /* class of each defined variable */ + int c_class_max; /* max of c_class values */ + int o_class_max; /* max of o_class values */ + /* The above are only computed if requested */ + /* by the ASL_find_c_class and */ + /* ASL_find_o_class bits of the flags arg */ + /* to pfgh_read() and pfg_read() */ + int x0kind_init; + } Edag2info; + + typedef struct +ASL_fgh { + Edagpars p; + Edaginfo i; + Edag2info I; + } ASL_fgh; + + extern efunc2 *r2_ops_ASL[]; + extern void com21eval_ASL ANSI((ASL_fgh*, int, int)); + extern void com2eval_ASL ANSI((ASL_fgh*, int, int)); + extern void fun2set_ASL ANSI((ASL_fgh*, funnel2 *)); +#ifdef __cplusplus + } +#endif + +#ifndef SKIP_NL2_DEFINES +extern efunc2 f2_OPVARVAL_ASL; + +#define cexpsc asl->I.cexpsc_ +#define cexpse asl->I.cexpse_ +#define cexpso asl->I.cexpso_ +#define cexps1 asl->I.cexps21_ +#define cexps asl->I.cexps2_ +#define con_de asl->I.con2_de_ +#define f_b asl->I.f2_b_ +#define f_c asl->I.f2_c_ +#define f_o asl->I.f2_o_ +#define lcon_de asl->I.lcon2_de_ +#define obj_de asl->I.obj2_de_ +#define var_e asl->I.var2_e_ +#define var_ex1 asl->I.var2_ex1_ +#define var_ex asl->I.var2_ex_ + +#define argpair argpair2 +#define cde cde2 +#define cexp cexp2 +#define cexp1 cexp21 +#define de de2 +#define ei ei2 +#define expr expr2 +#define expr_f expr2_f +#define expr_h expr2_h +#define expr_if expr2_if +#define expr_v expr2_v +#define expr_va expr2_va +#define funnel funnel2 +#define list list2 + +#define com1eval com21eval_ASL +#define comeval com2eval_ASL +#define funnelset fun2set_ASL +#undef r_ops +#define r_ops r2_ops_ASL + +#ifndef PSHVREAD +#define f_OPIFSYM f2_IFSYM_ASL +#define f_OPPLTERM f2_PLTERM_ASL +#define f_OPFUNCALL f2_FUNCALL_ASL +#define f_OP1POW f2_1POW_ASL +#define f_OP2POW f2_2POW_ASL +#define f_OPCPOW f2_CPOW_ASL +#define f_OPPLUS f2_PLUS_ASL +#define f_OPSUMLIST f2_SUMLIST_ASL +#define f_OPHOL f2_HOL_ASL +#define f_OPPOW f2_POW_ASL +#define f_OPVARVAL f2_VARVAL_ASL +#endif + +/* operation classes (for H*v computation) */ + +#define Hv_binaryR 0 +#define Hv_binaryLR 1 +#define Hv_unary 2 +#define Hv_vararg 3 +#define Hv_if 4 +#define Hv_plterm 5 +#define Hv_sumlist 6 +#define Hv_func 7 +#define Hv_negate 8 +#define Hv_plusR 9 +#define Hv_plusL 10 +#define Hv_plusLR 11 +#define Hv_minusR 12 +#define Hv_minusLR 13 +#define Hv_timesR 14 +#define Hv_timesL 15 +#define Hv_timesLR 16 + +/* treat if as vararg, minusL as plusL, binaryL as unary */ + +#endif /* SKIP_NL2_DEFINES */ + +#undef f_OPNUM +#define f_OPNUM (efunc2*)f_OPNUM_ASL +#endif /* NLP_H2_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/opcode.hd b/thirdparty/linux/include/coin/ThirdParty/opcode.hd new file mode 100644 index 0000000..899972c --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/opcode.hd @@ -0,0 +1,70 @@ +#define OPPLUS 0 +#define OPMINUS 1 +#define OPMULT 2 +#define OPDIV 3 +#define OPREM 4 +#define OPPOW 5 +#define OPLESS 6 +#define MINLIST 11 +#define MAXLIST 12 +#define FLOOR 13 +#define CEIL 14 +#define ABS 15 +#define OPUMINUS 16 +#define OPOR 20 +#define OPAND 21 +#define LT 22 +#define LE 23 +#define EQ 24 +#define GE 28 +#define GT 29 +#define NE 30 +#define OPNOT 34 +#define OPIFnl 35 +#define OP_tanh 37 +#define OP_tan 38 +#define OP_sqrt 39 +#define OP_sinh 40 +#define OP_sin 41 +#define OP_log10 42 +#define OP_log 43 +#define OP_exp 44 +#define OP_cosh 45 +#define OP_cos 46 +#define OP_atanh 47 +#define OP_atan2 48 +#define OP_atan 49 +#define OP_asinh 50 +#define OP_asin 51 +#define OP_acosh 52 +#define OP_acos 53 +#define OPSUMLIST 54 +#define OPintDIV 55 +#define OPprecision 56 +#define OPround 57 +#define OPtrunc 58 +#define OPCOUNT 59 +#define OPNUMBEROF 60 +#define OPNUMBEROFs 61 +#define OPATLEAST 62 +#define OPATMOST 63 +#define OPPLTERM 64 +#define OPIFSYM 65 +#define OPEXACTLY 66 +#define OPNOTATLEAST 67 +#define OPNOTATMOST 68 +#define OPNOTEXACTLY 69 +#define ANDLIST 70 +#define ORLIST 71 +#define OPIMPELSE 72 +#define OP_IFF 73 +#define OPALLDIFF 74 +#define OPSOMESAME 75 +#define OP1POW 76 +#define OP2POW 77 +#define OPCPOW 78 +#define OPFUNCALL 79 +#define OPNUM 80 +#define OPHOL 81 +#define OPVARVAL 82 +#define N_OPS 83 diff --git a/thirdparty/linux/include/coin/ThirdParty/psinfo.h b/thirdparty/linux/include/coin/ThirdParty/psinfo.h new file mode 100644 index 0000000..e91eda1 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/psinfo.h @@ -0,0 +1,337 @@ +/**************************************************************** +Copyright (C) 1997, 1998, 2001 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +#ifdef PSHVREAD +#ifndef PSINFO_H2_included +#define PSINFO_H2_included +#undef PSINFO_H_included +#ifndef NLP_H2_included +#include "nlp2.h" +#endif +#define cde cde2 +#define la_ref la_ref2 +#define linarg linarg2 +#define range range2 +#define rhead rhead2 +#define psb_elem psb_elem2 +#define psg_elem psg_elem2 +#define ps_func ps_func2 +#define dv_info dv_info2 +#define split_ce split_ce2 +#define ps_info ps_info2 +#define psinfo psinfo2 +#endif /* PSINFO_H2_included */ +#else /* PSHVREAD */ +#ifndef PSINFO_H1_included +#define PSINFO_H1_included +#undef PSINFO_H_included +#ifndef NLP_H_included +#include "nlp.h" +#endif +#endif +#endif /* PSHVREAD */ +#ifndef PSINFO_H_included +#define PSINFO_H_included + + typedef struct la_ref la_ref; + typedef struct linarg linarg; + typedef struct range range; + + struct +la_ref { + la_ref *next; + expr **ep; + real c; + real scale; + }; + + struct +linarg { + linarg *hnext; /* for hashing */ + linarg *tnext; /* next linear argument to this term */ + linarg *lnext; /* for adjusting v->op */ + la_ref *refs; /* references */ + expr_v *v; /* variable that evaluates this linear term */ + ograd *nz; /* the nonzeros */ + int nnz; /* number of nonzeros (to help hashing) */ + int termno; /* helps tell whether new to this term */ + }; + + typedef struct +rhead { + range *next, *prev; + } rhead; + +#ifndef PSINFO_H0_included +#define MBLK_KMAX 30 +#endif /* PSINFO_H0_included */ + + typedef struct psb_elem psb_elem; + + struct +range { + rhead rlist; /* list of all ranges */ + range *hnext; /* for hashing U */ + range *hunext; /* for hashing unit vectors */ + int n; /* rows in U */ + int nv; /* variables involved in U */ + int nintv; /* number of internal variables (non-unit */ + /* rows in U) */ + int lasttermno; /* termno of prev. use in this term */ + /* -1 ==> not yet used in this constr or obj. */ + /* Set to least variable (1st = 0) in this */ + /* range at the end of psedread. */ + int lastgroupno; /* groupno at last use of this term */ + unsigned int chksum; /* for hashing */ + psb_elem *refs; /* constraints and objectives with this range */ + int *ui; /* unit vectors defining this range */ + /* (for n >= nv) */ + linarg **lap; /* nonzeros in U */ + int *cei; /* common expressions: union over refs */ + real *hest; /* nonzero ==> internal Hessian triangle */ + /* computed by hvpinit */ + }; + + struct +psb_elem { /* basic element of partially-separable func */ + psb_elem *next; /* for range.refs */ + range *U; + int *ce; /* common exprs if nonzero: ce[i], 1 <= i <= ce[0] */ + cde D; /* derivative and expr info */ + int conno; /* constraint no. (if >= 0) or -2 - obj no. */ + int termno; + int groupno; + }; + + typedef struct +psg_elem { /* group element details of partially-separable func */ + real g0; /* constant term */ + real g1; /* first deriv of g */ + real g2; /* 2nd deriv of g */ + real scale; /* temporary(?!!) until we introduce unary OPSCALE */ + expr_n esum; /* esum.v = result of summing g0, E and L */ + expr *g; /* unary operator */ + expr *ge; /* "last" unary operator */ + ograd *og; /* first deriv = g1 times og */ + int nlin; /* number of linear terms */ + int ns; /* number of nonlinear terms */ + linpart *L; /* the linear terms */ + psb_elem *E; /* the nonlinear terms */ + } psg_elem; + + typedef struct +ps_func { + int nb; /* number of basic terms */ + int ng; /* number of group terms */ + int nxval; /* for psgcomp */ + psb_elem *b; /* the basic terms */ + psg_elem *g; /* the group terms */ + } ps_func; + + typedef struct +dv_info { /* defined variable info */ + ograd *ll; /* list of linear defined vars referenced */ + linarg **nl; /* nonlinear part, followed by 0 */ + real scale; /* scale factor for linear term */ + linarg *lt; /* linear term of nonlinear defined var */ + } dv_info; + + typedef struct +split_ce { + range *r; + int *ce; /* common expressions */ + } split_ce; + +#ifdef PSHVREAD + + struct +hes_fun { + hes_fun *hfthread; + cexp2 *c; + real *grdhes; + ograd *og; + expr_v **vp; + int n; + }; + + typedef struct Hesoprod Hesoprod; + struct +Hesoprod { + Hesoprod *next; + ograd *left, *right; + real coef; + }; + + typedef struct uHeswork uHeswork; + struct +uHeswork { + uHeswork *next; + int k; + range *r; + int *ui, *uie; + ograd *ogp[1]; /* scratch of length r->n */ + }; + + typedef struct Umultinfo Umultinfo; + struct +Umultinfo { + Umultinfo *next; + ograd *og, *og0; + expr_v *v; + int i; + }; + + typedef struct Ihinfo Ihinfo; + struct +Ihinfo { + Ihinfo *next; /* for chaining ihinfo's with positive count */ + range *r; /* list, on prev, of ranges with this ihd */ + real *hest; /* hest memory to free */ + int ihd; /* internal Hessian dimension, min(n,nv) */ + int k; /* htcl(nr*(ihd*(ihd+1)/2)*sizeof(real)) */ + int nr; /* number of ranges with this ihd */ + }; + +#endif /* PSHVREAD */ + + typedef struct +ps_info { + Long merge; /* for noadjust = 1 */ + ps_func *cps; + ps_func *ops; + dv_info *dv; + expr_v **vp; /* for values of common variables */ + rhead rlist; + linarg *lalist; /* all linargs */ + int *dvsp0; /* dvsp0[i] = subscript of first var into which */ + /* cexp i was split, 0 <= i <= ncom */ + int nc1; /* common expressions for just this function */ + int ns0; /* initial number of elements */ + int ncom; /* number of common expressions before splitting */ + int ndupdt; /* duplicate linear terms in different terms */ + int ndupst; /* duplicate linear terms in the same term */ + int nlttot; /* total number of distinct linear terms */ + int ndvspcand; /* # of defined variable candidates for splitting */ + int ndvsplit; /* number of defined variables actually split */ + int ndvspin; /* number of incoming terms from split defined vars */ + int ndvspout; /* number of terms from split defined variables */ + int max_var1_; /* used in psedread and pshvread */ + int nv0_; /* used in psedread and pshvread */ + +#ifdef PSHVREAD + /* Stuff for partially separable Hessian computations... */ + /* These arrays are allocated and zero-initialized by hes_setup, */ + /* which also supplies the cei field to ranges. */ + + range **rtodo; /* rtodo[i] = ranges first incident on col i */ + uHeswork **utodo; /* unit ranges affecting this col */ + Hesoprod **otodo;/* otodo[i] = contributions to col i dispatched */ + /* by previous rtodo entries */ + Hesoprod *hop_free; + real *dOscratch;/* length = nmax (below) */ + int *iOscratch; /* length = nmax */ + Ihinfo *ihi; + Ihinfo *ihi1; /* first with positive count */ + int hes_setup_called; + int nmax; /* max{r in ranges} r->n */ + int ihdcur; /* Current max internal Hessian dimension, */ + /* set by hvpinit. */ + int ihdmax; /* max possible ihd */ + int ihdmin; /* min possible ihd > 0 and <= ihdmax, or 0 */ + int khesoprod; /* used in new_Hesoprod in sputhes.c */ + int pshv_g1; /* whether pshv_prod should multiply by g1 */ + int linmultr; /* linear common terms used in more than one range */ + int linhesfun; /* linear common terms in Hessian funnels */ + int nlmultr; /* nonlin common terms used in more than one range */ + int nlhesfun; /* nonlin common terms in Hessian funnels */ + int ncongroups; /* # of groups in constraints */ + int nobjgroups; /* # of groups in objectives */ + int nhvprod; /* # of Hessian-vector products at this Hessian */ + int npsgcomp; /* Has psgcomp been called? For sphes_setup. */ + expr_va *valist; /* for sphes_setup */ + expr_if *iflist; /* for sphes_setup */ + int *zlsave; /* for S->_zl */ + real *oyow; /* for xpsg_check */ + int onobj; /* for xpsg_check */ + int onxval; /* for xpsg_check */ + int nynz; /* for xpsg_check */ + int ndhmax; /* set by hvpinit_ASL */ +#endif /* PSHVREAD */ + split_ce *Split_ce; /* for sphes_setup */ + } ps_info; + +#ifdef PSHVREAD + + typedef struct +ASL_pfgh { + Edagpars p; + Edaginfo i; + Char *mblk_free[MBLK_KMAX]; + Edag2info I; + ps_info2 P; + } ASL_pfgh; + +#else + + typedef struct +ASL_pfg { + Edagpars p; + Edaginfo i; + Char *mblk_free[MBLK_KMAX]; + Edag1info I; + ps_info P; + } ASL_pfg; + +#endif /* PSHVREAD */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef PSINFO_H0_included +#define PSINFO_H0_included +typedef unsigned Long Ulong; + +#endif /* PSINFO_H0_included */ +#ifdef PSHVREAD + extern void duthes_ASL(ASL*, real *H, int nobj, real *ow, real *y); + extern void fullhes_ASL(ASL*, real*H, fint LH, int nobj, real*ow, real*y); + extern void hvpinit_ASL(ASL*, int ndhmax, int nobj, real *ow, real *y); + extern void ihd_clear_ASL(ASL_pfgh*); + extern ASL_pfgh *pscheck_ASL(ASL*, const char*); + extern void pshv_prod_ASL(ASL_pfgh*, range*r, int nobj, real*ow, real*y); + extern fint sphes_setup_ASL(ASL*, SputInfo**, int nobj, int ow, int y, int ul); + extern void sphes_ASL(ASL*, SputInfo**, real *H, int nobj, real*ow, real *y); + extern void xpsg_check_ASL(ASL_pfgh*, int nobj, real *ow, real *y); +#else /* PSHVREAD */ + extern void xp1known_ASL(ASL*, real*, fint*); +#endif /* PSHVREAD */ + +#ifdef __cplusplus + } +#endif + +#define pshv_prod(r,no,ow,y) pshv_prod_ASL(asl,r,no,ow,y) + +#endif /* PSINFO_H_included */ diff --git a/thirdparty/linux/include/coin/ThirdParty/r_opn.hd b/thirdparty/linux/include/coin/ThirdParty/r_opn.hd new file mode 100644 index 0000000..4c4f456 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/r_opn.hd @@ -0,0 +1,16 @@ +#undef f_OPNUM +#define f_OPMULT r_ops[2] +#define f_OPPOW r_ops[5] +#define f_MINLIST r_ops[11] +#define f_MAXLIST r_ops[12] +#define f_ABS r_ops[15] +#define f_OPPLTERM r_ops[64] +#define f_OPIFSYM r_ops[65] +#define f_OP1POW r_ops[76] +#define f_OP2POW r_ops[77] +#define f_OPCPOW r_ops[78] +#define f_OPFUNCALL r_ops[79] +#define f_OPNUM r_ops[80] +#define f_OPHOL r_ops[81] +#define f_OPVARVAL r_ops[82] +#define N_OPS 83 diff --git a/thirdparty/linux/include/coin/ThirdParty/stdio1.h b/thirdparty/linux/include/coin/ThirdParty/stdio1.h new file mode 100644 index 0000000..ef2bb63 --- /dev/null +++ b/thirdparty/linux/include/coin/ThirdParty/stdio1.h @@ -0,0 +1,103 @@ +/**************************************************************** +Copyright (C) 1997-1999 Lucent Technologies +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name of Lucent or any of its entities +not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. +****************************************************************/ + +/* stdio1.h -- for using Printf, Fprintf, Sprintf while + * retaining the system-supplied printf, fprintf, sprintf. + */ + +#ifndef STDIO1_H_included +#define STDIO1_H_included +#ifndef STDIO_H_included /* allow suppressing stdio.h */ +#include <stdio.h> /* in case it's already included, */ +#endif /* e.g., by cplex.h */ + +#ifdef KR_headers +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif +#define ANSI(x) () +#include "varargs.h" +#ifndef Char +#define Char char +#endif +#else +#define ANSI(x) x +#include "stdarg.h" +#ifndef Char +#define Char void +#endif +#endif + +#ifndef NO_STDIO1 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int Fprintf ANSI((FILE*, const char*, ...)); +extern int Printf ANSI((const char*, ...)); +extern int Sprintf ANSI((char*, const char*, ...)); +extern int Snprintf ANSI((char*, size_t, const char*, ...)); +extern void Perror ANSI((const char*)); +extern int Vfprintf ANSI((FILE*, const char*, va_list)); +extern int Vsprintf ANSI((char*, const char*, va_list)); +extern int Vsnprintf ANSI((char*, size_t, const char*, va_list)); + +#ifdef PF_BUF +extern FILE *stderr_ASL; +extern void (*pfbuf_print_ASL) ANSI((char*)); +extern char *pfbuf_ASL; +extern void fflush_ASL ANSI((FILE*)); +#ifdef fflush +#define old_fflush_ASL fflush +#undef fflush +#endif +#define fflush fflush_ASL +#endif + +#ifdef __cplusplus + } +#endif + +#undef printf +#undef fprintf +#undef sprintf +#undef perror +#undef vfprintf +#undef vsprintf +#define printf Printf +#define fprintf Fprintf +#undef snprintf /* for MacOSX */ +#undef vsnprintf /* for MacOSX */ +#define snprintf Snprintf +#define sprintf Sprintf +#define perror Perror +#define vfprintf Vfprintf +#define vsnprintf Vsnprintf +#define vsprintf Vsprintf + +#endif /* NO_STDIO1 */ + +#endif /* STDIO1_H_included */ |