updated 3rd party libs: CLapack 3.1.1.1 => 3.2.1, zlib 1.2.3 => 1.2.5, libpng 1.2.x => 1.4.3, libtiff 3.7.x => 3.9.4. fixed many 64-bit related VS2010 warnings
This commit is contained in:
49
3rdparty/lapack/dlarfg.c
vendored
49
3rdparty/lapack/dlarfg.c
vendored
@@ -1,5 +1,18 @@
|
||||
/* dlarfg.f -- translated by f2c (version 20061008).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
|
||||
#include "clapack.h"
|
||||
|
||||
|
||||
/* Subroutine */ int dlarfg_(integer *n, doublereal *alpha, doublereal *x,
|
||||
integer *incx, doublereal *tau)
|
||||
{
|
||||
@@ -21,7 +34,7 @@
|
||||
doublereal safmin, rsafmn;
|
||||
|
||||
|
||||
/* -- LAPACK auxiliary routine (version 3.1) -- */
|
||||
/* -- LAPACK auxiliary routine (version 3.2) -- */
|
||||
/* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
|
||||
/* November 2006 */
|
||||
|
||||
@@ -112,12 +125,12 @@
|
||||
d__1 = dlapy2_(alpha, &xnorm);
|
||||
beta = -d_sign(&d__1, alpha);
|
||||
safmin = dlamch_("S") / dlamch_("E");
|
||||
knt = 0;
|
||||
if (abs(beta) < safmin) {
|
||||
|
||||
/* XNORM, BETA may be inaccurate; scale X and recompute them */
|
||||
|
||||
rsafmn = 1. / safmin;
|
||||
knt = 0;
|
||||
L10:
|
||||
++knt;
|
||||
i__1 = *n - 1;
|
||||
@@ -134,26 +147,20 @@ L10:
|
||||
xnorm = dnrm2_(&i__1, &x[1], incx);
|
||||
d__1 = dlapy2_(alpha, &xnorm);
|
||||
beta = -d_sign(&d__1, alpha);
|
||||
*tau = (beta - *alpha) / beta;
|
||||
i__1 = *n - 1;
|
||||
d__1 = 1. / (*alpha - beta);
|
||||
dscal_(&i__1, &d__1, &x[1], incx);
|
||||
|
||||
/* If ALPHA is subnormal, it may lose relative accuracy */
|
||||
|
||||
*alpha = beta;
|
||||
i__1 = knt;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
*alpha *= safmin;
|
||||
/* L20: */
|
||||
}
|
||||
} else {
|
||||
*tau = (beta - *alpha) / beta;
|
||||
i__1 = *n - 1;
|
||||
d__1 = 1. / (*alpha - beta);
|
||||
dscal_(&i__1, &d__1, &x[1], incx);
|
||||
*alpha = beta;
|
||||
}
|
||||
*tau = (beta - *alpha) / beta;
|
||||
i__1 = *n - 1;
|
||||
d__1 = 1. / (*alpha - beta);
|
||||
dscal_(&i__1, &d__1, &x[1], incx);
|
||||
|
||||
/* If ALPHA is subnormal, it may lose relative accuracy */
|
||||
|
||||
i__1 = knt;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
beta *= safmin;
|
||||
/* L20: */
|
||||
}
|
||||
*alpha = beta;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user