mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Upgrade liblinear to 2.47
This commit is contained in:
parent
1fc984bc73
commit
34e0769329
22 changed files with 2883 additions and 1054 deletions
|
|
@ -1,14 +1,14 @@
|
|||
AR = ar
|
||||
RANLIB = ranlib
|
||||
AR ?= ar
|
||||
RANLIB ?= ranlib
|
||||
|
||||
HEADERS = blas.h blas.h blasp.h
|
||||
FILES = dnrm2.o daxpy.o ddot.o dscal.o
|
||||
HEADERS = blas.h blasp.h
|
||||
FILES = dnrm2.o daxpy.o ddot.o dscal.o
|
||||
|
||||
CFLAGS = $(OPTFLAGS)
|
||||
CFLAGS = $(OPTFLAGS)
|
||||
FFLAGS = $(OPTFLAGS)
|
||||
|
||||
blas: $(FILES) $(HEADERS)
|
||||
$(AR) rcv blas.a $(FILES)
|
||||
$(AR) rcv blas.a $(FILES)
|
||||
$(RANLIB) blas.a
|
||||
|
||||
clean:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
/* Functions listed in alphabetical order */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef F2C_COMPAT
|
||||
|
||||
void cdotc_(fcomplex *dotval, int *n, fcomplex *cx, int *incx,
|
||||
|
|
@ -166,7 +170,7 @@ int dgemm_(char *transa, char *transb, int *m, int *n, int *k,
|
|||
double *beta, double *c, int *ldc);
|
||||
|
||||
int dgemv_(char *trans, int *m, int *n, double *alpha, double *a,
|
||||
int *lda, double *x, int *incx, double *beta, double *y,
|
||||
int *lda, double *x, int *incx, double *beta, double *y,
|
||||
int *incy);
|
||||
|
||||
int dger_(int *m, int *n, double *alpha, double *x, int *incx,
|
||||
|
|
@ -178,7 +182,7 @@ int drot_(int *n, double *sx, int *incx, double *sy, int *incy,
|
|||
int drotg_(double *sa, double *sb, double *c, double *s);
|
||||
|
||||
int dsbmv_(char *uplo, int *n, int *k, double *alpha, double *a,
|
||||
int *lda, double *x, int *incx, double *beta, double *y,
|
||||
int *lda, double *x, int *incx, double *beta, double *y,
|
||||
int *incy);
|
||||
|
||||
int dscal_(int *n, double *sa, double *sx, int *incx);
|
||||
|
|
@ -227,14 +231,14 @@ int dtpsv_(char *uplo, char *trans, char *diag, int *n, double *ap,
|
|||
double *x, int *incx);
|
||||
|
||||
int dtrmm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, double *alpha, double *a, int *lda, double *b,
|
||||
int *n, double *alpha, double *a, int *lda, double *b,
|
||||
int *ldb);
|
||||
|
||||
int dtrmv_(char *uplo, char *trans, char *diag, int *n, double *a,
|
||||
int *lda, double *x, int *incx);
|
||||
|
||||
int dtrsm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, double *alpha, double *a, int *lda, double *b,
|
||||
int *n, double *alpha, double *a, int *lda, double *b,
|
||||
int *ldb);
|
||||
|
||||
int dtrsv_(char *uplo, char *trans, char *diag, int *n, double *a,
|
||||
|
|
@ -254,7 +258,7 @@ int sgemm_(char *transa, char *transb, int *m, int *n, int *k,
|
|||
float *beta, float *c, int *ldc);
|
||||
|
||||
int sgemv_(char *trans, int *m, int *n, float *alpha, float *a,
|
||||
int *lda, float *x, int *incx, float *beta, float *y,
|
||||
int *lda, float *x, int *incx, float *beta, float *y,
|
||||
int *incy);
|
||||
|
||||
int sger_(int *m, int *n, float *alpha, float *x, int *incx,
|
||||
|
|
@ -266,7 +270,7 @@ int srot_(int *n, float *sx, int *incx, float *sy, int *incy,
|
|||
int srotg_(float *sa, float *sb, float *c, float *s);
|
||||
|
||||
int ssbmv_(char *uplo, int *n, int *k, float *alpha, float *a,
|
||||
int *lda, float *x, int *incx, float *beta, float *y,
|
||||
int *lda, float *x, int *incx, float *beta, float *y,
|
||||
int *incy);
|
||||
|
||||
int sscal_(int *n, float *sa, float *sx, int *incx);
|
||||
|
|
@ -315,14 +319,14 @@ int stpsv_(char *uplo, char *trans, char *diag, int *n, float *ap,
|
|||
float *x, int *incx);
|
||||
|
||||
int strmm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, float *alpha, float *a, int *lda, float *b,
|
||||
int *n, float *alpha, float *a, int *lda, float *b,
|
||||
int *ldb);
|
||||
|
||||
int strmv_(char *uplo, char *trans, char *diag, int *n, float *a,
|
||||
int *lda, float *x, int *incx);
|
||||
|
||||
int strsm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, float *alpha, float *a, int *lda, float *b,
|
||||
int *n, float *alpha, float *a, int *lda, float *b,
|
||||
int *ldb);
|
||||
|
||||
int strsv_(char *uplo, char *trans, char *diag, int *n, float *a,
|
||||
|
|
@ -428,3 +432,7 @@ int ztrsm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
|||
|
||||
int ztrsv_(char *uplo, char *trans, char *diag, int *n, dcomplex *a,
|
||||
int *lda, dcomplex *x, int *incx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
#include "blas.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int daxpy_(int *n, double *sa, double *sx, int *incx, double *sy,
|
||||
int *incy)
|
||||
{
|
||||
long int i, m, ix, iy, nn, iincx, iincy;
|
||||
register double ssa;
|
||||
|
||||
/* constant times a vector plus a vector.
|
||||
uses unrolled loop for increments equal to one.
|
||||
jack dongarra, linpack, 3/11/78.
|
||||
/* constant times a vector plus a vector.
|
||||
uses unrolled loop for increments equal to one.
|
||||
jack dongarra, linpack, 3/11/78.
|
||||
modified 12/3/93, array(1) declarations changed to array(*) */
|
||||
|
||||
/* Dereference inputs */
|
||||
|
|
@ -47,3 +51,7 @@ int daxpy_(int *n, double *sa, double *sx, int *incx, double *sy,
|
|||
|
||||
return 0;
|
||||
} /* daxpy_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
#include "blas.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
double ddot_(int *n, double *sx, int *incx, double *sy, int *incy)
|
||||
{
|
||||
long int i, m, nn, iincx, iincy;
|
||||
double stemp;
|
||||
long int ix, iy;
|
||||
|
||||
/* forms the dot product of two vectors.
|
||||
uses unrolled loops for increments equal to one.
|
||||
jack dongarra, linpack, 3/11/78.
|
||||
/* forms the dot product of two vectors.
|
||||
uses unrolled loops for increments equal to one.
|
||||
jack dongarra, linpack, 3/11/78.
|
||||
modified 12/3/93, array(1) declarations changed to array(*) */
|
||||
|
||||
/* Dereference inputs */
|
||||
|
|
@ -48,3 +52,7 @@ double ddot_(int *n, double *sx, int *incx, double *sy, int *incy)
|
|||
|
||||
return stemp;
|
||||
} /* ddot_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,18 +1,22 @@
|
|||
#include <math.h> /* Needed for fabs() and sqrt() */
|
||||
#include "blas.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
double dnrm2_(int *n, double *x, int *incx)
|
||||
{
|
||||
long int ix, nn, iincx;
|
||||
double norm, scale, absxi, ssq, temp;
|
||||
|
||||
/* DNRM2 returns the euclidean norm of a vector via the function
|
||||
name, so that
|
||||
/* DNRM2 returns the euclidean norm of a vector via the function
|
||||
name, so that
|
||||
|
||||
DNRM2 := sqrt( x'*x )
|
||||
DNRM2 := sqrt( x'*x )
|
||||
|
||||
-- This version written on 25-October-1982.
|
||||
Modified on 14-October-1993 to inline the call to SLASSQ.
|
||||
-- This version written on 25-October-1982.
|
||||
Modified on 14-October-1993 to inline the call to SLASSQ.
|
||||
Sven Hammarling, Nag Ltd. */
|
||||
|
||||
/* Dereference inputs */
|
||||
|
|
@ -24,13 +28,13 @@ double dnrm2_(int *n, double *x, int *incx)
|
|||
if (nn == 1)
|
||||
{
|
||||
norm = fabs(x[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = 0.0;
|
||||
ssq = 1.0;
|
||||
|
||||
/* The following loop is equivalent to this call to the LAPACK
|
||||
/* The following loop is equivalent to this call to the LAPACK
|
||||
auxiliary routine: CALL SLASSQ( N, X, INCX, SCALE, SSQ ) */
|
||||
|
||||
for (ix=(nn-1)*iincx; ix>=0; ix-=iincx)
|
||||
|
|
@ -60,3 +64,7 @@ double dnrm2_(int *n, double *x, int *incx)
|
|||
return norm;
|
||||
|
||||
} /* dnrm2_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
#include "blas.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int dscal_(int *n, double *sa, double *sx, int *incx)
|
||||
{
|
||||
long int i, m, nincx, nn, iincx;
|
||||
double ssa;
|
||||
|
||||
/* scales a vector by a constant.
|
||||
uses unrolled loops for increment equal to 1.
|
||||
jack dongarra, linpack, 3/11/78.
|
||||
modified 3/93 to return if incx .le. 0.
|
||||
/* scales a vector by a constant.
|
||||
uses unrolled loops for increment equal to 1.
|
||||
jack dongarra, linpack, 3/11/78.
|
||||
modified 3/93 to return if incx .le. 0.
|
||||
modified 12/3/93, array(1) declarations changed to array(*) */
|
||||
|
||||
/* Dereference inputs */
|
||||
|
|
@ -42,3 +46,7 @@ int dscal_(int *n, double *sa, double *sx, int *incx)
|
|||
|
||||
return 0;
|
||||
} /* dscal_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue