*** empty log message ***
This commit is contained in:
parent
40469916fa
commit
d8563301d4
@ -29,9 +29,10 @@ return s;
|
|||||||
|
|
||||||
std::istream & operator>>(std::istream &s, bitvector &x)
|
std::istream & operator>>(std::istream &s, bitvector &x)
|
||||||
{
|
{
|
||||||
bool a;
|
std::string str;
|
||||||
x.copyonwrite();
|
s >> str;
|
||||||
for(unsigned int i=0; i<x.size(); ++i) {s >>a; x.assign(i,a);}
|
x.resize(str.size());
|
||||||
|
for(unsigned int i=0; i<x.size(); ++i) {x.assign(i,str[i]!='0');}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
42
configure.ac
42
configure.ac
@ -17,11 +17,39 @@ AC_PROG_CC
|
|||||||
#AC_PROG_RANLIB obsoleted by libtool
|
#AC_PROG_RANLIB obsoleted by libtool
|
||||||
AC_LANG(C++)
|
AC_LANG(C++)
|
||||||
|
|
||||||
|
# Check for Intel MKL first
|
||||||
|
#user has to e.g. setenv LDFLAGS "-L/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/"
|
||||||
|
#and setenv CXXFLAGS "-I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/"
|
||||||
|
MKLLIB=""
|
||||||
|
mkl_present=1
|
||||||
|
AC_CHECK_LIB([mkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread], [dgemm_], [
|
||||||
|
echo "MKL LIBRARY FOUND"
|
||||||
|
] , [
|
||||||
|
mkl_present=0
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CHECK_HEADER(mkl_cblas.h, [echo "MKL INCLUDE FOUND"], [mkl_present=0])
|
||||||
|
|
||||||
|
if test $mkl_present == 1
|
||||||
|
then
|
||||||
|
MKLLIB="-Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread"
|
||||||
|
AC_SUBST([MKLLIB])
|
||||||
|
CLAPACKOPT=-DNONCLAPACK
|
||||||
|
AC_SUBST([CLAPACKOPT])
|
||||||
|
MKLOPT="-DHAS_MKL"
|
||||||
|
AC_SUBST([MKLOPT])
|
||||||
|
else
|
||||||
|
echo "MKL LIBRARY OR HEADER NOT FOUND, will try ATLAS next!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Checks for mandatory libraries.
|
# Checks for mandatory libraries.
|
||||||
ATLASLIB=""
|
ATLASLIB=""
|
||||||
|
|
||||||
|
if test $mkl_present == 0
|
||||||
|
then
|
||||||
AC_CHECK_LIB([atlas], [ATL_zgemv],ATLASLIB="-lblas -latlas", [
|
AC_CHECK_LIB([atlas], [ATL_zgemv],ATLASLIB="-lblas -latlas", [
|
||||||
echo "ATLAS not found, I hope you are using some other (more) efficient BLAS!"
|
echo "ATLAS not found, I hope you are using some other efficient BLAS!"
|
||||||
])
|
])
|
||||||
AC_SUBST([ATLASLIB])
|
AC_SUBST([ATLASLIB])
|
||||||
|
|
||||||
@ -30,7 +58,7 @@ AC_CHECK_LIB([blas], [dgemm_],BLASLIB="-lblas", [
|
|||||||
exit
|
exit
|
||||||
],[$ATLASLIB])
|
],[$ATLASLIB])
|
||||||
AC_SUBST([BLASLIB])
|
AC_SUBST([BLASLIB])
|
||||||
|
fi
|
||||||
|
|
||||||
MATPTROPT=""
|
MATPTROPT=""
|
||||||
AC_ARG_ENABLE([matptr],[ --enable-matptr switch to double** matrix representation (CUDA incompatible) [[default=no]]],
|
AC_ARG_ENABLE([matptr],[ --enable-matptr switch to double** matrix representation (CUDA incompatible) [[default=no]]],
|
||||||
@ -43,6 +71,11 @@ AC_ARG_ENABLE([matptr],[ --enable-matptr switch to double** matrix representa
|
|||||||
|
|
||||||
|
|
||||||
#cblas and clapack available?
|
#cblas and clapack available?
|
||||||
|
CBLASLIB=""
|
||||||
|
CBLASOPT=""
|
||||||
|
|
||||||
|
if test $mkl_present == 0
|
||||||
|
then
|
||||||
AC_CHECK_LIB([cblas], [cblas_ddot], [CBLASLIB="-lcblas"], [CBLASOPT=-DNONCBLAS],[$ATLASLIB])
|
AC_CHECK_LIB([cblas], [cblas_ddot], [CBLASLIB="-lcblas"], [CBLASOPT=-DNONCBLAS],[$ATLASLIB])
|
||||||
AC_CHECK_HEADER([cblas.h],,[CBLASOPT=-DNONCBLAS CBLASLIB=""], AC_INCLUDES_DEFAULT)
|
AC_CHECK_HEADER([cblas.h],,[CBLASOPT=-DNONCBLAS CBLASLIB=""], AC_INCLUDES_DEFAULT)
|
||||||
AC_SUBST([CBLASLIB])
|
AC_SUBST([CBLASLIB])
|
||||||
@ -59,6 +92,8 @@ AC_CHECK_LIB([lapack], [clapack_dgesv], , [CLAPACKOPT=-DNONCLAPACK],[$CBLASLIB $
|
|||||||
AC_CHECK_HEADER([clapack.h],,[CLAPACKOPT=-DNONCLAPACK], AC_INCLUDES_DEFAULT)
|
AC_CHECK_HEADER([clapack.h],,[CLAPACKOPT=-DNONCLAPACK], AC_INCLUDES_DEFAULT)
|
||||||
AC_SUBST([CLAPACKOPT])
|
AC_SUBST([CLAPACKOPT])
|
||||||
|
|
||||||
|
fi
|
||||||
|
#MKL end
|
||||||
|
|
||||||
#CUDA available? link with cublas and avoid cblas and clapack then...
|
#CUDA available? link with cublas and avoid cblas and clapack then...
|
||||||
AC_CHECK_LIB([cublas], [cublasInit], [MATPTROPT="" NVCC=nvcc NVCCFLAGS="-O -arch sm_20" CUDALIBS=-lcublas CUDAOPT=-DCUDALA CBLASOPT=-DNONCBLAS CLAPACKOPT=-DNONCLAPACK CBLASLIB=""], [CUDALIB="" CUDAOPT=""])
|
AC_CHECK_LIB([cublas], [cublasInit], [MATPTROPT="" NVCC=nvcc NVCCFLAGS="-O -arch sm_20" CUDALIBS=-lcublas CUDAOPT=-DCUDALA CBLASOPT=-DNONCBLAS CLAPACKOPT=-DNONCLAPACK CBLASLIB=""], [CUDALIB="" CUDAOPT=""])
|
||||||
@ -138,7 +173,8 @@ echo "**************************************************************************
|
|||||||
echo "The LA library has now been configured. You may run make; make check; make install"
|
echo "The LA library has now been configured. You may run make; make check; make install"
|
||||||
echo "Please make sure that the generated Makefile employs a proper version of optimized"
|
echo "Please make sure that the generated Makefile employs a proper version of optimized"
|
||||||
echo "BLAS/LAPACK library. If not, re-run configure with CXXFLAGS and LDFLAGS options "
|
echo "BLAS/LAPACK library. If not, re-run configure with CXXFLAGS and LDFLAGS options "
|
||||||
echo "set to '-I path' and '-L path' for your preferred BLAS/LAPACK library version. "
|
echo "set to '-I/path' and '-L/path' for your preferred BLAS/LAPACK library version. "
|
||||||
|
echo "Either use export or specify these options on the command line ./configure ..... "
|
||||||
echo "In addition, similarly you might set include and link paths for Nvidia CUBLAS. "
|
echo "In addition, similarly you might set include and link paths for Nvidia CUBLAS. "
|
||||||
echo "Use ./configure --disable-optimize CXXFLAGS='' LDFLAGS='' for a fast compile. "
|
echo "Use ./configure --disable-optimize CXXFLAGS='' LDFLAGS='' for a fast compile. "
|
||||||
echo "Use --enable-fotran64int to link with BLAS and LAPACK using 64-bit integers. "
|
echo "Use --enable-fotran64int to link with BLAS and LAPACK using 64-bit integers. "
|
||||||
|
11
davidson.h
11
davidson.h
@ -34,6 +34,7 @@ namespace LA {
|
|||||||
//Note that for efficiency in a direct CI case the diagonalof() should cache its result
|
//Note that for efficiency in a direct CI case the diagonalof() should cache its result
|
||||||
|
|
||||||
|
|
||||||
|
//@@@ for large krylov spaces >200 it can occur 'convergence problem in sygv/syev in diagonalize()'
|
||||||
//@@@options: left eigenvectors by matrix transpose, overridesymmetric (for nrmat)
|
//@@@options: left eigenvectors by matrix transpose, overridesymmetric (for nrmat)
|
||||||
//@@@small matrix gdiagonalize - shift complex roots up (option to gdiagonalize?)
|
//@@@small matrix gdiagonalize - shift complex roots up (option to gdiagonalize?)
|
||||||
//@@@test gdiagonalize whether it sorts the roots and what for complex ones
|
//@@@test gdiagonalize whether it sorts the roots and what for complex ones
|
||||||
@ -73,7 +74,7 @@ else
|
|||||||
|
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
if(maxkrylov<maxit) maxit=maxkrylov;
|
//NO, we will restart, maxit can be bigger if(maxkrylov<maxit) maxit=maxkrylov;
|
||||||
if(nroots>=maxkrylov) nroots =maxkrylov-1;
|
if(nroots>=maxkrylov) nroots =maxkrylov-1;
|
||||||
int nroot=0;
|
int nroot=0;
|
||||||
int oldnroot;
|
int oldnroot;
|
||||||
@ -139,7 +140,9 @@ if(it>0) //if this is the first iteration just need to diagonalise the matrix
|
|||||||
smallV=smallH;
|
smallV=smallH;
|
||||||
NRMat<T> smallSwork=smallS;
|
NRMat<T> smallSwork=smallS;
|
||||||
if(bigmat.issymmetric())
|
if(bigmat.issymmetric())
|
||||||
|
{
|
||||||
diagonalize(smallV,r,1,1,krylovsize+1,&smallSwork,1); //for symmetric matrix they have already been sorted to ascending order in lapack
|
diagonalize(smallV,r,1,1,krylovsize+1,&smallSwork,1); //for symmetric matrix they have already been sorted to ascending order in lapack
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NRVec<T> ri(krylovsize+1),beta(krylovsize+1);
|
NRVec<T> ri(krylovsize+1),beta(krylovsize+1);
|
||||||
@ -160,7 +163,7 @@ for(int iroot=0; iroot<=std::min(krylovsize,nroots-1); ++iroot)
|
|||||||
if(test>eps) nroot=std::min(nroot,iroot);
|
if(test>eps) nroot=std::min(nroot,iroot);
|
||||||
if(verbose && iroot<=std::max(oldnroot,nroot))
|
if(verbose && iroot<=std::max(oldnroot,nroot))
|
||||||
{
|
{
|
||||||
std::cout <<"Davidson: iter="<<it <<" dim="<<krylovsize<<" root="<<iroot<<" energy="<<r[iroot]<<"\n";
|
std::cout <<"Davidson: iter="<<it <<" dim="<<krylovsize<<" root="<<iroot<<" eigenvalue="<<r[iroot]<<"\n";
|
||||||
std::cout.flush();
|
std::cout.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,7 +172,7 @@ if(verbose && oldnroot!=nroot) {std::cout <<"root no. "<<oldnroot<<" converged\n
|
|||||||
if (nroot>=nroots) goto converged;
|
if (nroot>=nroots) goto converged;
|
||||||
if (it==maxit-1) break; //not converged
|
if (it==maxit-1) break; //not converged
|
||||||
|
|
||||||
if (krylovsize==maxkrylov) //restart, krylov space exceeded
|
if (krylovsize==maxkrylov-1) //restart, krylov space exceeded
|
||||||
{
|
{
|
||||||
if(nroot!=0) {flag=1; goto finished;}
|
if(nroot!=0) {flag=1; goto finished;}
|
||||||
smallH=0;
|
smallH=0;
|
||||||
@ -180,7 +183,7 @@ if (krylovsize==maxkrylov) //restart, krylov space exceeded
|
|||||||
if(!incore) s0->get(vec2,i);
|
if(!incore) s0->get(vec2,i);
|
||||||
vec1.axpy(smallV(i,0),incore?v0[i]:vec2);
|
vec1.axpy(smallV(i,0),incore?v0[i]:vec2);
|
||||||
}
|
}
|
||||||
s0->put(vec1,0);
|
if(!incore) s0->put(vec1,0);
|
||||||
vec1.normalize();
|
vec1.normalize();
|
||||||
krylovsize = 0;
|
krylovsize = 0;
|
||||||
continue;
|
continue;
|
||||||
|
@ -49,7 +49,11 @@
|
|||||||
#include "noncblas.h"
|
#include "noncblas.h"
|
||||||
#else
|
#else
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#ifdef HAS_MKL
|
||||||
|
#include "mkl_cblas.h"
|
||||||
|
#else
|
||||||
#include "cblas.h"
|
#include "cblas.h"
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
9
mat.h
9
mat.h
@ -45,6 +45,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
friend class NRVec<T>;
|
friend class NRVec<T>;
|
||||||
friend class NRSMat<T>;
|
friend class NRSMat<T>;
|
||||||
|
friend class NRMat_from1<T>;
|
||||||
|
friend class NRSMat_from1<T>;
|
||||||
|
|
||||||
//! standard destructor
|
//! standard destructor
|
||||||
~NRMat();
|
~NRMat();
|
||||||
@ -550,7 +552,7 @@ NRMat<T>::NRMat(const NRSMat<T> &rhs) {
|
|||||||
|
|
||||||
int i(0), j(0), k(0);
|
int i(0), j(0), k(0);
|
||||||
nn = mm = rhs.nrows();
|
nn = mm = rhs.nrows();
|
||||||
count = new int;
|
count = new int;
|
||||||
*count = 1;
|
*count = 1;
|
||||||
#ifdef MATPTR
|
#ifdef MATPTR
|
||||||
v = new T*[nn];
|
v = new T*[nn];
|
||||||
@ -1222,6 +1224,7 @@ class NRMat_from1 : public NRMat<T> {
|
|||||||
public:
|
public:
|
||||||
NRMat_from1(): NRMat<T>() {};
|
NRMat_from1(): NRMat<T>() {};
|
||||||
explicit NRMat_from1(const int n): NRMat<T>(n) {};
|
explicit NRMat_from1(const int n): NRMat<T>(n) {};
|
||||||
|
explicit NRMat_from1(const NRSMat_from1<T> &rhs) : NRMat<T>(rhs) {};
|
||||||
NRMat_from1(const NRMat<T> &rhs): NRMat<T>(rhs) {};//!< be able to convert the parent class transparently to this
|
NRMat_from1(const NRMat<T> &rhs): NRMat<T>(rhs) {};//!< be able to convert the parent class transparently to this
|
||||||
NRMat_from1(const int n, const int m): NRMat<T>(n, m) {};
|
NRMat_from1(const int n, const int m): NRMat<T>(n, m) {};
|
||||||
NRMat_from1(const T &a, const int n, const int m): NRMat<T>(a, n, m) {};
|
NRMat_from1(const T &a, const int n, const int m): NRMat<T>(a, n, m) {};
|
||||||
@ -1342,6 +1345,10 @@ void NRMat<T>::moveto(const GPUID dest) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************//**
|
/***************************************************************************//**
|
||||||
* generate operators: Mat + a, a + Mat, Mat * a
|
* generate operators: Mat + a, a + Mat, Mat * a
|
||||||
* corresponding macro is defined in vec.h
|
* corresponding macro is defined in vec.h
|
||||||
|
28
noncblas.cc
28
noncblas.cc
@ -188,7 +188,7 @@ void cblas_zdotc_sub(const int N, const void *X, const int incX, const void *Y,
|
|||||||
|
|
||||||
|
|
||||||
extern "C" void FORNAME(dspmv) (const char *uplo, const FINT *n, const double *alpha, const double *ap, const double *x, const FINT *incx, const double *beta, double *y, const FINT *incy);
|
extern "C" void FORNAME(dspmv) (const char *uplo, const FINT *n, const double *alpha, const double *ap, const double *x, const FINT *incx, const double *beta, double *y, const FINT *incy);
|
||||||
void cblas_dspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dspmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *Ap,
|
const int N, const double alpha, const double *Ap,
|
||||||
const double *X, const int incX,
|
const double *X, const int incX,
|
||||||
const double beta, double *Y, const int incY)
|
const double beta, double *Y, const int incY)
|
||||||
@ -208,7 +208,7 @@ void cblas_dspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
|||||||
|
|
||||||
|
|
||||||
extern "C" void FORNAME(zhpmv) (const char *uplo, const FINT *n, const void *alpha, const void *ap, const void *x, const FINT *incx, const void *beta, void *y, const FINT *incy);
|
extern "C" void FORNAME(zhpmv) (const char *uplo, const FINT *n, const void *alpha, const void *ap, const void *x, const FINT *incx, const void *beta, void *y, const FINT *incy);
|
||||||
void cblas_zhpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zhpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const void *alpha, const void *Ap,
|
const int N, const void *alpha, const void *Ap,
|
||||||
const void *X, const int incX,
|
const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY)
|
const void *beta, void *Y, const int incY)
|
||||||
@ -230,7 +230,7 @@ void cblas_zhpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
|||||||
//Level 2 and Level 3 on general matrices - take into account the transposed storage of matrices in Fortran and C
|
//Level 2 and Level 3 on general matrices - take into account the transposed storage of matrices in Fortran and C
|
||||||
|
|
||||||
extern "C" void FORNAME(dger) (const FINT *m, const FINT *n, const double *alpha, const double *x, const FINT *incx, const double *y, const FINT *incy, double *a, const FINT *lda);
|
extern "C" void FORNAME(dger) (const FINT *m, const FINT *n, const double *alpha, const double *x, const FINT *incx, const double *y, const FINT *incy, double *a, const FINT *lda);
|
||||||
void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_dger(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const double alpha, const double *X, const int incX,
|
const double alpha, const double *X, const int incX,
|
||||||
const double *Y, const int incY, double *A, const int lda)
|
const double *Y, const int incY, double *A, const int lda)
|
||||||
{
|
{
|
||||||
@ -249,7 +249,7 @@ void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N,
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void FORNAME(zgerc) (const FINT *m, const FINT *n, const void *alpha, const void *x, const FINT *incx, const void *y, const FINT *incy, void *a, const FINT *lda);
|
extern "C" void FORNAME(zgerc) (const FINT *m, const FINT *n, const void *alpha, const void *x, const FINT *incx, const void *y, const FINT *incy, void *a, const FINT *lda);
|
||||||
void cblas_zgerc(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_zgerc(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda)
|
const void *Y, const int incY, void *A, const int lda)
|
||||||
{
|
{
|
||||||
@ -273,7 +273,7 @@ p= (complex<double> *) Y; for(int i=0; i<N; ++i) {p->imag() = -p->imag(); p+= in
|
|||||||
|
|
||||||
|
|
||||||
extern "C" void FORNAME(zgeru) (const FINT *m, const FINT *n, const void *alpha, const void *x, const FINT *incx, const void *y, const FINT *incy, void *a, const FINT *lda);
|
extern "C" void FORNAME(zgeru) (const FINT *m, const FINT *n, const void *alpha, const void *x, const FINT *incx, const void *y, const FINT *incy, void *a, const FINT *lda);
|
||||||
void cblas_zgeru(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_zgeru(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda)
|
const void *Y, const int incY, void *A, const int lda)
|
||||||
{
|
{
|
||||||
@ -292,8 +292,8 @@ void cblas_zgeru(const enum CBLAS_ORDER Order, const int M, const int N,
|
|||||||
|
|
||||||
|
|
||||||
extern "C" void FORNAME(dgemm) (const char *transa, const char *transb, const FINT *m, const FINT *n, const FINT *k, const double *alpha, const double *a, const FINT *lda, const double *b, const FINT *ldb, const double *beta, double *c, const FINT *ldc);
|
extern "C" void FORNAME(dgemm) (const char *transa, const char *transb, const FINT *m, const FINT *n, const FINT *k, const double *alpha, const double *a, const FINT *lda, const double *b, const FINT *ldb, const double *beta, double *c, const FINT *ldc);
|
||||||
void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
|
void cblas_dgemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
|
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||||
const int K, const double alpha, const double *A,
|
const int K, const double alpha, const double *A,
|
||||||
const int lda, const double *B, const int ldb,
|
const int lda, const double *B, const int ldb,
|
||||||
const double beta, double *C, const int ldc)
|
const double beta, double *C, const int ldc)
|
||||||
@ -318,8 +318,8 @@ void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void FORNAME(zgemm) (const char *transa, const char *transb, const FINT *m, const FINT *n, const FINT *k, const void *alpha, const void *a, const FINT *lda, const void *b, const FINT *ldb, const void *beta, void *c, const FINT *ldc);
|
extern "C" void FORNAME(zgemm) (const char *transa, const char *transb, const FINT *m, const FINT *n, const FINT *k, const void *alpha, const void *a, const FINT *lda, const void *b, const FINT *ldb, const void *beta, void *c, const FINT *ldc);
|
||||||
void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
|
void cblas_zgemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
|
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||||
const int K, const void *alpha, const void *A,
|
const int K, const void *alpha, const void *A,
|
||||||
const int lda, const void *B, const int ldb,
|
const int lda, const void *B, const int ldb,
|
||||||
const void *beta, void *C, const int ldc)
|
const void *beta, void *C, const int ldc)
|
||||||
@ -345,8 +345,8 @@ void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA
|
|||||||
|
|
||||||
|
|
||||||
extern "C" void FORNAME(dgemv) (const char *TRANS, const FINT *M, const FINT *N, const double *ALPHA, const double *A, const FINT *LDA, const double *X, const FINT *INCX, const double *BETA, double *Y, const FINT *INCY);
|
extern "C" void FORNAME(dgemv) (const char *TRANS, const FINT *M, const FINT *N, const double *ALPHA, const double *A, const FINT *LDA, const double *X, const FINT *INCX, const double *BETA, double *Y, const FINT *INCY);
|
||||||
void cblas_dgemv(const enum CBLAS_ORDER Order,
|
void cblas_dgemv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
const double *X, const int incX, const double beta,
|
const double *X, const int incX, const double beta,
|
||||||
double *Y, const int incY)
|
double *Y, const int incY)
|
||||||
@ -371,8 +371,8 @@ void cblas_dgemv(const enum CBLAS_ORDER Order,
|
|||||||
|
|
||||||
|
|
||||||
extern "C" void FORNAME(zgemv) (const char *TRANS, const FINT *M, const FINT *N, const void *ALPHA, const void *A, const FINT *LDA, const void *X, const FINT *INCX, const void *BETA, void *Y, const FINT *INCY);
|
extern "C" void FORNAME(zgemv) (const char *TRANS, const FINT *M, const FINT *N, const void *ALPHA, const void *A, const FINT *LDA, const void *X, const FINT *INCX, const void *BETA, void *Y, const FINT *INCY);
|
||||||
void cblas_zgemv(const enum CBLAS_ORDER Order,
|
void cblas_zgemv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *X, const int incX, const void *beta,
|
const void *X, const int incX, const void *beta,
|
||||||
void *Y, const int incY)
|
void *Y, const int incY)
|
||||||
@ -446,7 +446,7 @@ CBLAS_INDEX cblas_izamin(const int N, const void *X, const int incX) {
|
|||||||
//allocate auxiliary storage and transpose input and output quantities to fortran/C order
|
//allocate auxiliary storage and transpose input and output quantities to fortran/C order
|
||||||
extern "C" void FORNAME(dgesv) (const FINT *N, const FINT *NRHS, double *A, const FINT *LDA, FINT *IPIV, double *B, const FINT *LDB, FINT *INFO);
|
extern "C" void FORNAME(dgesv) (const FINT *N, const FINT *NRHS, double *A, const FINT *LDA, FINT *IPIV, double *B, const FINT *LDB, FINT *INFO);
|
||||||
|
|
||||||
int clapack_dgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
|
int clapack_dgesv(const CBLAS_ORDER Order, const int N, const int NRHS,
|
||||||
double *A, const int lda, int *ipiv,
|
double *A, const int lda, int *ipiv,
|
||||||
double *B, const int ldb)
|
double *B, const int ldb)
|
||||||
{
|
{
|
||||||
|
340
noncblas.h
340
noncblas.h
@ -191,197 +191,197 @@ void cblas_zdrot(const int N, void *X, const int incX, void *Y, const int incY,
|
|||||||
/*
|
/*
|
||||||
* Routines with standard 4 prefixes (S, D, C, Z)
|
* Routines with standard 4 prefixes (S, D, C, Z)
|
||||||
*/
|
*/
|
||||||
void cblas_sgemv(const enum CBLAS_ORDER Order,
|
void cblas_sgemv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const float alpha, const float *A, const int lda,
|
const float alpha, const float *A, const int lda,
|
||||||
const float *X, const int incX, const float beta,
|
const float *X, const int incX, const float beta,
|
||||||
float *Y, const int incY);
|
float *Y, const int incY);
|
||||||
void cblas_sgbmv(const enum CBLAS_ORDER Order,
|
void cblas_sgbmv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const int KL, const int KU, const float alpha,
|
const int KL, const int KU, const float alpha,
|
||||||
const float *A, const int lda, const float *X,
|
const float *A, const int lda, const float *X,
|
||||||
const int incX, const float beta, float *Y, const int incY);
|
const int incX, const float beta, float *Y, const int incY);
|
||||||
void cblas_strmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_strmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const float *A, const int lda,
|
const int N, const float *A, const int lda,
|
||||||
float *X, const int incX);
|
float *X, const int incX);
|
||||||
void cblas_stbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_stbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const float *A, const int lda,
|
const int N, const int K, const float *A, const int lda,
|
||||||
float *X, const int incX);
|
float *X, const int incX);
|
||||||
void cblas_stpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_stpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const float *Ap, float *X, const int incX);
|
const int N, const float *Ap, float *X, const int incX);
|
||||||
void cblas_strsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_strsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const float *A, const int lda, float *X,
|
const int N, const float *A, const int lda, float *X,
|
||||||
const int incX);
|
const int incX);
|
||||||
void cblas_stbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_stbsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const float *A, const int lda,
|
const int N, const int K, const float *A, const int lda,
|
||||||
float *X, const int incX);
|
float *X, const int incX);
|
||||||
void cblas_stpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_stpsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const float *Ap, float *X, const int incX);
|
const int N, const float *Ap, float *X, const int incX);
|
||||||
|
|
||||||
void cblas_dgemv(const enum CBLAS_ORDER Order,
|
void cblas_dgemv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
const double *X, const int incX, const double beta,
|
const double *X, const int incX, const double beta,
|
||||||
double *Y, const int incY);
|
double *Y, const int incY);
|
||||||
void cblas_dgbmv(const enum CBLAS_ORDER Order,
|
void cblas_dgbmv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const int KL, const int KU, const double alpha,
|
const int KL, const int KU, const double alpha,
|
||||||
const double *A, const int lda, const double *X,
|
const double *A, const int lda, const double *X,
|
||||||
const int incX, const double beta, double *Y, const int incY);
|
const int incX, const double beta, double *Y, const int incY);
|
||||||
void cblas_dtrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dtrmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const double *A, const int lda,
|
const int N, const double *A, const int lda,
|
||||||
double *X, const int incX);
|
double *X, const int incX);
|
||||||
void cblas_dtbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dtbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const double *A, const int lda,
|
const int N, const int K, const double *A, const int lda,
|
||||||
double *X, const int incX);
|
double *X, const int incX);
|
||||||
void cblas_dtpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dtpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const double *Ap, double *X, const int incX);
|
const int N, const double *Ap, double *X, const int incX);
|
||||||
void cblas_dtrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dtrsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const double *A, const int lda, double *X,
|
const int N, const double *A, const int lda, double *X,
|
||||||
const int incX);
|
const int incX);
|
||||||
void cblas_dtbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dtbsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const double *A, const int lda,
|
const int N, const int K, const double *A, const int lda,
|
||||||
double *X, const int incX);
|
double *X, const int incX);
|
||||||
void cblas_dtpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dtpsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const double *Ap, double *X, const int incX);
|
const int N, const double *Ap, double *X, const int incX);
|
||||||
|
|
||||||
void cblas_cgemv(const enum CBLAS_ORDER Order,
|
void cblas_cgemv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *X, const int incX, const void *beta,
|
const void *X, const int incX, const void *beta,
|
||||||
void *Y, const int incY);
|
void *Y, const int incY);
|
||||||
void cblas_cgbmv(const enum CBLAS_ORDER Order,
|
void cblas_cgbmv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const int KL, const int KU, const void *alpha,
|
const int KL, const int KU, const void *alpha,
|
||||||
const void *A, const int lda, const void *X,
|
const void *A, const int lda, const void *X,
|
||||||
const int incX, const void *beta, void *Y, const int incY);
|
const int incX, const void *beta, void *Y, const int incY);
|
||||||
void cblas_ctrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ctrmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *A, const int lda,
|
const int N, const void *A, const int lda,
|
||||||
void *X, const int incX);
|
void *X, const int incX);
|
||||||
void cblas_ctbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ctbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const void *A, const int lda,
|
const int N, const int K, const void *A, const int lda,
|
||||||
void *X, const int incX);
|
void *X, const int incX);
|
||||||
void cblas_ctpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ctpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *Ap, void *X, const int incX);
|
const int N, const void *Ap, void *X, const int incX);
|
||||||
void cblas_ctrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ctrsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *A, const int lda, void *X,
|
const int N, const void *A, const int lda, void *X,
|
||||||
const int incX);
|
const int incX);
|
||||||
void cblas_ctbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ctbsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const void *A, const int lda,
|
const int N, const int K, const void *A, const int lda,
|
||||||
void *X, const int incX);
|
void *X, const int incX);
|
||||||
void cblas_ctpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ctpsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *Ap, void *X, const int incX);
|
const int N, const void *Ap, void *X, const int incX);
|
||||||
|
|
||||||
void cblas_zgemv(const enum CBLAS_ORDER Order,
|
void cblas_zgemv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *X, const int incX, const void *beta,
|
const void *X, const int incX, const void *beta,
|
||||||
void *Y, const int incY);
|
void *Y, const int incY);
|
||||||
void cblas_zgbmv(const enum CBLAS_ORDER Order,
|
void cblas_zgbmv(const CBLAS_ORDER Order,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
|
const CBLAS_TRANSPOSE TransA, const int M, const int N,
|
||||||
const int KL, const int KU, const void *alpha,
|
const int KL, const int KU, const void *alpha,
|
||||||
const void *A, const int lda, const void *X,
|
const void *A, const int lda, const void *X,
|
||||||
const int incX, const void *beta, void *Y, const int incY);
|
const int incX, const void *beta, void *Y, const int incY);
|
||||||
void cblas_ztrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ztrmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *A, const int lda,
|
const int N, const void *A, const int lda,
|
||||||
void *X, const int incX);
|
void *X, const int incX);
|
||||||
void cblas_ztbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ztbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const void *A, const int lda,
|
const int N, const int K, const void *A, const int lda,
|
||||||
void *X, const int incX);
|
void *X, const int incX);
|
||||||
void cblas_ztpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ztpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *Ap, void *X, const int incX);
|
const int N, const void *Ap, void *X, const int incX);
|
||||||
void cblas_ztrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ztrsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *A, const int lda, void *X,
|
const int N, const void *A, const int lda, void *X,
|
||||||
const int incX);
|
const int incX);
|
||||||
void cblas_ztbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ztbsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const int K, const void *A, const int lda,
|
const int N, const int K, const void *A, const int lda,
|
||||||
void *X, const int incX);
|
void *X, const int incX);
|
||||||
void cblas_ztpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ztpsv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
|
const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag,
|
||||||
const int N, const void *Ap, void *X, const int incX);
|
const int N, const void *Ap, void *X, const int incX);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routines with S and D prefixes only
|
* Routines with S and D prefixes only
|
||||||
*/
|
*/
|
||||||
void cblas_ssymv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ssymv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const float *A,
|
const int N, const float alpha, const float *A,
|
||||||
const int lda, const float *X, const int incX,
|
const int lda, const float *X, const int incX,
|
||||||
const float beta, float *Y, const int incY);
|
const float beta, float *Y, const int incY);
|
||||||
void cblas_ssbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ssbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const int K, const float alpha, const float *A,
|
const int N, const int K, const float alpha, const float *A,
|
||||||
const int lda, const float *X, const int incX,
|
const int lda, const float *X, const int incX,
|
||||||
const float beta, float *Y, const int incY);
|
const float beta, float *Y, const int incY);
|
||||||
void cblas_sspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_sspmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const float *Ap,
|
const int N, const float alpha, const float *Ap,
|
||||||
const float *X, const int incX,
|
const float *X, const int incX,
|
||||||
const float beta, float *Y, const int incY);
|
const float beta, float *Y, const int incY);
|
||||||
void cblas_sger(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_sger(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const float alpha, const float *X, const int incX,
|
const float alpha, const float *X, const int incX,
|
||||||
const float *Y, const int incY, float *A, const int lda);
|
const float *Y, const int incY, float *A, const int lda);
|
||||||
void cblas_ssyr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ssyr(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const float *X,
|
const int N, const float alpha, const float *X,
|
||||||
const int incX, float *A, const int lda);
|
const int incX, float *A, const int lda);
|
||||||
void cblas_sspr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_sspr(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const float *X,
|
const int N, const float alpha, const float *X,
|
||||||
const int incX, float *Ap);
|
const int incX, float *Ap);
|
||||||
void cblas_ssyr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ssyr2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const float *X,
|
const int N, const float alpha, const float *X,
|
||||||
const int incX, const float *Y, const int incY, float *A,
|
const int incX, const float *Y, const int incY, float *A,
|
||||||
const int lda);
|
const int lda);
|
||||||
void cblas_sspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_sspr2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const float *X,
|
const int N, const float alpha, const float *X,
|
||||||
const int incX, const float *Y, const int incY, float *A);
|
const int incX, const float *Y, const int incY, float *A);
|
||||||
|
|
||||||
void cblas_dsymv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dsymv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *A,
|
const int N, const double alpha, const double *A,
|
||||||
const int lda, const double *X, const int incX,
|
const int lda, const double *X, const int incX,
|
||||||
const double beta, double *Y, const int incY);
|
const double beta, double *Y, const int incY);
|
||||||
void cblas_dsbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dsbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const int K, const double alpha, const double *A,
|
const int N, const int K, const double alpha, const double *A,
|
||||||
const int lda, const double *X, const int incX,
|
const int lda, const double *X, const int incX,
|
||||||
const double beta, double *Y, const int incY);
|
const double beta, double *Y, const int incY);
|
||||||
void cblas_dspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dspmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *Ap,
|
const int N, const double alpha, const double *Ap,
|
||||||
const double *X, const int incX,
|
const double *X, const int incX,
|
||||||
const double beta, double *Y, const int incY);
|
const double beta, double *Y, const int incY);
|
||||||
void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_dger(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const double alpha, const double *X, const int incX,
|
const double alpha, const double *X, const int incX,
|
||||||
const double *Y, const int incY, double *A, const int lda);
|
const double *Y, const int incY, double *A, const int lda);
|
||||||
void cblas_dsyr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dsyr(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *X,
|
const int N, const double alpha, const double *X,
|
||||||
const int incX, double *A, const int lda);
|
const int incX, double *A, const int lda);
|
||||||
void cblas_dspr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dspr(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *X,
|
const int N, const double alpha, const double *X,
|
||||||
const int incX, double *Ap);
|
const int incX, double *Ap);
|
||||||
void cblas_dsyr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dsyr2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *X,
|
const int N, const double alpha, const double *X,
|
||||||
const int incX, const double *Y, const int incY, double *A,
|
const int incX, const double *Y, const int incY, double *A,
|
||||||
const int lda);
|
const int lda);
|
||||||
void cblas_dspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dspr2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const double *X,
|
const int N, const double alpha, const double *X,
|
||||||
const int incX, const double *Y, const int incY, double *A);
|
const int incX, const double *Y, const int incY, double *A);
|
||||||
|
|
||||||
@ -389,65 +389,65 @@ void cblas_dspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
|||||||
/*
|
/*
|
||||||
* Routines with C and Z prefixes only
|
* Routines with C and Z prefixes only
|
||||||
*/
|
*/
|
||||||
void cblas_chemv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_chemv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const void *alpha, const void *A,
|
const int N, const void *alpha, const void *A,
|
||||||
const int lda, const void *X, const int incX,
|
const int lda, const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY);
|
const void *beta, void *Y, const int incY);
|
||||||
void cblas_chbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_chbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const int K, const void *alpha, const void *A,
|
const int N, const int K, const void *alpha, const void *A,
|
||||||
const int lda, const void *X, const int incX,
|
const int lda, const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY);
|
const void *beta, void *Y, const int incY);
|
||||||
void cblas_chpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_chpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const void *alpha, const void *Ap,
|
const int N, const void *alpha, const void *Ap,
|
||||||
const void *X, const int incX,
|
const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY);
|
const void *beta, void *Y, const int incY);
|
||||||
void cblas_cgeru(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_cgeru(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda);
|
const void *Y, const int incY, void *A, const int lda);
|
||||||
void cblas_cgerc(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_cgerc(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda);
|
const void *Y, const int incY, void *A, const int lda);
|
||||||
void cblas_cher(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_cher(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const void *X, const int incX,
|
const int N, const float alpha, const void *X, const int incX,
|
||||||
void *A, const int lda);
|
void *A, const int lda);
|
||||||
void cblas_chpr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_chpr(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const float alpha, const void *X,
|
const int N, const float alpha, const void *X,
|
||||||
const int incX, void *A);
|
const int incX, void *A);
|
||||||
void cblas_cher2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
|
void cblas_cher2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda);
|
const void *Y, const int incY, void *A, const int lda);
|
||||||
void cblas_chpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
|
void cblas_chpr2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *Ap);
|
const void *Y, const int incY, void *Ap);
|
||||||
|
|
||||||
void cblas_zhemv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zhemv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const void *alpha, const void *A,
|
const int N, const void *alpha, const void *A,
|
||||||
const int lda, const void *X, const int incX,
|
const int lda, const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY);
|
const void *beta, void *Y, const int incY);
|
||||||
void cblas_zhbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zhbmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const int K, const void *alpha, const void *A,
|
const int N, const int K, const void *alpha, const void *A,
|
||||||
const int lda, const void *X, const int incX,
|
const int lda, const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY);
|
const void *beta, void *Y, const int incY);
|
||||||
void cblas_zhpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zhpmv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const void *alpha, const void *Ap,
|
const int N, const void *alpha, const void *Ap,
|
||||||
const void *X, const int incX,
|
const void *X, const int incX,
|
||||||
const void *beta, void *Y, const int incY);
|
const void *beta, void *Y, const int incY);
|
||||||
void cblas_zgeru(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_zgeru(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda);
|
const void *Y, const int incY, void *A, const int lda);
|
||||||
void cblas_zgerc(const enum CBLAS_ORDER Order, const int M, const int N,
|
void cblas_zgerc(const CBLAS_ORDER Order, const int M, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda);
|
const void *Y, const int incY, void *A, const int lda);
|
||||||
void cblas_zher(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zher(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const void *X, const int incX,
|
const int N, const double alpha, const void *X, const int incX,
|
||||||
void *A, const int lda);
|
void *A, const int lda);
|
||||||
void cblas_zhpr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zhpr(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const int N, const double alpha, const void *X,
|
const int N, const double alpha, const void *X,
|
||||||
const int incX, void *A);
|
const int incX, void *A);
|
||||||
void cblas_zher2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
|
void cblas_zher2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *A, const int lda);
|
const void *Y, const int incY, void *A, const int lda);
|
||||||
void cblas_zhpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
|
void cblas_zhpr2(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, const int N,
|
||||||
const void *alpha, const void *X, const int incX,
|
const void *alpha, const void *X, const int incX,
|
||||||
const void *Y, const int incY, void *Ap);
|
const void *Y, const int incY, void *Ap);
|
||||||
|
|
||||||
@ -460,123 +460,123 @@ void cblas_zhpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const
|
|||||||
/*
|
/*
|
||||||
* Routines with standard 4 prefixes (S, D, C, Z)
|
* Routines with standard 4 prefixes (S, D, C, Z)
|
||||||
*/
|
*/
|
||||||
void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
|
void cblas_sgemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
|
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||||
const int K, const float alpha, const float *A,
|
const int K, const float alpha, const float *A,
|
||||||
const int lda, const float *B, const int ldb,
|
const int lda, const float *B, const int ldb,
|
||||||
const float beta, float *C, const int ldc);
|
const float beta, float *C, const int ldc);
|
||||||
void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_ssymm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const int M, const int N,
|
const CBLAS_UPLO Uplo, const int M, const int N,
|
||||||
const float alpha, const float *A, const int lda,
|
const float alpha, const float *A, const int lda,
|
||||||
const float *B, const int ldb, const float beta,
|
const float *B, const int ldb, const float beta,
|
||||||
float *C, const int ldc);
|
float *C, const int ldc);
|
||||||
void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ssyrk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const float alpha, const float *A, const int lda,
|
const float alpha, const float *A, const int lda,
|
||||||
const float beta, float *C, const int ldc);
|
const float beta, float *C, const int ldc);
|
||||||
void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_ssyr2k(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const float alpha, const float *A, const int lda,
|
const float alpha, const float *A, const int lda,
|
||||||
const float *B, const int ldb, const float beta,
|
const float *B, const int ldb, const float beta,
|
||||||
float *C, const int ldc);
|
float *C, const int ldc);
|
||||||
void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_strmm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const float alpha, const float *A, const int lda,
|
const float alpha, const float *A, const int lda,
|
||||||
float *B, const int ldb);
|
float *B, const int ldb);
|
||||||
void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_strsm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const float alpha, const float *A, const int lda,
|
const float alpha, const float *A, const int lda,
|
||||||
float *B, const int ldb);
|
float *B, const int ldb);
|
||||||
|
|
||||||
void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
|
void cblas_dgemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
|
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||||
const int K, const double alpha, const double *A,
|
const int K, const double alpha, const double *A,
|
||||||
const int lda, const double *B, const int ldb,
|
const int lda, const double *B, const int ldb,
|
||||||
const double beta, double *C, const int ldc);
|
const double beta, double *C, const int ldc);
|
||||||
void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_dsymm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const int M, const int N,
|
const CBLAS_UPLO Uplo, const int M, const int N,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
const double *B, const int ldb, const double beta,
|
const double *B, const int ldb, const double beta,
|
||||||
double *C, const int ldc);
|
double *C, const int ldc);
|
||||||
void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dsyrk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
const double beta, double *C, const int ldc);
|
const double beta, double *C, const int ldc);
|
||||||
void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_dsyr2k(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
const double *B, const int ldb, const double beta,
|
const double *B, const int ldb, const double beta,
|
||||||
double *C, const int ldc);
|
double *C, const int ldc);
|
||||||
void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_dtrmm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
double *B, const int ldb);
|
double *B, const int ldb);
|
||||||
void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_dtrsm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const double alpha, const double *A, const int lda,
|
const double alpha, const double *A, const int lda,
|
||||||
double *B, const int ldb);
|
double *B, const int ldb);
|
||||||
|
|
||||||
void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
|
void cblas_cgemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
|
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||||
const int K, const void *alpha, const void *A,
|
const int K, const void *alpha, const void *A,
|
||||||
const int lda, const void *B, const int ldb,
|
const int lda, const void *B, const int ldb,
|
||||||
const void *beta, void *C, const int ldc);
|
const void *beta, void *C, const int ldc);
|
||||||
void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_csymm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const int M, const int N,
|
const CBLAS_UPLO Uplo, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const void *beta,
|
const void *B, const int ldb, const void *beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_csyrk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *beta, void *C, const int ldc);
|
const void *beta, void *C, const int ldc);
|
||||||
void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_csyr2k(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const void *beta,
|
const void *B, const int ldb, const void *beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_ctrmm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
void *B, const int ldb);
|
void *B, const int ldb);
|
||||||
void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_ctrsm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
void *B, const int ldb);
|
void *B, const int ldb);
|
||||||
|
|
||||||
void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
|
void cblas_zgemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
|
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||||
const int K, const void *alpha, const void *A,
|
const int K, const void *alpha, const void *A,
|
||||||
const int lda, const void *B, const int ldb,
|
const int lda, const void *B, const int ldb,
|
||||||
const void *beta, void *C, const int ldc);
|
const void *beta, void *C, const int ldc);
|
||||||
void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_zsymm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const int M, const int N,
|
const CBLAS_UPLO Uplo, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const void *beta,
|
const void *B, const int ldb, const void *beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zsyrk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *beta, void *C, const int ldc);
|
const void *beta, void *C, const int ldc);
|
||||||
void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zsyr2k(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const void *beta,
|
const void *B, const int ldb, const void *beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_ztrmm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
void *B, const int ldb);
|
void *B, const int ldb);
|
||||||
void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_ztrsm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
|
const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA,
|
||||||
const enum CBLAS_DIAG Diag, const int M, const int N,
|
const CBLAS_DIAG Diag, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
void *B, const int ldb);
|
void *B, const int ldb);
|
||||||
|
|
||||||
@ -584,31 +584,31 @@ void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
|||||||
/*
|
/*
|
||||||
* Routines with prefixes C and Z only
|
* Routines with prefixes C and Z only
|
||||||
*/
|
*/
|
||||||
void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_chemm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const int M, const int N,
|
const CBLAS_UPLO Uplo, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const void *beta,
|
const void *B, const int ldb, const void *beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_cherk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const float alpha, const void *A, const int lda,
|
const float alpha, const void *A, const int lda,
|
||||||
const float beta, void *C, const int ldc);
|
const float beta, void *C, const int ldc);
|
||||||
void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_cher2k(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const float beta,
|
const void *B, const int ldb, const float beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
|
void cblas_zhemm(const CBLAS_ORDER Order, const CBLAS_SIDE Side,
|
||||||
const enum CBLAS_UPLO Uplo, const int M, const int N,
|
const CBLAS_UPLO Uplo, const int M, const int N,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const void *beta,
|
const void *B, const int ldb, const void *beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zherk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const double alpha, const void *A, const int lda,
|
const double alpha, const void *A, const int lda,
|
||||||
const double beta, void *C, const int ldc);
|
const double beta, void *C, const int ldc);
|
||||||
void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
|
void cblas_zher2k(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo,
|
||||||
const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
|
const CBLAS_TRANSPOSE Trans, const int N, const int K,
|
||||||
const void *alpha, const void *A, const int lda,
|
const void *alpha, const void *A, const int lda,
|
||||||
const void *B, const int ldb, const double beta,
|
const void *B, const int ldb, const double beta,
|
||||||
void *C, const int ldc);
|
void *C, const int ldc);
|
||||||
@ -678,11 +678,15 @@ int cblas_errprn(int ierr, int info, char *form, ...);
|
|||||||
#define NONCLAPACK_H
|
#define NONCLAPACK_H
|
||||||
|
|
||||||
#ifndef NONCBLAS
|
#ifndef NONCBLAS
|
||||||
#include <cblas.h>
|
#ifdef HAS_MKL
|
||||||
|
#include "mkl_cblas.h"
|
||||||
|
#else
|
||||||
|
#include "cblas.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*from clapack.h*/
|
/*from clapack.h*/
|
||||||
int clapack_dgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
|
int clapack_dgesv(const CBLAS_ORDER Order, const int N, const int NRHS,
|
||||||
double *A, const int lda, int *ipiv,
|
double *A, const int lda, int *ipiv,
|
||||||
double *B, const int ldb);
|
double *B, const int ldb);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1651,6 +1651,11 @@ double r=0;
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline double trace2(const NRMat<double> &a, const NRSMat<double> &b, const bool diagscaled)
|
||||||
|
{
|
||||||
|
return trace2(b,a,diagscaled);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Cholesky interface
|
//Cholesky interface
|
||||||
extern "C" void FORNAME(dpotrf)(const char *UPLO, const FINT *N, double *A, const FINT *LDA, FINT *INFO);
|
extern "C" void FORNAME(dpotrf)(const char *UPLO, const FINT *N, double *A, const FINT *LDA, FINT *INFO);
|
||||||
|
@ -88,14 +88,14 @@ extern const NRVec<T> diagofproduct(const NRMat<T> &a, const NRMat<T> &b,\
|
|||||||
extern T trace2(const NRMat<T> &a, const NRMat<T> &b, bool trb=0); \
|
extern T trace2(const NRMat<T> &a, const NRMat<T> &b, bool trb=0); \
|
||||||
extern T trace2(const NRSMat<T> &a, const NRSMat<T> &b, const bool diagscaled=0);\
|
extern T trace2(const NRSMat<T> &a, const NRSMat<T> &b, const bool diagscaled=0);\
|
||||||
extern T trace2(const NRSMat<T> &a, const NRMat<T> &b, const bool diagscaled=0);\
|
extern T trace2(const NRSMat<T> &a, const NRMat<T> &b, const bool diagscaled=0);\
|
||||||
|
extern T trace2(const NRMat<T> &a, const NRSMat<T> &b, const bool diagscaled=0);\
|
||||||
extern void linear_solve(NRMat<T> &a, NRMat<T> *b, T *det=0,int n=0); /*solve Ax^T=b^T (b is nrhs x n) */ \
|
extern void linear_solve(NRMat<T> &a, NRMat<T> *b, T *det=0,int n=0); /*solve Ax^T=b^T (b is nrhs x n) */ \
|
||||||
extern void linear_solve(NRSMat<T> &a, NRMat<T> *b, T *det=0, int n=0); /*solve Ax^T=b^T (b is nrhs x n) */\
|
extern void linear_solve(NRSMat<T> &a, NRMat<T> *b, T *det=0, int n=0); /*solve Ax^T=b^T (b is nrhs x n) */\
|
||||||
extern void linear_solve(NRMat<T> &a, NRVec<T> &b, double *det=0, int n=0); \
|
extern void linear_solve(NRMat<T> &a, NRVec<T> &b, double *det=0, int n=0); \
|
||||||
extern void linear_solve(NRSMat<T> &a, NRVec<T> &b, double *det=0, int n=0); \
|
extern void linear_solve(NRSMat<T> &a, NRVec<T> &b, double *det=0, int n=0); \
|
||||||
extern void diagonalize(NRMat<T> &a, NRVec<LA_traits<T>::normtype> &w, const bool eivec=1, const bool corder=1, int n=0, NRMat<T> *b=NULL, const int itype=1); \
|
extern void diagonalize(NRMat<T> &a, NRVec<LA_traits<T>::normtype> &w, const bool eivec=1, const bool corder=1, int n=0, NRMat<T> *b=NULL, const int itype=1); \
|
||||||
extern void diagonalize(NRSMat<T> &a, NRVec<LA_traits<T>::normtype> &w, NRMat<T> *v, const bool corder=1, int n=0, NRSMat<T> *b=NULL, const int itype=1);\
|
extern void diagonalize(NRSMat<T> &a, NRVec<LA_traits<T>::normtype> &w, NRMat<T> *v, const bool corder=1, int n=0, NRSMat<T> *b=NULL, const int itype=1);\
|
||||||
extern void singular_decomposition(NRMat<T> &a, NRMat<T> *u, NRVec<T> &s,\
|
extern void singular_decomposition(NRMat<T> &a, NRMat<T> *u, NRVec<LA_traits<T>::normtype> &s, NRMat<T> *v, const bool vnotdagger=0, int m=0, int n=0);
|
||||||
NRMat<T> *v, const bool corder=1, int m=0, int n=0);
|
|
||||||
|
|
||||||
/*NOTE!!! all versions of diagonalize DESTROY A and generalized diagonalize also B matrix */
|
/*NOTE!!! all versions of diagonalize DESTROY A and generalized diagonalize also B matrix */
|
||||||
|
|
||||||
|
56
t.cc
56
t.cc
@ -352,18 +352,33 @@ if(0)
|
|||||||
{
|
{
|
||||||
NRMat<double> a;
|
NRMat<double> a;
|
||||||
cin >>a ;
|
cin >>a ;
|
||||||
NRMat<double> b=a.transpose();
|
NRMat<double> abak=a;
|
||||||
NRMat<double> u(a.nrows(),a.nrows()),v(a.ncols(),a.ncols());
|
NRMat<double> u(a.nrows(),a.nrows()),v(a.ncols(),a.ncols());
|
||||||
NRVec<double>s(a.ncols());
|
NRVec<double>s(a.ncols()<a.nrows()?a.ncols():a.nrows());
|
||||||
singular_decomposition(a,&u,s,&v);
|
singular_decomposition(a,&u,s,&v,0);
|
||||||
//singular_decomposition(a,NULL,s,NULL); //this does not work when linked with static version of lapack, works with .so.3 version (from suse distrib)
|
|
||||||
cout <<u;
|
cout <<u;
|
||||||
cout <<s;
|
NRMat<double> sdiag(0., u.ncols(),v.nrows());
|
||||||
|
sdiag.diagonalset(s);
|
||||||
|
cout <<sdiag;
|
||||||
cout <<v;
|
cout <<v;
|
||||||
//singular_decomposition(b,&v,s,&u);
|
cout << "Error "<<(u*sdiag*v-abak).norm()<<endl;
|
||||||
//cout <<v;
|
}
|
||||||
//cout <<s;
|
|
||||||
//cout <<u;
|
if(0)
|
||||||
|
{
|
||||||
|
NRMat<complex<double> > a;
|
||||||
|
cin >>a ;
|
||||||
|
NRMat<complex<double> > abak=a;
|
||||||
|
NRMat<complex<double> > u(a.nrows(),a.nrows()),v(a.ncols(),a.ncols());
|
||||||
|
NRVec<double>s(a.ncols()<a.nrows()?a.ncols():a.nrows());
|
||||||
|
singular_decomposition(a,&u,s,&v,0);
|
||||||
|
cout <<u;
|
||||||
|
NRMat<complex<double> > sdiag(0., u.ncols(),v.nrows());
|
||||||
|
NRVec<complex<double> > ss = s;
|
||||||
|
sdiag.diagonalset(ss);
|
||||||
|
cout <<sdiag;
|
||||||
|
cout <<v;
|
||||||
|
cout << "Error "<<(u*sdiag*v-abak).norm()<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(0)
|
if(0)
|
||||||
@ -1579,7 +1594,7 @@ cin >>n;
|
|||||||
NRMat<complex<double> > a(n,n);
|
NRMat<complex<double> > a(n,n);
|
||||||
a.randomize(1);
|
a.randomize(1);
|
||||||
for(int i=0; i<n; ++i) for(int j=0; j<i; ++j) {a(i,j)=0.;}
|
for(int i=0; i<n; ++i) for(int j=0; j<i; ++j) {a(i,j)=0.;}
|
||||||
for(int i=0; i<n; ++i) {a(i,i).imag()=0.; if(a(i,i).real()<0) a(i,i).real() *= -1;}
|
for(int i=0; i<n; ++i) {a(i,i).imag(0.); if(a(i,i).real()<0) a(i,i).real(-a(i,i).real());}
|
||||||
cout <<a;
|
cout <<a;
|
||||||
NRMat<complex<double> > bb=a.transpose(true)*a;
|
NRMat<complex<double> > bb=a.transpose(true)*a;
|
||||||
NRMat<complex<double> > cc(bb);
|
NRMat<complex<double> > cc(bb);
|
||||||
@ -1642,7 +1657,7 @@ cin >>n;
|
|||||||
NRMat<complex<double> > a(n,n);
|
NRMat<complex<double> > a(n,n);
|
||||||
a.randomize(1);
|
a.randomize(1);
|
||||||
for(int i=0; i<n; ++i) for(int j=0; j<i; ++j) {a(i,j)=0.;}
|
for(int i=0; i<n; ++i) for(int j=0; j<i; ++j) {a(i,j)=0.;}
|
||||||
for(int i=0; i<n; ++i) {a(i,i).imag() = 0.; if(a(i,i).real()<0) a(i,i).real() *= -10; else a(i,i).real() *= 10.;}
|
for(int i=0; i<n; ++i) {a(i,i).imag(0.); if(a(i,i).real()<0) a(i,i).real(-10.*a(i,i).real()); else a(i,i).real(10.*a(i,i).real());}
|
||||||
if(n<100)cout <<a;
|
if(n<100)cout <<a;
|
||||||
NRMat<complex<double> > bb=a.transpose(true)*a;
|
NRMat<complex<double> > bb=a.transpose(true)*a;
|
||||||
SparseSMat<complex<double> > cc(bb);
|
SparseSMat<complex<double> > cc(bb);
|
||||||
@ -1760,7 +1775,7 @@ cout <<"error = "<<(r2-NRMat<complex<double> >(r)).norm()<<endl;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if(1)
|
if(0)
|
||||||
{
|
{
|
||||||
NRMat<complex<double> > m;
|
NRMat<complex<double> > m;
|
||||||
ifstream f("libormat");
|
ifstream f("libormat");
|
||||||
@ -1825,6 +1840,23 @@ cout <<"eigenvalue error = "<<err<<endl;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(0)
|
||||||
|
{
|
||||||
|
NRMat<double> a;
|
||||||
|
cin >>a ;
|
||||||
|
double det=determinant_destroy(a);
|
||||||
|
cout << "det= "<<det<<endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(1)
|
||||||
|
{
|
||||||
|
bitvector v(3);
|
||||||
|
v.assign(0,0);
|
||||||
|
v.assign(1,1);
|
||||||
|
v.assign(2,0);
|
||||||
|
cin >>v;
|
||||||
|
cout <<v;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user