EMAN2
lapackblas.h
Go to the documentation of this file.
00001 /*
00002  * Author: Chao Yang
00003  * Copyright (c) 2000-2006
00004  *
00005  * This software is issued under a joint BSD/GNU license. You may use the
00006  * source code in this file under either license. However, note that the
00007  * complete EMAN2 and SPARX software packages have some GPL dependencies,
00008  * so you are responsible for compliance with the licenses of these packages
00009  * if you opt to use BSD licensing. The warranty disclaimer below holds
00010  * in either instance.
00011  *
00012  * This complete copyright notice must be included in any revised version of the
00013  * source code. Additional authorship citations may be added, but existing
00014  * author citations must be preserved.
00015  *
00016  * This program is free software; you can redistribute it and/or modify
00017  * it under the terms of the GNU General Public License as published by
00018  * the Free Software Foundation; either version 2 of the License, or
00019  * (at your option) any later version.
00020  *
00021  * This program is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00024  * GNU General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU General Public License
00027  * along with this program; if not, write to the Free Software
00028  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00029  *
00030  */
00031 
00032 #include <cmath>
00033 
00034 typedef int integer;
00035 typedef float real;
00036 typedef double doublereal;
00037 typedef int logical;
00038 
00039 typedef short flag;
00040 typedef short ftnlen;
00041 typedef short ftnint;
00042 
00043 #define TRUE_ (1) 
00044 #define FALSE_ (0)
00045 
00046 #define abs(x) ((x) >= 0 ? (x) : -(x))
00047 #define dabs(x) (doublereal)abs(x)
00048 #define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
00049 #define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
00050 #define df2cmin(a,b) (doublereal)f2cmin(a,b)
00051 #define df2cmax(a,b) (doublereal)f2cmax(a,b)
00052 
00053 
00054 int s_cat(char *, const char **, integer *, integer *, ftnlen);
00055 integer s_cmp(char *, const char *, ftnlen, ftnlen);
00056 void s_copy(char *a, const char *b, ftnlen la, ftnlen lb);
00057 
00058 double pow_ri(real *ap, integer *bp);
00059 double r_sign(real *a, real *b);
00060 
00061 integer ieeeck_(integer *ispec, real *zero, real *one);
00062 
00063 integer ilaenv_(integer *ispec, const char *name__, const char *opts, integer *n1, 
00064         integer *n2, integer *n3, integer *n4, ftnlen name_len, ftnlen 
00065         opts_len);
00066 
00067 real drand(void);
00068 
00069 logical lsame_(const char *ca, const char *cb);
00070 
00071 /* Subroutine */ int saxpy_(integer *n, real *sa, real *sx, integer *incx, 
00072         real *sy, integer *incy);
00073 
00074 /* Subroutine */ int scopy_(integer *n, real *sx, integer *incx, real *sy, 
00075         integer *incy);
00076 
00077 doublereal sdot_(integer *n, real *sx, integer *incx, real *sy, integer *incy);
00078 
00079 /* Subroutine */ int sgemm_(const char *transa, const char *transb, integer *m, integer *
00080         n, integer *k, real *alpha, real *a, integer *lda, real *b, integer *
00081         ldb, real *beta, real *c__, integer *ldc);
00082 
00083 /* Subroutine */ int sgemv_(const char *trans, integer *m, integer *n, real *alpha, 
00084         real *a, integer *lda, real *x, integer *incx, real *beta, real *y, 
00085         integer *incy);
00086 
00087 /* Subroutine */ int sger_(integer *m, integer *n, real *alpha, real *x, 
00088         integer *incx, real *y, integer *incy, real *a, integer *lda);
00089 
00090 /* Subroutine */ int slae2_(real *a, real *b, real *c__, real *rt1, real *rt2);
00091 
00092 /* Subroutine */ int slaev2_(real *a, real *b, real *c__, real *rt1, real *
00093         rt2, real *cs1, real *sn1);
00094 
00095 doublereal slamch_(const char *cmach);
00096 
00097 doublereal slanst_(const char *norm, integer *n, real *d__, real *e);
00098 
00099 doublereal slansy_(const char *norm, char *uplo, integer *n, real *a, integer *lda, 
00100         real *work);
00101 
00102 doublereal slapy2_(real *x, real *y);
00103 
00104 /* Subroutine */ int slarfb_(const char *side, const char *trans, const char *direct, const char *
00105         storev, integer *m, integer *n, integer *k, real *v, integer *ldv, 
00106         real *t, integer *ldt, real *c__, integer *ldc, real *work, integer *
00107         ldwork);
00108 
00109 /* Subroutine */ int slarf_(const char *side, integer *m, integer *n, real *v, 
00110         integer *incv, real *tau, real *c__, integer *ldc, real *work);
00111 
00112 /* Subroutine */ int slarfg_(integer *n, real *alpha, real *x, integer *incx, 
00113         real *tau);
00114 
00115 /* Subroutine */ int slarft_(const char *direct, const char *storev, integer *n, integer *
00116         k, real *v, integer *ldv, real *tau, real *t, integer *ldt);
00117 
00118 /* Subroutine */ int slartg_(real *f, real *g, real *cs, real *sn, real *r__);
00119 
00120 /* Subroutine */ int slascl_(const char *type__, integer *kl, integer *ku, real *
00121         cfrom, real *cto, integer *m, integer *n, real *a, integer *lda, 
00122         integer *info);
00123 
00124 /* Subroutine */ int slaset_(const char *uplo, integer *m, integer *n, real *alpha, 
00125         real *beta, real *a, integer *lda);
00126 
00127 /* Subroutine */ int slasr_(const char *side, const char *pivot, const char *direct, integer *m,
00128          integer *n, real *c__, real *s, real *a, integer *lda);
00129 
00130 /* Subroutine */ int slasrt_(const char *id, integer *n, real *d__, integer *info);
00131 
00132 /* Subroutine */ int slassq_(integer *n, real *x, integer *incx, real *scale, 
00133         real *sumsq);
00134 
00135 /* Subroutine */ int slatrd_(char *uplo, integer *n, integer *nb, real *a, 
00136         integer *lda, real *e, real *tau, real *w, integer *ldw);
00137 
00138 doublereal snrm2_(integer *n, real *x, integer *incx);
00139 
00140 /* Subroutine */ int srot_(integer *n, real *sx, integer *incx, real *sy, 
00141                            integer *incy, real *c__, real *s);
00142 
00143 
00144 /* Subroutine */ int sorg2l_(integer *m, integer *n, integer *k, real *a, 
00145         integer *lda, real *tau, real *work, integer *info);
00146 
00147 /* Subroutine */ int sorg2r_(integer *m, integer *n, integer *k, real *a, 
00148         integer *lda, real *tau, real *work, integer *info);
00149 
00150 /* Subroutine */ int sorgql_(integer *m, integer *n, integer *k, real *a, 
00151         integer *lda, real *tau, real *work, integer *lwork, integer *info);
00152 
00153 /* Subroutine */ int sorgqr_(integer *m, integer *n, integer *k, real *a, 
00154         integer *lda, real *tau, real *work, integer *lwork, integer *info);
00155 
00156 /* Subroutine */ int sorgtr_(char *uplo, integer *n, real *a, integer *lda, 
00157         real *tau, real *work, integer *lwork, integer *info);
00158 
00159 /* Subroutine */ int sscal_(integer *n, real *sa, real *sx, integer *incx);
00160 
00161 /* Subroutine */ int ssteqr_(const char *compz, integer *n, real *d__, real *e, 
00162         real *z__, integer *ldz, real *work, integer *info);
00163 
00164 /* Subroutine */ int ssterf_(integer *n, real *d__, real *e, integer *info);
00165 
00166 /* Subroutine */ int sswap_(integer *n, real *sx, integer *incx, real *sy, 
00167         integer *incy);
00168 
00169 /* Subroutine */ int ssyev_(char *jobz, char *uplo, integer *n, real *a, 
00170         integer *lda, real *w, real *work, integer *lwork, integer *info);
00171 
00172 /* Subroutine */ int ssymv_(const char *uplo, integer *n, real *alpha, real *a, 
00173         integer *lda, real *x, integer *incx, real *beta, real *y, integer *
00174         incy);
00175 
00176 /* Subroutine */ int ssyr2_(char *uplo, integer *n, real *alpha, real *x, 
00177         integer *incx, real *y, integer *incy, real *a, integer *lda);
00178 
00179 /* Subroutine */ int ssyr2k_(char *uplo, const char *trans, integer *n, integer *k, 
00180         real *alpha, real *a, integer *lda, real *b, integer *ldb, real *beta,
00181          real *c__, integer *ldc);
00182 
00183 /* Subroutine */ int ssytd2_(char *uplo, integer *n, real *a, integer *lda, 
00184         real *d__, real *e, real *tau, integer *info);
00185 
00186 /* Subroutine */ int ssytrd_(char *uplo, integer *n, real *a, integer *lda, 
00187         real *d__, real *e, real *tau, real *work, integer *lwork, integer *
00188         info);
00189 
00190 /* Subroutine */ int strmm_(const char *side, const char *uplo, const char *transa, const char *diag, 
00191         integer *m, integer *n, real *alpha, real *a, integer *lda, real *b, 
00192         integer *ldb);
00193 
00194 /* Subroutine */ int strmv_(const char *uplo, const char *trans, const char *diag, integer *n, 
00195         real *a, integer *lda, real *x, integer *incx);
00196 
00197 /* Subroutine */ int xerbla_(const char *srname, integer *info);
00198 
00199 /* Subroutine */ int sstedc_(const char *compz, integer *n, real *d__, real *e, 
00200         real *z__, integer *ldz, real *work, integer *lwork, integer *iwork, 
00201                              integer *liwork, integer *info);
00202 
00203 /* Subroutine */ int sstevd_(char *jobz, integer *n, real *d__, real *e, real 
00204         *z__, integer *ldz, real *work, integer *lwork, integer *iwork, 
00205                              integer *liwork, integer *info);
00206 
00207 /* Subroutine */ int slaeda_(integer *n, integer *tlvls, integer *curlvl, 
00208         integer *curpbm, integer *prmptr, integer *perm, integer *givptr, 
00209         integer *givcol, real *givnum, real *q, integer *qptr, real *z__, 
00210                              real *ztemp, integer *info);
00211 
00212 /* Subroutine */ int slaed0_(integer *icompq, integer *qsiz, integer *n, real 
00213         *d__, real *e, real *q, integer *ldq, real *qstore, integer *ldqs, 
00214                              real *work, integer *iwork, integer *info);
00215 
00216 /* Subroutine */ int slaed1_(integer *n, real *d__, real *q, integer *ldq, 
00217         integer *indxq, real *rho, integer *cutpnt, real *work, integer *
00218                              iwork, integer *info);
00219 
00220 /* Subroutine */ int slaed2_(integer *k, integer *n, integer *n1, real *d__, 
00221         real *q, integer *ldq, integer *indxq, real *rho, real *z__, real *
00222         dlamda, real *w, real *q2, integer *indx, integer *indxc, integer *
00223                              indxp, integer *coltyp, integer *info);
00224 
00225 /* Subroutine */ int slaed3_(integer *k, integer *n, integer *n1, real *d__, 
00226         real *q, integer *ldq, real *rho, real *dlamda, real *q2, integer *
00227                              indx, integer *ctot, real *w, real *s, integer *info);
00228 
00229 /* Subroutine */ int slaed4_(integer *n, integer *i__, real *d__, real *z__, 
00230                              real *delta, real *rho, real *dlam, integer *info);
00231 
00232 /* Subroutine */ int slaed5_(integer *i__, real *d__, real *z__, real *delta, 
00233                              real *rho, real *dlam);
00234 
00235 /* Subroutine */ int slaed6_(integer *kniter, logical *orgati, real *rho, 
00236                              real *d__, real *z__, real *finit, real *tau, integer *info);
00237 
00238 /* Subroutine */ int slaed7_(integer *icompq, integer *n, integer *qsiz, 
00239         integer *tlvls, integer *curlvl, integer *curpbm, real *d__, real *q, 
00240         integer *ldq, integer *indxq, real *rho, integer *cutpnt, real *
00241         qstore, integer *qptr, integer *prmptr, integer *perm, integer *
00242         givptr, integer *givcol, real *givnum, real *work, integer *iwork, 
00243                              integer *info);
00244 
00245 /* Subroutine */ int slaed8_(integer *icompq, integer *k, integer *n, integer 
00246         *qsiz, real *d__, real *q, integer *ldq, integer *indxq, real *rho, 
00247         integer *cutpnt, real *z__, real *dlamda, real *q2, integer *ldq2, 
00248         real *w, integer *perm, integer *givptr, integer *givcol, real *
00249                              givnum, integer *indxp, integer *indx, integer *info);
00250 
00251 /* Subroutine */ int slaed9_(integer *k, integer *kstart, integer *kstop, 
00252         integer *n, real *d__, real *q, integer *ldq, real *rho, real *dlamda,
00253                              real *w, real *s, integer *lds, integer *info);
00254 
00255 
00256 /* Subroutine */ int slacpy_(const char *uplo, integer *m, integer *n, real *a, 
00257                              integer *lda, real *b, integer *ldb);
00258 
00259 /* Subroutine */ int slamrg_(integer *n1, integer *n2, real *a, integer *
00260                              strd1, integer *strd2, integer *index);
00261 
00262 /* Subroutine */ int sorgl2_(integer *m, integer *n, integer *k, real *a, 
00263                              integer *lda, real *tau, real *work, integer *info);
00264 
00265 /* Subroutine */ int sgesvd_(char *jobu, char *jobvt, integer *m, integer *n, 
00266         real *a, integer *lda, real *s, real *u, integer *ldu, real *vt, 
00267                              integer *ldvt, real *work, integer *lwork, integer *info);
00268 
00269 /* Subroutine */ int sorglq_(integer *m, integer *n, integer *k, real *a, 
00270                              integer *lda, real *tau, real *work, integer *lwork, integer *info);
00271 
00272 doublereal slange_(const char *norm, integer *m, integer *n, real *a, integer *lda, 
00273                    real *work);
00274 
00275 /* Subroutine */ int sgebrd_(integer *m, integer *n, real *a, integer *lda, 
00276         real *d__, real *e, real *tauq, real *taup, real *work, integer *
00277                              lwork, integer *info);
00278 
00279 /* Subroutine */ int sgebd2_(integer *m, integer *n, real *a, integer *lda, 
00280                              real *d__, real *e, real *tauq, real *taup, real *work, integer *info);
00281 /* Subroutine */ int sormbr_(const char *vect, const char *side, const char *trans, integer *m, 
00282         integer *n, integer *k, real *a, integer *lda, real *tau, real *c__, 
00283                              integer *ldc, real *work, integer *lwork, integer *info);
00284 
00285 /* Subroutine */ int sgelqf_(integer *m, integer *n, real *a, integer *lda, 
00286                              real *tau, real *work, integer *lwork, integer *info);
00287 
00288 /* Subroutine */ int sormlq_(const char *side, const char *trans, integer *m, integer *n, 
00289         integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc,
00290                              real *work, integer *lwork, integer *info);
00291 
00292 /* Subroutine */ int sormqr_(const char *side, const char *trans, integer *m, integer *n, 
00293         integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc,
00294                              real *work, integer *lwork, integer *info);
00295 
00296 /* Subroutine */ int sgelq2_(integer *m, integer *n, real *a, integer *lda, 
00297                              real *tau, real *work, integer *info);
00298 
00299 /* Subroutine */ int sbdsqr_(const char *uplo, integer *n, integer *ncvt, integer *
00300         nru, integer *ncc, real *d__, real *e, real *vt, integer *ldvt, real *
00301                              u, integer *ldu, real *c__, integer *ldc, real *work, integer *info);
00302 
00303 /* Subroutine */ int sgeqrf_(integer *m, integer *n, real *a, integer *lda, 
00304                              real *tau, real *work, integer *lwork, integer *info);
00305 
00306 /* Subroutine */ int sorml2_(const char *side, const char *trans, integer *m, integer *n, 
00307         integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc,
00308                              real *work, integer *info);
00309 
00310 /* Subroutine */ int slabrd_(integer *m, integer *n, integer *nb, real *a, 
00311         integer *lda, real *d__, real *e, real *tauq, real *taup, real *x, 
00312                              integer *ldx, real *y, integer *ldy);
00313 
00314 /* Subroutine */ int sgeqr2_(integer *m, integer *n, real *a, integer *lda, 
00315                              real *tau, real *work, integer *info);
00316 
00317 /* Subroutine */ int sorm2r_(const char *side, const char *trans, integer *m, integer *n, 
00318         integer *k, real *a, integer *lda, real *tau, real *c__, integer *ldc,
00319                              real *work, integer *info);
00320 
00321 /* Subroutine */ int sorgbr_(const char *vect, integer *m, integer *n, integer *k, 
00322         real *a, integer *lda, real *tau, real *work, integer *lwork, integer 
00323                              *info);
00324 
00325 /* Subroutine */ int slasq1_(integer *n, real *d__, real *e, real *work, 
00326                              integer *info);
00327 
00328 /* Subroutine */ int slasq2_(integer *n, real *z__, integer *info);
00329 
00330 /* Subroutine */ int slasq3_(integer *i0, integer *n0, real *z__, integer *pp,
00331          real *dmin__, real *sigma, real *desig, real *qmax, integer *nfail, 
00332                              integer *iter, integer *ndiv, logical *ieee);
00333 
00334 /* Subroutine */ int slasq4_(integer *i0, integer *n0, real *z__, integer *pp,
00335          integer *n0in, real *dmin__, real *dmin1, real *dmin2, real *dn, 
00336                              real *dn1, real *dn2, real *tau, integer *ttype);
00337 
00338 /* Subroutine */ int slasq5_(integer *i0, integer *n0, real *z__, integer *pp,
00339          real *tau, real *dmin__, real *dmin1, real *dmin2, real *dn, real *
00340                              dnm1, real *dnm2, logical *ieee);
00341 
00342 /* Subroutine */ int slasq6_(integer *i0, integer *n0, real *z__, integer *pp,
00343          real *dmin__, real *dmin1, real *dmin2, real *dn, real *dnm1, real *
00344                              dnm2);
00345 
00346 /* Subroutine */ int slasv2_(real *f, real *g, real *h__, real *ssmin, real *
00347                              ssmax, real *snr, real *csr, real *snl, real *csl);
00348 
00349 /* Subroutine */ int slas2_(real *f, real *g, real *h__, real *ssmin, real *
00350                             ssmax);
00351 
00352 
00353 
00354 
00355 
00356 
00357 
00358 
00359 
00360 
00361 
00362 
00363 
00364 
00365 
00366 
00367 
00368 
00369 
00370