SCIP-SDP  3.1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
lapack.h File Reference

interface methods for eigenvector computation and matrix multiplication using different versions of LAPACK and BLAS More...

Go to the source code of this file.

Functions

EXTERN SCIP_RETCODE SCIPlapackComputeIthEigenvalue (BMS_BUFMEM *bufmem, SCIP_Bool geteigenvectors, int n, SCIP_Real *A, int i, SCIP_Real *eigenvalue, SCIP_Real *eigenvector)
 
EXTERN SCIP_RETCODE SCIPlapackComputeEigenvectorDecomposition (BMS_BUFMEM *bufmem, int n, SCIP_Real *A, SCIP_Real *eigenvalues, SCIP_Real *eigenvectors)
 
EXTERN SCIP_RETCODE SCIPlapackMatrixVectorMult (int nrows, int ncols, SCIP_Real *matrix, SCIP_Real *vector, SCIP_Real *result)
 
EXTERN SCIP_RETCODE SCIPlapackMatrixMatrixMult (int nrowsA, int ncolsA, SCIP_Real *matrixA, SCIP_Bool transposeA, int nrowsB, int ncolsB, SCIP_Real *matrixB, SCIP_Bool transposeB, SCIP_Real *result)
 

Detailed Description

interface methods for eigenvector computation and matrix multiplication using different versions of LAPACK and BLAS

Author
Tristan Gally

This file is used to call the LAPACK routine DSYEVR (double-symmetric-eigenvector computation) and the BLAS routine DGEMV (double-general-matrix-vector multiplication). It is needed because different SDP-solvers need different BLAS/LAPACK-versions with different data types (for example long long int for Openblas/SDPA vs. int for ATLAS/DSDP).

Definition in file lapack.h.

Function Documentation

EXTERN SCIP_RETCODE SCIPlapackComputeIthEigenvalue ( BMS_BUFMEM *  bufmem,
SCIP_Bool  geteigenvectors,
int  n,
SCIP_Real *  A,
int  i,
SCIP_Real *  eigenvalue,
SCIP_Real *  eigenvector 
)

computes the i-th eigenvalue of a symmetric matrix using LAPACK, where 1 is the smallest and n the largest, matrix has to be given with all $n^2$ entries

Parameters
bufmembuffer memory
geteigenvectorsshould also the eigenvectors be computed?
nsize of matrix
Amatrix for which eigenvalues should be computed
iindex of eigenvalue to be computed
eigenvaluepointer to store eigenvalue
eigenvectorpointer to store eigenvector

Referenced by checkFixedFeasibilitySdp(), cutUsingEigenvector(), SCIP_DECL_CONSLOCK(), SCIPconsSdpCheckSdpCons(), and SCIPsdpSolcheckerCheck().

EXTERN SCIP_RETCODE SCIPlapackComputeEigenvectorDecomposition ( BMS_BUFMEM *  bufmem,
int  n,
SCIP_Real *  A,
SCIP_Real *  eigenvalues,
SCIP_Real *  eigenvectors 
)

computes the eigenvector decomposition of a symmetric matrix using LAPACK

Parameters
bufmembuffer memory
nsize of matrix
Amatrix for which the decomposition should be computed
eigenvaluespointer to store eigenvalues (should be length n)
eigenvectorspointer to store eigenvectors (should be length n*n), eigenvectors are given as rows

Definition at line 220 of file lapack_dsdp.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

Referenced by calcRelax().

EXTERN SCIP_RETCODE SCIPlapackMatrixVectorMult ( int  nrows,
int  ncols,
SCIP_Real *  matrix,
SCIP_Real *  vector,
SCIP_Real *  result 
)

performs matrix-vector-multiplication using BLAS

Parameters
nrowsnumber of rows in matrix
ncolsnumber of cols in matrix
matrixthe matrix we want to multiply
vectorvector we want to multiply with the matrix
resultpointer to store the resulting vector

Definition at line 322 of file lapack_dsdp.c.

References F77_FUNC.

Referenced by cutUsingEigenvector().

EXTERN SCIP_RETCODE SCIPlapackMatrixMatrixMult ( int  nrowsA,
int  ncolsA,
SCIP_Real *  matrixA,
SCIP_Bool  transposeA,
int  nrowsB,
int  ncolsB,
SCIP_Real *  matrixB,
SCIP_Bool  transposeB,
SCIP_Real *  result 
)

performs matrix-matrix-multiplication A*B using BLAS

Parameters
nrowsAnumber of rows in matrix A
ncolsAnumber of cols in matrix A
matrixAmatrix A given as nrowsA * ncolsA array
transposeAshould matrix A be transposed before multiplication?
nrowsBnumber of rows in matrix B
ncolsBnumber of cols in matrix B
matrixBmatrix B given as ncolsA * ncolsB array
transposeBshould matrix B be transposed before multiplication?
resultpointer to nrowsA * nrowsB array to store the resulting matrix

Definition at line 360 of file lapack_dsdp.c.

References F77_FUNC.

Referenced by calcRelax().