summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortuxzz2020-06-02 18:55:23 +0800
committertuxzz2020-06-02 18:55:23 +0800
commit44130ae2740a201561a00f8602144954b6421cc5 (patch)
treecd741b2d1d0c8a397564a77c83dbc97123039719
downloadaur-blis-cblas.tar.gz
init commit
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD86
-rw-r--r--cblas.h588
-rw-r--r--cblas_f77.h394
-rw-r--r--cblas_mangling.h16
-rw-r--r--cblas_test.h190
6 files changed, 1306 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..842a11963c4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = blis-cblas
+ pkgdesc = BLAS-like Library Instantiation Software Framework (providing blas and cblas, with pthreads support, particularly recommended for AMD Zen CPUs)
+ pkgver = 0.7.0
+ pkgrel = 0
+ url = https://github.com/flame/blis
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = git
+ makedepends = make
+ makedepends = gcc
+ makedepends = python
+ provides = blas=3.9.0
+ provides = cblas=3.9.0
+ conflicts = blis
+ conflicts = blas
+ conflicts = cblas
+ options = staticlibs
+ options = !emptydirs
+ source = blis-cblas::git+https://github.com/flame/blis.git#commit=943a21def0bedc1732c0a2453afe7c90d7f62e95
+ source = cblas_f77.h
+ source = cblas_mangling.h
+ source = cblas_test.h
+ source = cblas.h
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+
+pkgname = blis-cblas
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0d0bf215f55
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,86 @@
+# Maintainer: tuxzz <dorazzsoft@gmail.com>
+
+pkgname=blis-cblas
+pkgver=0.7.0
+_blasver=3.9.0
+pkgrel=0
+pkgdesc="BLAS-like Library Instantiation Software Framework (providing blas and cblas, with pthreads support, particularly recommended for AMD Zen CPUs)"
+arch=('i686' 'x86_64')
+license=('custom')
+url="https://github.com/flame/blis"
+makedepends=('git' 'make' 'gcc' 'python')
+provides=('blis')
+conflicts=('blis' 'blas' 'cblas')
+provides=("blas=${_blasver}" "cblas=${_blasver}")
+source=(
+"$pkgname::git+https://github.com/flame/blis.git#commit=943a21def0bedc1732c0a2453afe7c90d7f62e95"
+"cblas_f77.h"
+"cblas_mangling.h"
+"cblas_test.h"
+"cblas.h"
+)
+sha1sums=(
+'SKIP'
+'SKIP'
+'SKIP'
+'SKIP'
+'SKIP'
+)
+options=('staticlibs' '!emptydirs')
+
+build() {
+ cd "${pkgname}"
+ unset CC CXX CFLAGS CXXFLAGS
+ export CC="gcc"
+ export CXX="g++"
+ export CFLAGS="-pipe -Ofast -fno-plt -ftree-vectorize -flto -falign-functions=32 -fno-semantic-interposition -fipa-pta -fdevirtualize-at-ltrans -floop-nest-optimize -floop-strip-mine -floop-interchange -fgraphite-identity"
+ export CXXFALGS=${CFLAGS}
+
+ export BLIS_JC_NT=1
+ export BLIS_PC_NT=1
+ export BLIS_IC_NT=1
+ export BLIS_JR_NT=1
+ export BLIS_IR_NT=1
+ export OMP_NUM_THREADS=1
+ export OPENBLAS_NUM_THREADS=1
+ export MKL_NUM_THREADS=1
+ export nt_use=1
+
+ # static build is necessary for some packages and programs (e. g. GAMESS)
+ ./configure --prefix=/usr --enable-static --enable-shared --enable-cblas --enable-threading=pthreads auto
+ make
+}
+
+check() {
+ cd "${pkgname}"
+
+ export BLIS_JC_NT=1
+ export BLIS_PC_NT=1
+ export BLIS_IC_NT=1
+ export BLIS_JR_NT=1
+ export BLIS_IR_NT=1
+ export OMP_NUM_THREADS=1
+ export OPENBLAS_NUM_THREADS=1
+ export MKL_NUM_THREADS=1
+ export nt_use=1
+ make check
+}
+
+package() {
+ cd "${pkgname}"
+
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
+ install -Dm644 ${srcdir}/cblas_{f77,mangling,test}.h "${pkgdir}/usr/include/"
+ install -Dm644 ${srcdir}/cblas.h "${pkgdir}/usr/include/"
+
+ cd ${pkgdir}/usr/lib
+ # BLAS
+ ln -sv libblis.so libblas.so
+ ln -sv libblis.so libblas.so.3
+ ln -sv libblis.so libblas.so.3.9.0
+ # CBLAS
+ ln -sv libblis.so libcblas.so
+ ln -sv libblis.so libcblas.so.3
+ ln -sv libblis.so libcblas.so.3.9.0
+}
diff --git a/cblas.h b/cblas.h
new file mode 100644
index 00000000000..9e937964edc
--- /dev/null
+++ b/cblas.h
@@ -0,0 +1,588 @@
+#ifndef CBLAS_H
+#define CBLAS_H
+#include <stddef.h>
+
+
+#ifdef __cplusplus
+extern "C" { /* Assume C declarations for C++ */
+#endif /* __cplusplus */
+
+/*
+ * Enumerated and derived types
+ */
+#ifdef WeirdNEC
+ #define CBLAS_INDEX long
+#else
+ #define CBLAS_INDEX int
+#endif
+
+typedef enum {CblasRowMajor=101, CblasColMajor=102} CBLAS_LAYOUT;
+typedef enum {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113} CBLAS_TRANSPOSE;
+typedef enum {CblasUpper=121, CblasLower=122} CBLAS_UPLO;
+typedef enum {CblasNonUnit=131, CblasUnit=132} CBLAS_DIAG;
+typedef enum {CblasLeft=141, CblasRight=142} CBLAS_SIDE;
+
+typedef CBLAS_LAYOUT CBLAS_ORDER; /* this for backward compatibility with CBLAS_ORDER */
+
+#include "cblas_mangling.h"
+
+/*
+ * ===========================================================================
+ * Prototypes for level 1 BLAS functions (complex are recast as routines)
+ * ===========================================================================
+ */
+
+double cblas_dcabs1(const void *z);
+float cblas_scabs1(const void *c);
+
+float cblas_sdsdot(const int N, const float alpha, const float *X,
+ const int incX, const float *Y, const int incY);
+double cblas_dsdot(const int N, const float *X, const int incX, const float *Y,
+ const int incY);
+float cblas_sdot(const int N, const float *X, const int incX,
+ const float *Y, const int incY);
+double cblas_ddot(const int N, const double *X, const int incX,
+ const double *Y, const int incY);
+
+/*
+ * Functions having prefixes Z and C only
+ */
+void cblas_cdotu_sub(const int N, const void *X, const int incX,
+ const void *Y, const int incY, void *dotu);
+void cblas_cdotc_sub(const int N, const void *X, const int incX,
+ const void *Y, const int incY, void *dotc);
+
+void cblas_zdotu_sub(const int N, const void *X, const int incX,
+ const void *Y, const int incY, void *dotu);
+void cblas_zdotc_sub(const int N, const void *X, const int incX,
+ const void *Y, const int incY, void *dotc);
+
+
+/*
+ * Functions having prefixes S D SC DZ
+ */
+float cblas_snrm2(const int N, const float *X, const int incX);
+float cblas_sasum(const int N, const float *X, const int incX);
+
+double cblas_dnrm2(const int N, const double *X, const int incX);
+double cblas_dasum(const int N, const double *X, const int incX);
+
+float cblas_scnrm2(const int N, const void *X, const int incX);
+float cblas_scasum(const int N, const void *X, const int incX);
+
+double cblas_dznrm2(const int N, const void *X, const int incX);
+double cblas_dzasum(const int N, const void *X, const int incX);
+
+
+/*
+ * Functions having standard 4 prefixes (S D C Z)
+ */
+CBLAS_INDEX cblas_isamax(const int N, const float *X, const int incX);
+CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX);
+CBLAS_INDEX cblas_icamax(const int N, const void *X, const int incX);
+CBLAS_INDEX cblas_izamax(const int N, const void *X, const int incX);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 1 BLAS routines
+ * ===========================================================================
+ */
+
+/*
+ * Routines with standard 4 prefixes (s, d, c, z)
+ */
+void cblas_sswap(const int N, float *X, const int incX,
+ float *Y, const int incY);
+void cblas_scopy(const int N, const float *X, const int incX,
+ float *Y, const int incY);
+void cblas_saxpy(const int N, const float alpha, const float *X,
+ const int incX, float *Y, const int incY);
+
+void cblas_dswap(const int N, double *X, const int incX,
+ double *Y, const int incY);
+void cblas_dcopy(const int N, const double *X, const int incX,
+ double *Y, const int incY);
+void cblas_daxpy(const int N, const double alpha, const double *X,
+ const int incX, double *Y, const int incY);
+
+void cblas_cswap(const int N, void *X, const int incX,
+ void *Y, const int incY);
+void cblas_ccopy(const int N, const void *X, const int incX,
+ void *Y, const int incY);
+void cblas_caxpy(const int N, const void *alpha, const void *X,
+ const int incX, void *Y, const int incY);
+
+void cblas_zswap(const int N, void *X, const int incX,
+ void *Y, const int incY);
+void cblas_zcopy(const int N, const void *X, const int incX,
+ void *Y, const int incY);
+void cblas_zaxpy(const int N, const void *alpha, const void *X,
+ const int incX, void *Y, const int incY);
+
+
+/*
+ * Routines with S and D prefix only
+ */
+void cblas_srotg(float *a, float *b, float *c, float *s);
+void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);
+void cblas_srot(const int N, float *X, const int incX,
+ float *Y, const int incY, const float c, const float s);
+void cblas_srotm(const int N, float *X, const int incX,
+ float *Y, const int incY, const float *P);
+
+void cblas_drotg(double *a, double *b, double *c, double *s);
+void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P);
+void cblas_drot(const int N, double *X, const int incX,
+ double *Y, const int incY, const double c, const double s);
+void cblas_drotm(const int N, double *X, const int incX,
+ double *Y, const int incY, const double *P);
+
+
+/*
+ * Routines with S D C Z CS and ZD prefixes
+ */
+void cblas_sscal(const int N, const float alpha, float *X, const int incX);
+void cblas_dscal(const int N, const double alpha, double *X, const int incX);
+void cblas_cscal(const int N, const void *alpha, void *X, const int incX);
+void cblas_zscal(const int N, const void *alpha, void *X, const int incX);
+void cblas_csscal(const int N, const float alpha, void *X, const int incX);
+void cblas_zdscal(const int N, const double alpha, void *X, const int incX);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 2 BLAS
+ * ===========================================================================
+ */
+
+/*
+ * Routines with standard 4 prefixes (S, D, C, Z)
+ */
+void cblas_sgemv(const CBLAS_LAYOUT layout,
+ const CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const float alpha, const float *A, const int lda,
+ const float *X, const int incX, const float beta,
+ float *Y, const int incY);
+void cblas_sgbmv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const int KL, const int KU, const float alpha,
+ const float *A, const int lda, const float *X,
+ const int incX, const float beta, float *Y, const int incY);
+void cblas_strmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const float *A, const int lda,
+ float *X, const int incX);
+void cblas_stbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const float *A, const int lda,
+ float *X, const int incX);
+void cblas_stpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const float *Ap, float *X, const int incX);
+void cblas_strsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const float *A, const int lda, float *X,
+ const int incX);
+void cblas_stbsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const float *A, const int lda,
+ float *X, const int incX);
+void cblas_stpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const float *Ap, float *X, const int incX);
+
+void cblas_dgemv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const double alpha, const double *A, const int lda,
+ const double *X, const int incX, const double beta,
+ double *Y, const int incY);
+void cblas_dgbmv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const int KL, const int KU, const double alpha,
+ const double *A, const int lda, const double *X,
+ const int incX, const double beta, double *Y, const int incY);
+void cblas_dtrmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const double *A, const int lda,
+ double *X, const int incX);
+void cblas_dtbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const double *A, const int lda,
+ double *X, const int incX);
+void cblas_dtpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const double *Ap, double *X, const int incX);
+void cblas_dtrsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const double *A, const int lda, double *X,
+ const int incX);
+void cblas_dtbsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const double *A, const int lda,
+ double *X, const int incX);
+void cblas_dtpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const double *Ap, double *X, const int incX);
+
+void cblas_cgemv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ const void *X, const int incX, const void *beta,
+ void *Y, const int incY);
+void cblas_cgbmv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const int KL, const int KU, const void *alpha,
+ const void *A, const int lda, const void *X,
+ const int incX, const void *beta, void *Y, const int incY);
+void cblas_ctrmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *A, const int lda,
+ void *X, const int incX);
+void cblas_ctbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const void *A, const int lda,
+ void *X, const int incX);
+void cblas_ctpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *Ap, void *X, const int incX);
+void cblas_ctrsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *A, const int lda, void *X,
+ const int incX);
+void cblas_ctbsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const void *A, const int lda,
+ void *X, const int incX);
+void cblas_ctpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *Ap, void *X, const int incX);
+
+void cblas_zgemv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ const void *X, const int incX, const void *beta,
+ void *Y, const int incY);
+void cblas_zgbmv(CBLAS_LAYOUT layout,
+ CBLAS_TRANSPOSE TransA, const int M, const int N,
+ const int KL, const int KU, const void *alpha,
+ const void *A, const int lda, const void *X,
+ const int incX, const void *beta, void *Y, const int incY);
+void cblas_ztrmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *A, const int lda,
+ void *X, const int incX);
+void cblas_ztbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const void *A, const int lda,
+ void *X, const int incX);
+void cblas_ztpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *Ap, void *X, const int incX);
+void cblas_ztrsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *A, const int lda, void *X,
+ const int incX);
+void cblas_ztbsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const int K, const void *A, const int lda,
+ void *X, const int incX);
+void cblas_ztpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag,
+ const int N, const void *Ap, void *X, const int incX);
+
+
+/*
+ * Routines with S and D prefixes only
+ */
+void cblas_ssymv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const float *A,
+ const int lda, const float *X, const int incX,
+ const float beta, float *Y, const int incY);
+void cblas_ssbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const int K, const float alpha, const float *A,
+ const int lda, const float *X, const int incX,
+ const float beta, float *Y, const int incY);
+void cblas_sspmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const float *Ap,
+ const float *X, const int incX,
+ const float beta, float *Y, const int incY);
+void cblas_sger(CBLAS_LAYOUT layout, const int M, const int N,
+ const float alpha, const float *X, const int incX,
+ const float *Y, const int incY, float *A, const int lda);
+void cblas_ssyr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const float *X,
+ const int incX, float *A, const int lda);
+void cblas_sspr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const float *X,
+ const int incX, float *Ap);
+void cblas_ssyr2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const float *X,
+ const int incX, const float *Y, const int incY, float *A,
+ const int lda);
+void cblas_sspr2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const float *X,
+ const int incX, const float *Y, const int incY, float *A);
+
+void cblas_dsymv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const double *A,
+ const int lda, const double *X, const int incX,
+ const double beta, double *Y, const int incY);
+void cblas_dsbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const int K, const double alpha, const double *A,
+ const int lda, const double *X, const int incX,
+ const double beta, double *Y, const int incY);
+void cblas_dspmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const double *Ap,
+ const double *X, const int incX,
+ const double beta, double *Y, const int incY);
+void cblas_dger(CBLAS_LAYOUT layout, const int M, const int N,
+ const double alpha, const double *X, const int incX,
+ const double *Y, const int incY, double *A, const int lda);
+void cblas_dsyr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const double *X,
+ const int incX, double *A, const int lda);
+void cblas_dspr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const double *X,
+ const int incX, double *Ap);
+void cblas_dsyr2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const double *X,
+ const int incX, const double *Y, const int incY, double *A,
+ const int lda);
+void cblas_dspr2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const double *X,
+ const int incX, const double *Y, const int incY, double *A);
+
+
+/*
+ * Routines with C and Z prefixes only
+ */
+void cblas_chemv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const void *alpha, const void *A,
+ const int lda, const void *X, const int incX,
+ const void *beta, void *Y, const int incY);
+void cblas_chbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const int K, const void *alpha, const void *A,
+ const int lda, const void *X, const int incX,
+ const void *beta, void *Y, const int incY);
+void cblas_chpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const void *alpha, const void *Ap,
+ const void *X, const int incX,
+ const void *beta, void *Y, const int incY);
+void cblas_cgeru(CBLAS_LAYOUT layout, const int M, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *A, const int lda);
+void cblas_cgerc(CBLAS_LAYOUT layout, const int M, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *A, const int lda);
+void cblas_cher(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const void *X, const int incX,
+ void *A, const int lda);
+void cblas_chpr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const float alpha, const void *X,
+ const int incX, void *A);
+void cblas_cher2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *A, const int lda);
+void cblas_chpr2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *Ap);
+
+void cblas_zhemv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const void *alpha, const void *A,
+ const int lda, const void *X, const int incX,
+ const void *beta, void *Y, const int incY);
+void cblas_zhbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const int K, const void *alpha, const void *A,
+ const int lda, const void *X, const int incX,
+ const void *beta, void *Y, const int incY);
+void cblas_zhpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const void *alpha, const void *Ap,
+ const void *X, const int incX,
+ const void *beta, void *Y, const int incY);
+void cblas_zgeru(CBLAS_LAYOUT layout, const int M, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *A, const int lda);
+void cblas_zgerc(CBLAS_LAYOUT layout, const int M, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *A, const int lda);
+void cblas_zher(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const void *X, const int incX,
+ void *A, const int lda);
+void cblas_zhpr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ const int N, const double alpha, const void *X,
+ const int incX, void *A);
+void cblas_zher2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *A, const int lda);
+void cblas_zhpr2(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const int N,
+ const void *alpha, const void *X, const int incX,
+ const void *Y, const int incY, void *Ap);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 3 BLAS
+ * ===========================================================================
+ */
+
+/*
+ * Routines with standard 4 prefixes (S, D, C, Z)
+ */
+void cblas_sgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
+ CBLAS_TRANSPOSE TransB, const int M, const int N,
+ const int K, const float alpha, const float *A,
+ const int lda, const float *B, const int ldb,
+ const float beta, float *C, const int ldc);
+void cblas_ssymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, const int M, const int N,
+ const float alpha, const float *A, const int lda,
+ const float *B, const int ldb, const float beta,
+ float *C, const int ldc);
+void cblas_ssyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const float alpha, const float *A, const int lda,
+ const float beta, float *C, const int ldc);
+void cblas_ssyr2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const float alpha, const float *A, const int lda,
+ const float *B, const int ldb, const float beta,
+ float *C, const int ldc);
+void cblas_strmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const float alpha, const float *A, const int lda,
+ float *B, const int ldb);
+void cblas_strsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const float alpha, const float *A, const int lda,
+ float *B, const int ldb);
+
+void cblas_dgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
+ CBLAS_TRANSPOSE TransB, const int M, const int N,
+ const int K, const double alpha, const double *A,
+ const int lda, const double *B, const int ldb,
+ const double beta, double *C, const int ldc);
+void cblas_dsymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, const int M, const int N,
+ const double alpha, const double *A, const int lda,
+ const double *B, const int ldb, const double beta,
+ double *C, const int ldc);
+void cblas_dsyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const double alpha, const double *A, const int lda,
+ const double beta, double *C, const int ldc);
+void cblas_dsyr2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const double alpha, const double *A, const int lda,
+ const double *B, const int ldb, const double beta,
+ double *C, const int ldc);
+void cblas_dtrmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const double alpha, const double *A, const int lda,
+ double *B, const int ldb);
+void cblas_dtrsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const double alpha, const double *A, const int lda,
+ double *B, const int ldb);
+
+void cblas_cgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
+ CBLAS_TRANSPOSE TransB, const int M, const int N,
+ const int K, const void *alpha, const void *A,
+ const int lda, const void *B, const int ldb,
+ const void *beta, void *C, const int ldc);
+void cblas_csymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const void *beta,
+ void *C, const int ldc);
+void cblas_csyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const void *alpha, const void *A, const int lda,
+ const void *beta, void *C, const int ldc);
+void cblas_csyr2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const void *beta,
+ void *C, const int ldc);
+void cblas_ctrmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ void *B, const int ldb);
+void cblas_ctrsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ void *B, const int ldb);
+
+void cblas_zgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
+ CBLAS_TRANSPOSE TransB, const int M, const int N,
+ const int K, const void *alpha, const void *A,
+ const int lda, const void *B, const int ldb,
+ const void *beta, void *C, const int ldc);
+void cblas_zsymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const void *beta,
+ void *C, const int ldc);
+void cblas_zsyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const void *alpha, const void *A, const int lda,
+ const void *beta, void *C, const int ldc);
+void cblas_zsyr2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const void *beta,
+ void *C, const int ldc);
+void cblas_ztrmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ void *B, const int ldb);
+void cblas_ztrsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA,
+ CBLAS_DIAG Diag, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ void *B, const int ldb);
+
+
+/*
+ * Routines with prefixes C and Z only
+ */
+void cblas_chemm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const void *beta,
+ void *C, const int ldc);
+void cblas_cherk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const float alpha, const void *A, const int lda,
+ const float beta, void *C, const int ldc);
+void cblas_cher2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const float beta,
+ void *C, const int ldc);
+
+void cblas_zhemm(CBLAS_LAYOUT layout, CBLAS_SIDE Side,
+ CBLAS_UPLO Uplo, const int M, const int N,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const void *beta,
+ void *C, const int ldc);
+void cblas_zherk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const double alpha, const void *A, const int lda,
+ const double beta, void *C, const int ldc);
+void cblas_zher2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
+ CBLAS_TRANSPOSE Trans, const int N, const int K,
+ const void *alpha, const void *A, const int lda,
+ const void *B, const int ldb, const double beta,
+ void *C, const int ldc);
+
+void cblas_xerbla(int p, const char *rout, const char *form, ...);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/cblas_f77.h b/cblas_f77.h
new file mode 100644
index 00000000000..36d4a711804
--- /dev/null
+++ b/cblas_f77.h
@@ -0,0 +1,394 @@
+/*
+ * cblas_f77.h
+ * Written by Keita Teranishi
+ *
+ * Updated by Jeff Horner
+ * Merged cblas_f77.h and cblas_fortran_header.h
+ */
+
+#ifndef CBLAS_F77_H
+#define CBLAS_F77_H
+
+#ifdef CRAY
+ #include <fortran.h>
+ #define F77_CHAR _fcd
+ #define C2F_CHAR(a) ( _cptofcd( (a), 1 ) )
+ #define C2F_STR(a, i) ( _cptofcd( (a), (i) ) )
+ #define F77_STRLEN(a) (_fcdlen)
+#endif
+
+#ifdef WeirdNEC
+ #define F77_INT long
+#endif
+
+#ifdef F77_CHAR
+ #define FCHAR F77_CHAR
+#else
+ #define FCHAR char *
+#endif
+
+#ifdef F77_INT
+ #define FINT const F77_INT *
+ #define FINT2 F77_INT *
+#else
+ #define FINT const int *
+ #define FINT2 int *
+#endif
+
+/*
+ * Level 1 BLAS
+ */
+
+#define F77_xerbla F77_GLOBAL(xerbla,XERBLA)
+#define F77_srotg F77_GLOBAL(srotg,SROTG)
+#define F77_srotmg F77_GLOBAL(srotmg,SROTMG)
+#define F77_srot F77_GLOBAL(srot,SROT)
+#define F77_srotm F77_GLOBAL(srotm,SROTM)
+#define F77_drotg F77_GLOBAL(drotg,DROTG)
+#define F77_drotmg F77_GLOBAL(drotmg,DROTMG)
+#define F77_drot F77_GLOBAL(drot,DROT)
+#define F77_drotm F77_GLOBAL(drotm,DROTM)
+#define F77_sswap F77_GLOBAL(sswap,SSWAP)
+#define F77_scopy F77_GLOBAL(scopy,SCOPY)
+#define F77_saxpy F77_GLOBAL(saxpy,SAXPY)
+#define F77_isamax_sub F77_GLOBAL(isamaxsub,ISAMAXSUB)
+#define F77_dswap F77_GLOBAL(dswap,DSWAP)
+#define F77_dcopy F77_GLOBAL(dcopy,DCOPY)
+#define F77_daxpy F77_GLOBAL(daxpy,DAXPY)
+#define F77_idamax_sub F77_GLOBAL(idamaxsub,IDAMAXSUB)
+#define F77_cswap F77_GLOBAL(cswap,CSWAP)
+#define F77_ccopy F77_GLOBAL(ccopy,CCOPY)
+#define F77_caxpy F77_GLOBAL(caxpy,CAXPY)
+#define F77_icamax_sub F77_GLOBAL(icamaxsub,ICAMAXSUB)
+#define F77_zswap F77_GLOBAL(zswap,ZSWAP)
+#define F77_zcopy F77_GLOBAL(zcopy,ZCOPY)
+#define F77_zaxpy F77_GLOBAL(zaxpy,ZAXPY)
+#define F77_izamax_sub F77_GLOBAL(izamaxsub,IZAMAXSUB)
+#define F77_sdot_sub F77_GLOBAL(sdotsub,SDOTSUB)
+#define F77_ddot_sub F77_GLOBAL(ddotsub,DDOTSUB)
+#define F77_dsdot_sub F77_GLOBAL(dsdotsub,DSDOTSUB)
+#define F77_sscal F77_GLOBAL(sscal,SSCAL)
+#define F77_dscal F77_GLOBAL(dscal,DSCAL)
+#define F77_cscal F77_GLOBAL(cscal,CSCAL)
+#define F77_zscal F77_GLOBAL(zscal,ZSCAL)
+#define F77_csscal F77_GLOBAL(csscal,CSSCAL)
+#define F77_zdscal F77_GLOBAL(zdscal,ZDSCAL)
+#define F77_cdotu_sub F77_GLOBAL(cdotusub,CDOTUSUB)
+#define F77_cdotc_sub F77_GLOBAL(cdotcsub,CDOTCSUB)
+#define F77_zdotu_sub F77_GLOBAL(zdotusub,ZDOTUSUB)
+#define F77_zdotc_sub F77_GLOBAL(zdotcsub,ZDOTCSUB)
+#define F77_snrm2_sub F77_GLOBAL(snrm2sub,SNRM2SUB)
+#define F77_sasum_sub F77_GLOBAL(sasumsub,SASUMSUB)
+#define F77_dnrm2_sub F77_GLOBAL(dnrm2sub,DNRM2SUB)
+#define F77_dasum_sub F77_GLOBAL(dasumsub,DASUMSUB)
+#define F77_scnrm2_sub F77_GLOBAL(scnrm2sub,SCNRM2SUB)
+#define F77_scasum_sub F77_GLOBAL(scasumsub,SCASUMSUB)
+#define F77_dznrm2_sub F77_GLOBAL(dznrm2sub,DZNRM2SUB)
+#define F77_dzasum_sub F77_GLOBAL(dzasumsub,DZASUMSUB)
+#define F77_sdsdot_sub F77_GLOBAL(sdsdotsub,SDSDOTSUB)
+/*
+ * Level 2 BLAS
+ */
+#define F77_ssymv F77_GLOBAL(ssymv,SSYMV)
+#define F77_ssbmv F77_GLOBAL(ssbmv,SSBMV)
+#define F77_sspmv F77_GLOBAL(sspmv,SSPMV)
+#define F77_sger F77_GLOBAL(sger,SGER)
+#define F77_ssyr F77_GLOBAL(ssyr,SSYR)
+#define F77_sspr F77_GLOBAL(sspr,SSPR)
+#define F77_ssyr2 F77_GLOBAL(ssyr2,SSYR2)
+#define F77_sspr2 F77_GLOBAL(sspr2,SSPR2)
+#define F77_dsymv F77_GLOBAL(dsymv,DSYMV)
+#define F77_dsbmv F77_GLOBAL(dsbmv,DSBMV)
+#define F77_dspmv F77_GLOBAL(dspmv,DSPMV)
+#define F77_dger F77_GLOBAL(dger,DGER)
+#define F77_dsyr F77_GLOBAL(dsyr,DSYR)
+#define F77_dspr F77_GLOBAL(dspr,DSPR)
+#define F77_dsyr2 F77_GLOBAL(dsyr2,DSYR2)
+#define F77_dspr2 F77_GLOBAL(dspr2,DSPR2)
+#define F77_chemv F77_GLOBAL(chemv,CHEMV)
+#define F77_chbmv F77_GLOBAL(chbmv,CHBMV)
+#define F77_chpmv F77_GLOBAL(chpmv,CHPMV)
+#define F77_cgeru F77_GLOBAL(cgeru,CGERU)
+#define F77_cgerc F77_GLOBAL(cgerc,CGERC)
+#define F77_cher F77_GLOBAL(cher,CHER)
+#define F77_chpr F77_GLOBAL(chpr,CHPR)
+#define F77_cher2 F77_GLOBAL(cher2,CHER2)
+#define F77_chpr2 F77_GLOBAL(chpr2,CHPR2)
+#define F77_zhemv F77_GLOBAL(zhemv,ZHEMV)
+#define F77_zhbmv F77_GLOBAL(zhbmv,ZHBMV)
+#define F77_zhpmv F77_GLOBAL(zhpmv,ZHPMV)
+#define F77_zgeru F77_GLOBAL(zgeru,ZGERU)
+#define F77_zgerc F77_GLOBAL(zgerc,ZGERC)
+#define F77_zher F77_GLOBAL(zher,ZHER)
+#define F77_zhpr F77_GLOBAL(zhpr,ZHPR)
+#define F77_zher2 F77_GLOBAL(zher2,ZHER2)
+#define F77_zhpr2 F77_GLOBAL(zhpr2,ZHPR2)
+#define F77_sgemv F77_GLOBAL(sgemv,SGEMV)
+#define F77_sgbmv F77_GLOBAL(sgbmv,SGBMV)
+#define F77_strmv F77_GLOBAL(strmv,STRMV)
+#define F77_stbmv F77_GLOBAL(stbmv,STBMV)
+#define F77_stpmv F77_GLOBAL(stpmv,STPMV)
+#define F77_strsv F77_GLOBAL(strsv,STRSV)
+#define F77_stbsv F77_GLOBAL(stbsv,STBSV)
+#define F77_stpsv F77_GLOBAL(stpsv,STPSV)
+#define F77_dgemv F77_GLOBAL(dgemv,DGEMV)
+#define F77_dgbmv F77_GLOBAL(dgbmv,DGBMV)
+#define F77_dtrmv F77_GLOBAL(dtrmv,DTRMV)
+#define F77_dtbmv F77_GLOBAL(dtbmv,DTBMV)
+#define F77_dtpmv F77_GLOBAL(dtpmv,DTPMV)
+#define F77_dtrsv F77_GLOBAL(dtrsv,DTRSV)
+#define F77_dtbsv F77_GLOBAL(dtbsv,DTBSV)
+#define F77_dtpsv F77_GLOBAL(dtpsv,DTPSV)
+#define F77_cgemv F77_GLOBAL(cgemv,CGEMV)
+#define F77_cgbmv F77_GLOBAL(cgbmv,CGBMV)
+#define F77_ctrmv F77_GLOBAL(ctrmv,CTRMV)
+#define F77_ctbmv F77_GLOBAL(ctbmv,CTBMV)
+#define F77_ctpmv F77_GLOBAL(ctpmv,CTPMV)
+#define F77_ctrsv F77_GLOBAL(ctrsv,CTRSV)
+#define F77_ctbsv F77_GLOBAL(ctbsv,CTBSV)
+#define F77_ctpsv F77_GLOBAL(ctpsv,CTPSV)
+#define F77_zgemv F77_GLOBAL(zgemv,ZGEMV)
+#define F77_zgbmv F77_GLOBAL(zgbmv,ZGBMV)
+#define F77_ztrmv F77_GLOBAL(ztrmv,ZTRMV)
+#define F77_ztbmv F77_GLOBAL(ztbmv,ZTBMV)
+#define F77_ztpmv F77_GLOBAL(ztpmv,ZTPMV)
+#define F77_ztrsv F77_GLOBAL(ztrsv,ZTRSV)
+#define F77_ztbsv F77_GLOBAL(ztbsv,ZTBSV)
+#define F77_ztpsv F77_GLOBAL(ztpsv,ZTPSV)
+/*
+ * Level 3 BLAS
+ */
+#define F77_chemm F77_GLOBAL(chemm,CHEMM)
+#define F77_cherk F77_GLOBAL(cherk,CHERK)
+#define F77_cher2k F77_GLOBAL(cher2k,CHER2K)
+#define F77_zhemm F77_GLOBAL(zhemm,ZHEMM)
+#define F77_zherk F77_GLOBAL(zherk,ZHERK)
+#define F77_zher2k F77_GLOBAL(zher2k,ZHER2K)
+#define F77_sgemm F77_GLOBAL(sgemm,SGEMM)
+#define F77_ssymm F77_GLOBAL(ssymm,SSYMM)
+#define F77_ssyrk F77_GLOBAL(ssyrk,SSYRK)
+#define F77_ssyr2k F77_GLOBAL(ssyr2k,SSYR2K)
+#define F77_strmm F77_GLOBAL(strmm,STRMM)
+#define F77_strsm F77_GLOBAL(strsm,STRSM)
+#define F77_dgemm F77_GLOBAL(dgemm,DGEMM)
+#define F77_dsymm F77_GLOBAL(dsymm,DSYMM)
+#define F77_dsyrk F77_GLOBAL(dsyrk,DSYRK)
+#define F77_dsyr2k F77_GLOBAL(dsyr2k,DSYR2K)
+#define F77_dtrmm F77_GLOBAL(dtrmm,DTRMM)
+#define F77_dtrsm F77_GLOBAL(dtrsm,DTRSM)
+#define F77_cgemm F77_GLOBAL(cgemm,CGEMM)
+#define F77_csymm F77_GLOBAL(csymm,CSYMM)
+#define F77_csyrk F77_GLOBAL(csyrk,CSYRK)
+#define F77_csyr2k F77_GLOBAL(csyr2k,CSYR2K)
+#define F77_ctrmm F77_GLOBAL(ctrmm,CTRMM)
+#define F77_ctrsm F77_GLOBAL(ctrsm,CTRSM)
+#define F77_zgemm F77_GLOBAL(zgemm,ZGEMM)
+#define F77_zsymm F77_GLOBAL(zsymm,ZSYMM)
+#define F77_zsyrk F77_GLOBAL(zsyrk,ZSYRK)
+#define F77_zsyr2k F77_GLOBAL(zsyr2k,ZSYR2K)
+#define F77_ztrmm F77_GLOBAL(ztrmm,ZTRMM)
+#define F77_ztrsm F77_GLOBAL(ztrsm,ZTRSM)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void F77_xerbla(FCHAR, void *);
+/*
+ * Level 1 Fortran Prototypes
+ */
+
+/* Single Precision */
+
+ void F77_srot(FINT, float *, FINT, float *, FINT, const float *, const float *);
+ void F77_srotg(float *,float *,float *,float *);
+ void F77_srotm( FINT, float *, FINT, float *, FINT, const float *);
+ void F77_srotmg(float *,float *,float *,const float *, float *);
+ void F77_sswap( FINT, float *, FINT, float *, FINT);
+ void F77_scopy( FINT, const float *, FINT, float *, FINT);
+ void F77_saxpy( FINT, const float *, const float *, FINT, float *, FINT);
+ void F77_sdot_sub(FINT, const float *, FINT, const float *, FINT, float *);
+ void F77_sdsdot_sub( FINT, const float *, const float *, FINT, const float *, FINT, float *);
+ void F77_sscal( FINT, const float *, float *, FINT);
+ void F77_snrm2_sub( FINT, const float *, FINT, float *);
+ void F77_sasum_sub( FINT, const float *, FINT, float *);
+ void F77_isamax_sub( FINT, const float * , FINT, FINT2);
+
+/* Double Precision */
+
+ void F77_drot(FINT, double *, FINT, double *, FINT, const double *, const double *);
+ void F77_drotg(double *,double *,double *,double *);
+ void F77_drotm( FINT, double *, FINT, double *, FINT, const double *);
+ void F77_drotmg(double *,double *,double *,const double *, double *);
+ void F77_dswap( FINT, double *, FINT, double *, FINT);
+ void F77_dcopy( FINT, const double *, FINT, double *, FINT);
+ void F77_daxpy( FINT, const double *, const double *, FINT, double *, FINT);
+ void F77_dswap( FINT, double *, FINT, double *, FINT);
+ void F77_dsdot_sub(FINT, const float *, FINT, const float *, FINT, double *);
+ void F77_ddot_sub( FINT, const double *, FINT, const double *, FINT, double *);
+ void F77_dscal( FINT, const double *, double *, FINT);
+ void F77_dnrm2_sub( FINT, const double *, FINT, double *);
+ void F77_dasum_sub( FINT, const double *, FINT, double *);
+ void F77_idamax_sub( FINT, const double * , FINT, FINT2);
+
+/* Single Complex Precision */
+
+ void F77_cswap( FINT, void *, FINT, void *, FINT);
+ void F77_ccopy( FINT, const void *, FINT, void *, FINT);
+ void F77_caxpy( FINT, const void *, const void *, FINT, void *, FINT);
+ void F77_cswap( FINT, void *, FINT, void *, FINT);
+ void F77_cdotc_sub( FINT, const void *, FINT, const void *, FINT, void *);
+ void F77_cdotu_sub( FINT, const void *, FINT, const void *, FINT, void *);
+ void F77_cscal( FINT, const void *, void *, FINT);
+ void F77_icamax_sub( FINT, const void *, FINT, FINT2);
+ void F77_csscal( FINT, const float *, void *, FINT);
+ void F77_scnrm2_sub( FINT, const void *, FINT, float *);
+ void F77_scasum_sub( FINT, const void *, FINT, float *);
+
+/* Double Complex Precision */
+
+ void F77_zswap( FINT, void *, FINT, void *, FINT);
+ void F77_zcopy( FINT, const void *, FINT, void *, FINT);
+ void F77_zaxpy( FINT, const void *, const void *, FINT, void *, FINT);
+ void F77_zswap( FINT, void *, FINT, void *, FINT);
+ void F77_zdotc_sub( FINT, const void *, FINT, const void *, FINT, void *);
+ void F77_zdotu_sub( FINT, const void *, FINT, const void *, FINT, void *);
+ void F77_zdscal( FINT, const double *, void *, FINT);
+ void F77_zscal( FINT, const void *, void *, FINT);
+ void F77_dznrm2_sub( FINT, const void *, FINT, double *);
+ void F77_dzasum_sub( FINT, const void *, FINT, double *);
+ void F77_izamax_sub( FINT, const void *, FINT, FINT2);
+
+/*
+ * Level 2 Fortran Prototypes
+ */
+
+/* Single Precision */
+
+ void F77_sgemv(FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_sgbmv(FCHAR, FINT, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_ssymv(FCHAR, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_ssbmv(FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_sspmv(FCHAR, FINT, const float *, const float *, const float *, FINT, const float *, float *, FINT);
+ void F77_strmv( FCHAR, FCHAR, FCHAR, FINT, const float *, FINT, float *, FINT);
+ void F77_stbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, FINT, float *, FINT);
+ void F77_strsv( FCHAR, FCHAR, FCHAR, FINT, const float *, FINT, float *, FINT);
+ void F77_stbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, FINT, float *, FINT);
+ void F77_stpmv( FCHAR, FCHAR, FCHAR, FINT, const float *, float *, FINT);
+ void F77_stpsv( FCHAR, FCHAR, FCHAR, FINT, const float *, float *, FINT);
+ void F77_sger( FINT, FINT, const float *, const float *, FINT, const float *, FINT, float *, FINT);
+ void F77_ssyr(FCHAR, FINT, const float *, const float *, FINT, float *, FINT);
+ void F77_sspr(FCHAR, FINT, const float *, const float *, FINT, float *);
+ void F77_sspr2(FCHAR, FINT, const float *, const float *, FINT, const float *, FINT, float *);
+ void F77_ssyr2(FCHAR, FINT, const float *, const float *, FINT, const float *, FINT, float *, FINT);
+
+/* Double Precision */
+
+ void F77_dgemv(FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dgbmv(FCHAR, FINT, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dsymv(FCHAR, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dsbmv(FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dspmv(FCHAR, FINT, const double *, const double *, const double *, FINT, const double *, double *, FINT);
+ void F77_dtrmv( FCHAR, FCHAR, FCHAR, FINT, const double *, FINT, double *, FINT);
+ void F77_dtbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, FINT, double *, FINT);
+ void F77_dtrsv( FCHAR, FCHAR, FCHAR, FINT, const double *, FINT, double *, FINT);
+ void F77_dtbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, FINT, double *, FINT);
+ void F77_dtpmv( FCHAR, FCHAR, FCHAR, FINT, const double *, double *, FINT);
+ void F77_dtpsv( FCHAR, FCHAR, FCHAR, FINT, const double *, double *, FINT);
+ void F77_dger( FINT, FINT, const double *, const double *, FINT, const double *, FINT, double *, FINT);
+ void F77_dsyr(FCHAR, FINT, const double *, const double *, FINT, double *, FINT);
+ void F77_dspr(FCHAR, FINT, const double *, const double *, FINT, double *);
+ void F77_dspr2(FCHAR, FINT, const double *, const double *, FINT, const double *, FINT, double *);
+ void F77_dsyr2(FCHAR, FINT, const double *, const double *, FINT, const double *, FINT, double *, FINT);
+
+/* Single Complex Precision */
+
+ void F77_cgemv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_cgbmv(FCHAR, FINT, FINT, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_chemv(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_chbmv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_chpmv(FCHAR, FINT, const void *, const void *, const void *, FINT, const void *, void *, FINT);
+ void F77_ctrmv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT);
+ void F77_ctbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT);
+ void F77_ctpmv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *, FINT);
+ void F77_ctrsv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT);
+ void F77_ctbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT);
+ void F77_ctpsv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *,FINT);
+ void F77_cgerc( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT);
+ void F77_cgeru( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT);
+ void F77_cher(FCHAR, FINT, const float *, const void *, FINT, void *, FINT);
+ void F77_cher2(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT);
+ void F77_chpr(FCHAR, FINT, const float *, const void *, FINT, void *);
+ void F77_chpr2(FCHAR, FINT, const float *, const void *, FINT, const void *, FINT, void *);
+
+/* Double Complex Precision */
+
+ void F77_zgemv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_zgbmv(FCHAR, FINT, FINT, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_zhemv(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_zhbmv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT);
+ void F77_zhpmv(FCHAR, FINT, const void *, const void *, const void *, FINT, const void *, void *, FINT);
+ void F77_ztrmv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT);
+ void F77_ztbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT);
+ void F77_ztpmv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *, FINT);
+ void F77_ztrsv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT);
+ void F77_ztbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT);
+ void F77_ztpsv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *,FINT);
+ void F77_zgerc( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT);
+ void F77_zgeru( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT);
+ void F77_zher(FCHAR, FINT, const double *, const void *, FINT, void *, FINT);
+ void F77_zher2(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT);
+ void F77_zhpr(FCHAR, FINT, const double *, const void *, FINT, void *);
+ void F77_zhpr2(FCHAR, FINT, const double *, const void *, FINT, const void *, FINT, void *);
+
+/*
+ * Level 3 Fortran Prototypes
+ */
+
+/* Single Precision */
+
+ void F77_sgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_ssymm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_ssyrk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT);
+ void F77_ssyr2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_strmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT);
+ void F77_strsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT);
+
+/* Double Precision */
+
+ void F77_dgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dsymm(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dsyrk(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, double *, FINT);
+ void F77_dsyr2k(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_dtrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT);
+ void F77_dtrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT);
+
+/* Single Complex Precision */
+
+ void F77_cgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_csymm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_chemm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_csyrk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT);
+ void F77_cherk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT);
+ void F77_csyr2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_cher2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT);
+ void F77_ctrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT);
+ void F77_ctrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT);
+
+/* Double Complex Precision */
+
+ void F77_zgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_zsymm(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_zhemm(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_zsyrk(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, double *, FINT);
+ void F77_zherk(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, double *, FINT);
+ void F77_zsyr2k(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_zher2k(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT);
+ void F77_ztrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT);
+ void F77_ztrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CBLAS_F77_H */
diff --git a/cblas_mangling.h b/cblas_mangling.h
new file mode 100644
index 00000000000..d833979d294
--- /dev/null
+++ b/cblas_mangling.h
@@ -0,0 +1,16 @@
+#ifndef F77_HEADER_INCLUDED
+#define F77_HEADER_INCLUDED
+
+/* Mangling for Fortran global symbols without underscores. */
+#define F77_GLOBAL(name,NAME) name##_
+
+/* Mangling for Fortran global symbols with underscores. */
+#define F77_GLOBAL_(name,NAME) name##_
+
+/* Mangling for Fortran module symbols without underscores. */
+#define F77_MODULE(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name
+
+/* Mangling for Fortran module symbols with underscores. */
+#define F77_MODULE_(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name
+
+#endif
diff --git a/cblas_test.h b/cblas_test.h
new file mode 100644
index 00000000000..f8174ba43c9
--- /dev/null
+++ b/cblas_test.h
@@ -0,0 +1,190 @@
+/*
+ * cblas_test.h
+ * Written by Keita Teranishi
+ */
+#ifndef CBLAS_TEST_H
+#define CBLAS_TEST_H
+#include "cblas.h"
+#include "cblas_mangling.h"
+
+#define TRUE 1
+#define PASSED 1
+#define TEST_ROW_MJR 1
+
+#define FALSE 0
+#define FAILED 0
+#define TEST_COL_MJR 0
+
+#define INVALID -1
+#define UNDEFINED -1
+
+typedef struct { float real; float imag; } CBLAS_TEST_COMPLEX;
+typedef struct { double real; double imag; } CBLAS_TEST_ZOMPLEX;
+
+#define F77_xerbla F77_GLOBAL(xerbla,XERBLA)
+/*
+ * Level 1 BLAS
+ */
+#define F77_srotg F77_GLOBAL(srotgtest,SROTGTEST)
+#define F77_srotmg F77_GLOBAL(srotmgtest,SROTMGTEST)
+#define F77_srot F77_GLOBAL(srottest,SROTTEST)
+#define F77_srotm F77_GLOBAL(srotmtest,SROTMTEST)
+#define F77_drotg F77_GLOBAL(drotgtest,DROTGTEST)
+#define F77_drotmg F77_GLOBAL(drotmgtest,DROTMGTEST)
+#define F77_drot F77_GLOBAL(drottest,DROTTEST)
+#define F77_drotm F77_GLOBAL(drotmtest,DROTMTEST)
+#define F77_sswap F77_GLOBAL(sswaptest,SSWAPTEST)
+#define F77_scopy F77_GLOBAL(scopytest,SCOPYTEST)
+#define F77_saxpy F77_GLOBAL(saxpytest,SAXPYTEST)
+#define F77_isamax F77_GLOBAL(isamaxtest,ISAMAXTEST)
+#define F77_dswap F77_GLOBAL(dswaptest,DSWAPTEST)
+#define F77_dcopy F77_GLOBAL(dcopytest,DCOPYTEST)
+#define F77_daxpy F77_GLOBAL(daxpytest,DAXPYTEST)
+#define F77_idamax F77_GLOBAL(idamaxtest,IDAMAXTEST)
+#define F77_cswap F77_GLOBAL(cswaptest,CSWAPTEST)
+#define F77_ccopy F77_GLOBAL(ccopytest,CCOPYTEST)
+#define F77_caxpy F77_GLOBAL(caxpytest,CAXPYTEST)
+#define F77_icamax F77_GLOBAL(icamaxtest,ICAMAXTEST)
+#define F77_zswap F77_GLOBAL(zswaptest,ZSWAPTEST)
+#define F77_zcopy F77_GLOBAL(zcopytest,ZCOPYTEST)
+#define F77_zaxpy F77_GLOBAL(zaxpytest,ZAXPYTEST)
+#define F77_izamax F77_GLOBAL(izamaxtest,IZAMAXTEST)
+#define F77_sdot F77_GLOBAL(sdottest,SDOTTEST)
+#define F77_ddot F77_GLOBAL(ddottest,DDOTTEST)
+#define F77_dsdot F77_GLOBAL(dsdottest,DSDOTTEST)
+#define F77_sscal F77_GLOBAL(sscaltest,SSCALTEST)
+#define F77_dscal F77_GLOBAL(dscaltest,DSCALTEST)
+#define F77_cscal F77_GLOBAL(cscaltest,CSCALTEST)
+#define F77_zscal F77_GLOBAL(zscaltest,ZSCALTEST)
+#define F77_csscal F77_GLOBAL(csscaltest,CSSCALTEST)
+#define F77_zdscal F77_GLOBAL(zdscaltest,ZDSCALTEST)
+#define F77_cdotu F77_GLOBAL(cdotutest,CDOTUTEST)
+#define F77_cdotc F77_GLOBAL(cdotctest,CDOTCTEST)
+#define F77_zdotu F77_GLOBAL(zdotutest,ZDOTUTEST)
+#define F77_zdotc F77_GLOBAL(zdotctest,ZDOTCTEST)
+#define F77_snrm2 F77_GLOBAL(snrm2test,SNRM2TEST)
+#define F77_sasum F77_GLOBAL(sasumtest,SASUMTEST)
+#define F77_dnrm2 F77_GLOBAL(dnrm2test,DNRM2TEST)
+#define F77_dasum F77_GLOBAL(dasumtest,DASUMTEST)
+#define F77_scnrm2 F77_GLOBAL(scnrm2test,SCNRM2TEST)
+#define F77_scasum F77_GLOBAL(scasumtest,SCASUMTEST)
+#define F77_dznrm2 F77_GLOBAL(dznrm2test,DZNRM2TEST)
+#define F77_dzasum F77_GLOBAL(dzasumtest,DZASUMTEST)
+#define F77_sdsdot F77_GLOBAL(sdsdottest, SDSDOTTEST)
+/*
+ * Level 2 BLAS
+ */
+#define F77_s2chke F77_GLOBAL(cs2chke,CS2CHKE)
+#define F77_d2chke F77_GLOBAL(cd2chke,CD2CHKE)
+#define F77_c2chke F77_GLOBAL(cc2chke,CC2CHKE)
+#define F77_z2chke F77_GLOBAL(cz2chke,CZ2CHKE)
+#define F77_ssymv F77_GLOBAL(cssymv,CSSYMV)
+#define F77_ssbmv F77_GLOBAL(cssbmv,CSSBMV)
+#define F77_sspmv F77_GLOBAL(csspmv,CSSPMV)
+#define F77_sger F77_GLOBAL(csger,CSGER)
+#define F77_ssyr F77_GLOBAL(cssyr,CSSYR)
+#define F77_sspr F77_GLOBAL(csspr,CSSPR)
+#define F77_ssyr2 F77_GLOBAL(cssyr2,CSSYR2)
+#define F77_sspr2 F77_GLOBAL(csspr2,CSSPR2)
+#define F77_dsymv F77_GLOBAL(cdsymv,CDSYMV)
+#define F77_dsbmv F77_GLOBAL(cdsbmv,CDSBMV)
+#define F77_dspmv F77_GLOBAL(cdspmv,CDSPMV)
+#define F77_dger F77_GLOBAL(cdger,CDGER)
+#define F77_dsyr F77_GLOBAL(cdsyr,CDSYR)
+#define F77_dspr F77_GLOBAL(cdspr,CDSPR)
+#define F77_dsyr2 F77_GLOBAL(cdsyr2,CDSYR2)
+#define F77_dspr2 F77_GLOBAL(cdspr2,CDSPR2)
+#define F77_chemv F77_GLOBAL(cchemv,CCHEMV)
+#define F77_chbmv F77_GLOBAL(cchbmv,CCHBMV)
+#define F77_chpmv F77_GLOBAL(cchpmv,CCHPMV)
+#define F77_cgeru F77_GLOBAL(ccgeru,CCGERU)
+#define F77_cgerc F77_GLOBAL(ccgerc,CCGERC)
+#define F77_cher F77_GLOBAL(ccher,CCHER)
+#define F77_chpr F77_GLOBAL(cchpr,CCHPR)
+#define F77_cher2 F77_GLOBAL(ccher2,CCHER2)
+#define F77_chpr2 F77_GLOBAL(cchpr2,CCHPR2)
+#define F77_zhemv F77_GLOBAL(czhemv,CZHEMV)
+#define F77_zhbmv F77_GLOBAL(czhbmv,CZHBMV)
+#define F77_zhpmv F77_GLOBAL(czhpmv,CZHPMV)
+#define F77_zgeru F77_GLOBAL(czgeru,CZGERU)
+#define F77_zgerc F77_GLOBAL(czgerc,CZGERC)
+#define F77_zher F77_GLOBAL(czher,CZHER)
+#define F77_zhpr F77_GLOBAL(czhpr,CZHPR)
+#define F77_zher2 F77_GLOBAL(czher2,CZHER2)
+#define F77_zhpr2 F77_GLOBAL(czhpr2,CZHPR2)
+#define F77_sgemv F77_GLOBAL(csgemv,CSGEMV)
+#define F77_sgbmv F77_GLOBAL(csgbmv,CSGBMV)
+#define F77_strmv F77_GLOBAL(cstrmv,CSTRMV)
+#define F77_stbmv F77_GLOBAL(cstbmv,CSTBMV)
+#define F77_stpmv F77_GLOBAL(cstpmv,CSTPMV)
+#define F77_strsv F77_GLOBAL(cstrsv,CSTRSV)
+#define F77_stbsv F77_GLOBAL(cstbsv,CSTBSV)
+#define F77_stpsv F77_GLOBAL(cstpsv,CSTPSV)
+#define F77_dgemv F77_GLOBAL(cdgemv,CDGEMV)
+#define F77_dgbmv F77_GLOBAL(cdgbmv,CDGBMV)
+#define F77_dtrmv F77_GLOBAL(cdtrmv,CDTRMV)
+#define F77_dtbmv F77_GLOBAL(cdtbmv,CDTBMV)
+#define F77_dtpmv F77_GLOBAL(cdtpmv,CDTPMV)
+#define F77_dtrsv F77_GLOBAL(cdtrsv,CDTRSV)
+#define F77_dtbsv F77_GLOBAL(cdtbsv,CDTBSV)
+#define F77_dtpsv F77_GLOBAL(cdtpsv,CDTPSV)
+#define F77_cgemv F77_GLOBAL(ccgemv,CCGEMV)
+#define F77_cgbmv F77_GLOBAL(ccgbmv,CCGBMV)
+#define F77_ctrmv F77_GLOBAL(cctrmv,CCTRMV)
+#define F77_ctbmv F77_GLOBAL(cctbmv,CCTBMV)
+#define F77_ctpmv F77_GLOBAL(cctpmv,CCTPMV)
+#define F77_ctrsv F77_GLOBAL(cctrsv,CCTRSV)
+#define F77_ctbsv F77_GLOBAL(cctbsv,CCTBSV)
+#define F77_ctpsv F77_GLOBAL(cctpsv,CCTPSV)
+#define F77_zgemv F77_GLOBAL(czgemv,CZGEMV)
+#define F77_zgbmv F77_GLOBAL(czgbmv,CZGBMV)
+#define F77_ztrmv F77_GLOBAL(cztrmv,CZTRMV)
+#define F77_ztbmv F77_GLOBAL(cztbmv,CZTBMV)
+#define F77_ztpmv F77_GLOBAL(cztpmv,CZTPMV)
+#define F77_ztrsv F77_GLOBAL(cztrsv,CZTRSV)
+#define F77_ztbsv F77_GLOBAL(cztbsv,CZTBSV)
+#define F77_ztpsv F77_GLOBAL(cztpsv,CZTPSV)
+/*
+ * Level 3 BLAS
+ */
+#define F77_s3chke F77_GLOBAL(cs3chke,CS3CHKE)
+#define F77_d3chke F77_GLOBAL(cd3chke,CD3CHKE)
+#define F77_c3chke F77_GLOBAL(cc3chke,CC3CHKE)
+#define F77_z3chke F77_GLOBAL(cz3chke,CZ3CHKE)
+#define F77_chemm F77_GLOBAL(cchemm,CCHEMM)
+#define F77_cherk F77_GLOBAL(ccherk,CCHERK)
+#define F77_cher2k F77_GLOBAL(ccher2k,CCHER2K)
+#define F77_zhemm F77_GLOBAL(czhemm,CZHEMM)
+#define F77_zherk F77_GLOBAL(czherk,CZHERK)
+#define F77_zher2k F77_GLOBAL(czher2k,CZHER2K)
+#define F77_sgemm F77_GLOBAL(csgemm,CSGEMM)
+#define F77_ssymm F77_GLOBAL(cssymm,CSSYMM)
+#define F77_ssyrk F77_GLOBAL(cssyrk,CSSYRK)
+#define F77_ssyr2k F77_GLOBAL(cssyr2k,CSSYR2K)
+#define F77_strmm F77_GLOBAL(cstrmm,CSTRMM)
+#define F77_strsm F77_GLOBAL(cstrsm,CSTRSM)
+#define F77_dgemm F77_GLOBAL(cdgemm,CDGEMM)
+#define F77_dsymm F77_GLOBAL(cdsymm,CDSYMM)
+#define F77_dsyrk F77_GLOBAL(cdsyrk,CDSYRK)
+#define F77_dsyr2k F77_GLOBAL(cdsyr2k,CDSYR2K)
+#define F77_dtrmm F77_GLOBAL(cdtrmm,CDTRMM)
+#define F77_dtrsm F77_GLOBAL(cdtrsm,CDTRSM)
+#define F77_cgemm F77_GLOBAL(ccgemm,CCGEMM)
+#define F77_csymm F77_GLOBAL(ccsymm,CCSYMM)
+#define F77_csyrk F77_GLOBAL(ccsyrk,CCSYRK)
+#define F77_csyr2k F77_GLOBAL(ccsyr2k,CCSYR2K)
+#define F77_ctrmm F77_GLOBAL(cctrmm,CCTRMM)
+#define F77_ctrsm F77_GLOBAL(cctrsm,CCTRSM)
+#define F77_zgemm F77_GLOBAL(czgemm,CZGEMM)
+#define F77_zsymm F77_GLOBAL(czsymm,CZSYMM)
+#define F77_zsyrk F77_GLOBAL(czsyrk,CZSYRK)
+#define F77_zsyr2k F77_GLOBAL(czsyr2k,CZSYR2K)
+#define F77_ztrmm F77_GLOBAL(cztrmm,CZTRMM)
+#define F77_ztrsm F77_GLOBAL(cztrsm, CZTRSM)
+
+void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans);
+void get_uplo_type(char *type, CBLAS_UPLO *uplo);
+void get_diag_type(char *type, CBLAS_DIAG *diag);
+void get_side_type(char *type, CBLAS_SIDE *side);
+
+#endif /* CBLAS_TEST_H */