/usr/include/sdpa_algebra.h is in libsdpa-dev 7.3.9+dfsg-1+b3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | /* -------------------------------------------------------------
This file is a component of SDPA
Copyright (C) 2004-2013 SDPA Project
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
------------------------------------------------------------- */
/* sdpa_algebra.h
LAPACK+BLAS definitions wrapper
Define macros to mangle the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran.
*/
#ifndef __sdpa_algebra_h__
#define __sdpa_algebra_h__
#define FC_RET_I int
#define FC_RET_D double
#if defined(__APPLE__) // Dirty...
#define FC_FUNC(name,NAME) name ## _
#endif
#define dtrsm_fc FC_FUNC (dtrsm, DTRSM)
#define dsyrk_fc FC_FUNC (dsyrk, DSYRK)
#define dcopy_fc FC_FUNC (dcopy, DCOPY)
#define daxpy_fc FC_FUNC (daxpy, DAXPY)
#define dgemm_fc FC_FUNC (dgemm, DGEMM)
#define dgemv_fc FC_FUNC (dgemv, DGEMV)
#define dscal_fc FC_FUNC (dscal, DSCAL)
#define dtrsv_fc FC_FUNC (dtrsv, DTRSV)
#define dtrmv_fc FC_FUNC (dtrmv, DTRMV)
#define ddot_fc FC_FUNC (ddot, DDOT)
#define dtrmm_fc FC_FUNC (dtrmm, DTRMM)
#define ilaenv_fc FC_FUNC (ilaenv, ILAENV)
#define dsteqr_fc FC_FUNC (dsteqr, DSTEQR)
#define dsyev_fc FC_FUNC (dsyev, DSYEV)
#define dpotrf_fc FC_FUNC (dpotrf, DPORTRF)
extern "C"
{
// BLAS
FC_RET_I dtrsm_fc
(char* side, char* uplo, char* trans, char* diag,
int* M, int* N,
double* alpha,
double* A, int* lda,
double* B, int* ldb, int side_len,
int uplo_len, int trans_len, int diag_len);
FC_RET_I dsyrk_fc
(char* uplo, char* trans, int* N, int* K,
double* alpha,
double* A, int* lda,
double* beta,
double* C, int* ldc, int uplo_len, int trans_len);
FC_RET_I dcopy_fc
(int* N,
double* X, int* incX,
double* Y, int* incY);
FC_RET_I daxpy_fc
(int* N,
double* alpha,
double* X, int* incX,
double* Y, int* incY);
FC_RET_I dgemm_fc
(char* transA, char* transB, int* M, int* N, int* K,
double* alpha,
double* A, int* lda,
double* B, int* ldb,
double* beta,
double* C, int* ldc, int transA_len, int transB_len);
FC_RET_I dgemv_fc
(char* trans, int* M, int* N,
double* alpha,
double* A, int* lda,
double* X, int* incX,
double* beta,
double* Y, int* incY, int trans_len);
FC_RET_I dscal_fc
(int* N,
double* alpha,
double* X, int* incX);
FC_RET_I dtrsv_fc
(char* uplo, char* trans, char* diag, int* N,
double* A, int* lda,
double* X, int* incX, int uplo_len,
int trans_len, int diag_len);
FC_RET_I dtrmv_fc
(char* uplo, char *trans, char* diag, int *N,
double *A, int *lda,
double *X, int *incX, int uplo_len, int trans_len, int diag_len);
FC_RET_D ddot_fc
(int* N, double* X, int* incX, double* Y, int* incY);
FC_RET_I dtrmm_fc
(char* side, char* uplo, char* trans, char* diag,
int* M, int* N,
double* alpha,
double* A, int* lda,
double* B, int* ldb, int side_len, int uplo_len,
int trans_len, int diag_len);
// LAPACK
FC_RET_I ilaenv_fc
(int *ispec, char *name, char *opts, int *n1,
int *n2, int *n3, int *n4, int name_len, int opts_len);
FC_RET_I dsteqr_fc
(char *compz, int *n, double *d,
double *e, double *z, int *ldz, double *work,
int *info, int compz_len);
FC_RET_I dsyev_fc
(char *jobz, char *uplo, int *n, double *a,
int *lda, double *w, double *work, int *lwork,
int *info, int jobz_len, int uplo_len);
FC_RET_I dpotrf_fc
(char *uplo, int *n, double *a, int *lda,
int *info, int uplo_len);
}
#endif // __sdpa_algebra_h__
|