First commit
This commit is contained in:
22
liblinear-2.49/blas/Makefile
Normal file
22
liblinear-2.49/blas/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
AR ?= ar
|
||||
RANLIB ?= ranlib
|
||||
|
||||
HEADERS = blas.h blasp.h
|
||||
FILES = dnrm2.o daxpy.o ddot.o dscal.o
|
||||
|
||||
CFLAGS = $(OPTFLAGS)
|
||||
FFLAGS = $(OPTFLAGS)
|
||||
|
||||
blas: $(FILES) $(HEADERS)
|
||||
$(AR) rcv blas.a $(FILES)
|
||||
$(RANLIB) blas.a
|
||||
|
||||
clean:
|
||||
- rm -f *.o
|
||||
- rm -f *.a
|
||||
- rm -f *~
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $*.c
|
||||
|
||||
|
25
liblinear-2.49/blas/blas.h
Normal file
25
liblinear-2.49/blas/blas.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* blas.h -- C header file for BLAS Ver 1.0 */
|
||||
/* Jesse Bennett March 23, 2000 */
|
||||
|
||||
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
|
||||
|
||||
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
|
||||
|
||||
#ifndef BLAS_INCLUDE
|
||||
#define BLAS_INCLUDE
|
||||
|
||||
/* Data types specific to BLAS implementation */
|
||||
typedef struct { float r, i; } fcomplex;
|
||||
typedef struct { double r, i; } dcomplex;
|
||||
typedef int blasbool;
|
||||
|
||||
#include "blasp.h" /* Prototypes for all BLAS functions */
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
||||
/* Macro functions */
|
||||
#define MIN(a,b) ((a) <= (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) >= (b) ? (a) : (b))
|
||||
|
||||
#endif
|
438
liblinear-2.49/blas/blasp.h
Normal file
438
liblinear-2.49/blas/blasp.h
Normal file
@@ -0,0 +1,438 @@
|
||||
/* blasp.h -- C prototypes for BLAS Ver 1.0 */
|
||||
/* Jesse Bennett March 23, 2000 */
|
||||
|
||||
/* Functions listed in alphabetical order */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef F2C_COMPAT
|
||||
|
||||
void cdotc_(fcomplex *dotval, int *n, fcomplex *cx, int *incx,
|
||||
fcomplex *cy, int *incy);
|
||||
|
||||
void cdotu_(fcomplex *dotval, int *n, fcomplex *cx, int *incx,
|
||||
fcomplex *cy, int *incy);
|
||||
|
||||
double sasum_(int *n, float *sx, int *incx);
|
||||
|
||||
double scasum_(int *n, fcomplex *cx, int *incx);
|
||||
|
||||
double scnrm2_(int *n, fcomplex *x, int *incx);
|
||||
|
||||
double sdot_(int *n, float *sx, int *incx, float *sy, int *incy);
|
||||
|
||||
double snrm2_(int *n, float *x, int *incx);
|
||||
|
||||
void zdotc_(dcomplex *dotval, int *n, dcomplex *cx, int *incx,
|
||||
dcomplex *cy, int *incy);
|
||||
|
||||
void zdotu_(dcomplex *dotval, int *n, dcomplex *cx, int *incx,
|
||||
dcomplex *cy, int *incy);
|
||||
|
||||
#else
|
||||
|
||||
fcomplex cdotc_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy);
|
||||
|
||||
fcomplex cdotu_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy);
|
||||
|
||||
float sasum_(int *n, float *sx, int *incx);
|
||||
|
||||
float scasum_(int *n, fcomplex *cx, int *incx);
|
||||
|
||||
float scnrm2_(int *n, fcomplex *x, int *incx);
|
||||
|
||||
float sdot_(int *n, float *sx, int *incx, float *sy, int *incy);
|
||||
|
||||
float snrm2_(int *n, float *x, int *incx);
|
||||
|
||||
dcomplex zdotc_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy);
|
||||
|
||||
dcomplex zdotu_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy);
|
||||
|
||||
#endif
|
||||
|
||||
/* Remaining functions listed in alphabetical order */
|
||||
|
||||
int caxpy_(int *n, fcomplex *ca, fcomplex *cx, int *incx, fcomplex *cy,
|
||||
int *incy);
|
||||
|
||||
int ccopy_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy);
|
||||
|
||||
int cgbmv_(char *trans, int *m, int *n, int *kl, int *ku,
|
||||
fcomplex *alpha, fcomplex *a, int *lda, fcomplex *x, int *incx,
|
||||
fcomplex *beta, fcomplex *y, int *incy);
|
||||
|
||||
int cgemm_(char *transa, char *transb, int *m, int *n, int *k,
|
||||
fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb,
|
||||
fcomplex *beta, fcomplex *c, int *ldc);
|
||||
|
||||
int cgemv_(char *trans, int *m, int *n, fcomplex *alpha, fcomplex *a,
|
||||
int *lda, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y,
|
||||
int *incy);
|
||||
|
||||
int cgerc_(int *m, int *n, fcomplex *alpha, fcomplex *x, int *incx,
|
||||
fcomplex *y, int *incy, fcomplex *a, int *lda);
|
||||
|
||||
int cgeru_(int *m, int *n, fcomplex *alpha, fcomplex *x, int *incx,
|
||||
fcomplex *y, int *incy, fcomplex *a, int *lda);
|
||||
|
||||
int chbmv_(char *uplo, int *n, int *k, fcomplex *alpha, fcomplex *a,
|
||||
int *lda, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y,
|
||||
int *incy);
|
||||
|
||||
int chemm_(char *side, char *uplo, int *m, int *n, fcomplex *alpha,
|
||||
fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta,
|
||||
fcomplex *c, int *ldc);
|
||||
|
||||
int chemv_(char *uplo, int *n, fcomplex *alpha, fcomplex *a, int *lda,
|
||||
fcomplex *x, int *incx, fcomplex *beta, fcomplex *y, int *incy);
|
||||
|
||||
int cher_(char *uplo, int *n, float *alpha, fcomplex *x, int *incx,
|
||||
fcomplex *a, int *lda);
|
||||
|
||||
int cher2_(char *uplo, int *n, fcomplex *alpha, fcomplex *x, int *incx,
|
||||
fcomplex *y, int *incy, fcomplex *a, int *lda);
|
||||
|
||||
int cher2k_(char *uplo, char *trans, int *n, int *k, fcomplex *alpha,
|
||||
fcomplex *a, int *lda, fcomplex *b, int *ldb, float *beta,
|
||||
fcomplex *c, int *ldc);
|
||||
|
||||
int cherk_(char *uplo, char *trans, int *n, int *k, float *alpha,
|
||||
fcomplex *a, int *lda, float *beta, fcomplex *c, int *ldc);
|
||||
|
||||
int chpmv_(char *uplo, int *n, fcomplex *alpha, fcomplex *ap, fcomplex *x,
|
||||
int *incx, fcomplex *beta, fcomplex *y, int *incy);
|
||||
|
||||
int chpr_(char *uplo, int *n, float *alpha, fcomplex *x, int *incx,
|
||||
fcomplex *ap);
|
||||
|
||||
int chpr2_(char *uplo, int *n, fcomplex *alpha, fcomplex *x, int *incx,
|
||||
fcomplex *y, int *incy, fcomplex *ap);
|
||||
|
||||
int crotg_(fcomplex *ca, fcomplex *cb, float *c, fcomplex *s);
|
||||
|
||||
int cscal_(int *n, fcomplex *ca, fcomplex *cx, int *incx);
|
||||
|
||||
int csscal_(int *n, float *sa, fcomplex *cx, int *incx);
|
||||
|
||||
int cswap_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy);
|
||||
|
||||
int csymm_(char *side, char *uplo, int *m, int *n, fcomplex *alpha,
|
||||
fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta,
|
||||
fcomplex *c, int *ldc);
|
||||
|
||||
int csyr2k_(char *uplo, char *trans, int *n, int *k, fcomplex *alpha,
|
||||
fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta,
|
||||
fcomplex *c, int *ldc);
|
||||
|
||||
int csyrk_(char *uplo, char *trans, int *n, int *k, fcomplex *alpha,
|
||||
fcomplex *a, int *lda, fcomplex *beta, fcomplex *c, int *ldc);
|
||||
|
||||
int ctbmv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
fcomplex *a, int *lda, fcomplex *x, int *incx);
|
||||
|
||||
int ctbsv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
fcomplex *a, int *lda, fcomplex *x, int *incx);
|
||||
|
||||
int ctpmv_(char *uplo, char *trans, char *diag, int *n, fcomplex *ap,
|
||||
fcomplex *x, int *incx);
|
||||
|
||||
int ctpsv_(char *uplo, char *trans, char *diag, int *n, fcomplex *ap,
|
||||
fcomplex *x, int *incx);
|
||||
|
||||
int ctrmm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b,
|
||||
int *ldb);
|
||||
|
||||
int ctrmv_(char *uplo, char *trans, char *diag, int *n, fcomplex *a,
|
||||
int *lda, fcomplex *x, int *incx);
|
||||
|
||||
int ctrsm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b,
|
||||
int *ldb);
|
||||
|
||||
int ctrsv_(char *uplo, char *trans, char *diag, int *n, fcomplex *a,
|
||||
int *lda, fcomplex *x, int *incx);
|
||||
|
||||
int daxpy_(int *n, double *sa, double *sx, int *incx, double *sy,
|
||||
int *incy);
|
||||
|
||||
int dcopy_(int *n, double *sx, int *incx, double *sy, int *incy);
|
||||
|
||||
int dgbmv_(char *trans, int *m, int *n, int *kl, int *ku,
|
||||
double *alpha, double *a, int *lda, double *x, int *incx,
|
||||
double *beta, double *y, int *incy);
|
||||
|
||||
int dgemm_(char *transa, char *transb, int *m, int *n, int *k,
|
||||
double *alpha, double *a, int *lda, double *b, int *ldb,
|
||||
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 *incy);
|
||||
|
||||
int dger_(int *m, int *n, double *alpha, double *x, int *incx,
|
||||
double *y, int *incy, double *a, int *lda);
|
||||
|
||||
int drot_(int *n, double *sx, int *incx, double *sy, int *incy,
|
||||
double *c, double *s);
|
||||
|
||||
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 *incy);
|
||||
|
||||
int dscal_(int *n, double *sa, double *sx, int *incx);
|
||||
|
||||
int dspmv_(char *uplo, int *n, double *alpha, double *ap, double *x,
|
||||
int *incx, double *beta, double *y, int *incy);
|
||||
|
||||
int dspr_(char *uplo, int *n, double *alpha, double *x, int *incx,
|
||||
double *ap);
|
||||
|
||||
int dspr2_(char *uplo, int *n, double *alpha, double *x, int *incx,
|
||||
double *y, int *incy, double *ap);
|
||||
|
||||
int dswap_(int *n, double *sx, int *incx, double *sy, int *incy);
|
||||
|
||||
int dsymm_(char *side, char *uplo, int *m, int *n, double *alpha,
|
||||
double *a, int *lda, double *b, int *ldb, double *beta,
|
||||
double *c, int *ldc);
|
||||
|
||||
int dsymv_(char *uplo, int *n, double *alpha, double *a, int *lda,
|
||||
double *x, int *incx, double *beta, double *y, int *incy);
|
||||
|
||||
int dsyr_(char *uplo, int *n, double *alpha, double *x, int *incx,
|
||||
double *a, int *lda);
|
||||
|
||||
int dsyr2_(char *uplo, int *n, double *alpha, double *x, int *incx,
|
||||
double *y, int *incy, double *a, int *lda);
|
||||
|
||||
int dsyr2k_(char *uplo, char *trans, int *n, int *k, double *alpha,
|
||||
double *a, int *lda, double *b, int *ldb, double *beta,
|
||||
double *c, int *ldc);
|
||||
|
||||
int dsyrk_(char *uplo, char *trans, int *n, int *k, double *alpha,
|
||||
double *a, int *lda, double *beta, double *c, int *ldc);
|
||||
|
||||
int dtbmv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
double *a, int *lda, double *x, int *incx);
|
||||
|
||||
int dtbsv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
double *a, int *lda, double *x, int *incx);
|
||||
|
||||
int dtpmv_(char *uplo, char *trans, char *diag, int *n, double *ap,
|
||||
double *x, int *incx);
|
||||
|
||||
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 *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 *ldb);
|
||||
|
||||
int dtrsv_(char *uplo, char *trans, char *diag, int *n, double *a,
|
||||
int *lda, double *x, int *incx);
|
||||
|
||||
|
||||
int saxpy_(int *n, float *sa, float *sx, int *incx, float *sy, int *incy);
|
||||
|
||||
int scopy_(int *n, float *sx, int *incx, float *sy, int *incy);
|
||||
|
||||
int sgbmv_(char *trans, int *m, int *n, int *kl, int *ku,
|
||||
float *alpha, float *a, int *lda, float *x, int *incx,
|
||||
float *beta, float *y, int *incy);
|
||||
|
||||
int sgemm_(char *transa, char *transb, int *m, int *n, int *k,
|
||||
float *alpha, float *a, int *lda, float *b, int *ldb,
|
||||
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 *incy);
|
||||
|
||||
int sger_(int *m, int *n, float *alpha, float *x, int *incx,
|
||||
float *y, int *incy, float *a, int *lda);
|
||||
|
||||
int srot_(int *n, float *sx, int *incx, float *sy, int *incy,
|
||||
float *c, float *s);
|
||||
|
||||
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 *incy);
|
||||
|
||||
int sscal_(int *n, float *sa, float *sx, int *incx);
|
||||
|
||||
int sspmv_(char *uplo, int *n, float *alpha, float *ap, float *x,
|
||||
int *incx, float *beta, float *y, int *incy);
|
||||
|
||||
int sspr_(char *uplo, int *n, float *alpha, float *x, int *incx,
|
||||
float *ap);
|
||||
|
||||
int sspr2_(char *uplo, int *n, float *alpha, float *x, int *incx,
|
||||
float *y, int *incy, float *ap);
|
||||
|
||||
int sswap_(int *n, float *sx, int *incx, float *sy, int *incy);
|
||||
|
||||
int ssymm_(char *side, char *uplo, int *m, int *n, float *alpha,
|
||||
float *a, int *lda, float *b, int *ldb, float *beta,
|
||||
float *c, int *ldc);
|
||||
|
||||
int ssymv_(char *uplo, int *n, float *alpha, float *a, int *lda,
|
||||
float *x, int *incx, float *beta, float *y, int *incy);
|
||||
|
||||
int ssyr_(char *uplo, int *n, float *alpha, float *x, int *incx,
|
||||
float *a, int *lda);
|
||||
|
||||
int ssyr2_(char *uplo, int *n, float *alpha, float *x, int *incx,
|
||||
float *y, int *incy, float *a, int *lda);
|
||||
|
||||
int ssyr2k_(char *uplo, char *trans, int *n, int *k, float *alpha,
|
||||
float *a, int *lda, float *b, int *ldb, float *beta,
|
||||
float *c, int *ldc);
|
||||
|
||||
int ssyrk_(char *uplo, char *trans, int *n, int *k, float *alpha,
|
||||
float *a, int *lda, float *beta, float *c, int *ldc);
|
||||
|
||||
int stbmv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
float *a, int *lda, float *x, int *incx);
|
||||
|
||||
int stbsv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
float *a, int *lda, float *x, int *incx);
|
||||
|
||||
int stpmv_(char *uplo, char *trans, char *diag, int *n, float *ap,
|
||||
float *x, int *incx);
|
||||
|
||||
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 *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 *ldb);
|
||||
|
||||
int strsv_(char *uplo, char *trans, char *diag, int *n, float *a,
|
||||
int *lda, float *x, int *incx);
|
||||
|
||||
int zaxpy_(int *n, dcomplex *ca, dcomplex *cx, int *incx, dcomplex *cy,
|
||||
int *incy);
|
||||
|
||||
int zcopy_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy);
|
||||
|
||||
int zdscal_(int *n, double *sa, dcomplex *cx, int *incx);
|
||||
|
||||
int zgbmv_(char *trans, int *m, int *n, int *kl, int *ku,
|
||||
dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx,
|
||||
dcomplex *beta, dcomplex *y, int *incy);
|
||||
|
||||
int zgemm_(char *transa, char *transb, int *m, int *n, int *k,
|
||||
dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb,
|
||||
dcomplex *beta, dcomplex *c, int *ldc);
|
||||
|
||||
int zgemv_(char *trans, int *m, int *n, dcomplex *alpha, dcomplex *a,
|
||||
int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y,
|
||||
int *incy);
|
||||
|
||||
int zgerc_(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx,
|
||||
dcomplex *y, int *incy, dcomplex *a, int *lda);
|
||||
|
||||
int zgeru_(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx,
|
||||
dcomplex *y, int *incy, dcomplex *a, int *lda);
|
||||
|
||||
int zhbmv_(char *uplo, int *n, int *k, dcomplex *alpha, dcomplex *a,
|
||||
int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y,
|
||||
int *incy);
|
||||
|
||||
int zhemm_(char *side, char *uplo, int *m, int *n, dcomplex *alpha,
|
||||
dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta,
|
||||
dcomplex *c, int *ldc);
|
||||
|
||||
int zhemv_(char *uplo, int *n, dcomplex *alpha, dcomplex *a, int *lda,
|
||||
dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy);
|
||||
|
||||
int zher_(char *uplo, int *n, double *alpha, dcomplex *x, int *incx,
|
||||
dcomplex *a, int *lda);
|
||||
|
||||
int zher2_(char *uplo, int *n, dcomplex *alpha, dcomplex *x, int *incx,
|
||||
dcomplex *y, int *incy, dcomplex *a, int *lda);
|
||||
|
||||
int zher2k_(char *uplo, char *trans, int *n, int *k, dcomplex *alpha,
|
||||
dcomplex *a, int *lda, dcomplex *b, int *ldb, double *beta,
|
||||
dcomplex *c, int *ldc);
|
||||
|
||||
int zherk_(char *uplo, char *trans, int *n, int *k, double *alpha,
|
||||
dcomplex *a, int *lda, double *beta, dcomplex *c, int *ldc);
|
||||
|
||||
int zhpmv_(char *uplo, int *n, dcomplex *alpha, dcomplex *ap, dcomplex *x,
|
||||
int *incx, dcomplex *beta, dcomplex *y, int *incy);
|
||||
|
||||
int zhpr_(char *uplo, int *n, double *alpha, dcomplex *x, int *incx,
|
||||
dcomplex *ap);
|
||||
|
||||
int zhpr2_(char *uplo, int *n, dcomplex *alpha, dcomplex *x, int *incx,
|
||||
dcomplex *y, int *incy, dcomplex *ap);
|
||||
|
||||
int zrotg_(dcomplex *ca, dcomplex *cb, double *c, dcomplex *s);
|
||||
|
||||
int zscal_(int *n, dcomplex *ca, dcomplex *cx, int *incx);
|
||||
|
||||
int zswap_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy);
|
||||
|
||||
int zsymm_(char *side, char *uplo, int *m, int *n, dcomplex *alpha,
|
||||
dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta,
|
||||
dcomplex *c, int *ldc);
|
||||
|
||||
int zsyr2k_(char *uplo, char *trans, int *n, int *k, dcomplex *alpha,
|
||||
dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta,
|
||||
dcomplex *c, int *ldc);
|
||||
|
||||
int zsyrk_(char *uplo, char *trans, int *n, int *k, dcomplex *alpha,
|
||||
dcomplex *a, int *lda, dcomplex *beta, dcomplex *c, int *ldc);
|
||||
|
||||
int ztbmv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
dcomplex *a, int *lda, dcomplex *x, int *incx);
|
||||
|
||||
int ztbsv_(char *uplo, char *trans, char *diag, int *n, int *k,
|
||||
dcomplex *a, int *lda, dcomplex *x, int *incx);
|
||||
|
||||
int ztpmv_(char *uplo, char *trans, char *diag, int *n, dcomplex *ap,
|
||||
dcomplex *x, int *incx);
|
||||
|
||||
int ztpsv_(char *uplo, char *trans, char *diag, int *n, dcomplex *ap,
|
||||
dcomplex *x, int *incx);
|
||||
|
||||
int ztrmm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b,
|
||||
int *ldb);
|
||||
|
||||
int ztrmv_(char *uplo, char *trans, char *diag, int *n, dcomplex *a,
|
||||
int *lda, dcomplex *x, int *incx);
|
||||
|
||||
int ztrsm_(char *side, char *uplo, char *transa, char *diag, int *m,
|
||||
int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b,
|
||||
int *ldb);
|
||||
|
||||
int ztrsv_(char *uplo, char *trans, char *diag, int *n, dcomplex *a,
|
||||
int *lda, dcomplex *x, int *incx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
57
liblinear-2.49/blas/daxpy.c
Normal file
57
liblinear-2.49/blas/daxpy.c
Normal file
@@ -0,0 +1,57 @@
|
||||
#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.
|
||||
modified 12/3/93, array(1) declarations changed to array(*) */
|
||||
|
||||
/* Dereference inputs */
|
||||
nn = *n;
|
||||
ssa = *sa;
|
||||
iincx = *incx;
|
||||
iincy = *incy;
|
||||
|
||||
if( nn > 0 && ssa != 0.0 )
|
||||
{
|
||||
if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */
|
||||
{
|
||||
m = nn-3;
|
||||
for (i = 0; i < m; i += 4)
|
||||
{
|
||||
sy[i] += ssa * sx[i];
|
||||
sy[i+1] += ssa * sx[i+1];
|
||||
sy[i+2] += ssa * sx[i+2];
|
||||
sy[i+3] += ssa * sx[i+3];
|
||||
}
|
||||
for ( ; i < nn; ++i) /* clean-up loop */
|
||||
sy[i] += ssa * sx[i];
|
||||
}
|
||||
else /* code for unequal increments or equal increments not equal to 1 */
|
||||
{
|
||||
ix = iincx >= 0 ? 0 : (1 - nn) * iincx;
|
||||
iy = iincy >= 0 ? 0 : (1 - nn) * iincy;
|
||||
for (i = 0; i < nn; i++)
|
||||
{
|
||||
sy[iy] += ssa * sx[ix];
|
||||
ix += iincx;
|
||||
iy += iincy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
} /* daxpy_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
58
liblinear-2.49/blas/ddot.c
Normal file
58
liblinear-2.49/blas/ddot.c
Normal file
@@ -0,0 +1,58 @@
|
||||
#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.
|
||||
modified 12/3/93, array(1) declarations changed to array(*) */
|
||||
|
||||
/* Dereference inputs */
|
||||
nn = *n;
|
||||
iincx = *incx;
|
||||
iincy = *incy;
|
||||
|
||||
stemp = 0.0;
|
||||
if (nn > 0)
|
||||
{
|
||||
if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */
|
||||
{
|
||||
m = nn-4;
|
||||
for (i = 0; i < m; i += 5)
|
||||
stemp += sx[i] * sy[i] + sx[i+1] * sy[i+1] + sx[i+2] * sy[i+2] +
|
||||
sx[i+3] * sy[i+3] + sx[i+4] * sy[i+4];
|
||||
|
||||
for ( ; i < nn; i++) /* clean-up loop */
|
||||
stemp += sx[i] * sy[i];
|
||||
}
|
||||
else /* code for unequal increments or equal increments not equal to 1 */
|
||||
{
|
||||
ix = 0;
|
||||
iy = 0;
|
||||
if (iincx < 0)
|
||||
ix = (1 - nn) * iincx;
|
||||
if (iincy < 0)
|
||||
iy = (1 - nn) * iincy;
|
||||
for (i = 0; i < nn; i++)
|
||||
{
|
||||
stemp += sx[ix] * sy[iy];
|
||||
ix += iincx;
|
||||
iy += iincy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return stemp;
|
||||
} /* ddot_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
70
liblinear-2.49/blas/dnrm2.c
Normal file
70
liblinear-2.49/blas/dnrm2.c
Normal file
@@ -0,0 +1,70 @@
|
||||
#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 := sqrt( x'*x )
|
||||
|
||||
-- This version written on 25-October-1982.
|
||||
Modified on 14-October-1993 to inline the call to SLASSQ.
|
||||
Sven Hammarling, Nag Ltd. */
|
||||
|
||||
/* Dereference inputs */
|
||||
nn = *n;
|
||||
iincx = *incx;
|
||||
|
||||
if( nn > 0 && iincx > 0 )
|
||||
{
|
||||
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
|
||||
auxiliary routine: CALL SLASSQ( N, X, INCX, SCALE, SSQ ) */
|
||||
|
||||
for (ix=(nn-1)*iincx; ix>=0; ix-=iincx)
|
||||
{
|
||||
if (x[ix] != 0.0)
|
||||
{
|
||||
absxi = fabs(x[ix]);
|
||||
if (scale < absxi)
|
||||
{
|
||||
temp = scale / absxi;
|
||||
ssq = ssq * (temp * temp) + 1.0;
|
||||
scale = absxi;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = absxi / scale;
|
||||
ssq += temp * temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
norm = scale * sqrt(ssq);
|
||||
}
|
||||
}
|
||||
else
|
||||
norm = 0.0;
|
||||
|
||||
return norm;
|
||||
|
||||
} /* dnrm2_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
52
liblinear-2.49/blas/dscal.c
Normal file
52
liblinear-2.49/blas/dscal.c
Normal file
@@ -0,0 +1,52 @@
|
||||
#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.
|
||||
modified 12/3/93, array(1) declarations changed to array(*) */
|
||||
|
||||
/* Dereference inputs */
|
||||
nn = *n;
|
||||
iincx = *incx;
|
||||
ssa = *sa;
|
||||
|
||||
if (nn > 0 && iincx > 0)
|
||||
{
|
||||
if (iincx == 1) /* code for increment equal to 1 */
|
||||
{
|
||||
m = nn-4;
|
||||
for (i = 0; i < m; i += 5)
|
||||
{
|
||||
sx[i] = ssa * sx[i];
|
||||
sx[i+1] = ssa * sx[i+1];
|
||||
sx[i+2] = ssa * sx[i+2];
|
||||
sx[i+3] = ssa * sx[i+3];
|
||||
sx[i+4] = ssa * sx[i+4];
|
||||
}
|
||||
for ( ; i < nn; ++i) /* clean-up loop */
|
||||
sx[i] = ssa * sx[i];
|
||||
}
|
||||
else /* code for increment not equal to 1 */
|
||||
{
|
||||
nincx = nn * iincx;
|
||||
for (i = 0; i < nincx; i += iincx)
|
||||
sx[i] = ssa * sx[i];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
} /* dscal_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user