#pragma once
#include <inttypes.h>
#include "lapack.h"
#define COMPLEX64 lapack_complex_double
#define C_BOOL int32_t
#define C_TRUE 1
#define C_FALSE 0
#define SVD_CODE_A 0
#define SVD_CODE_S 1
#define SVD_CODE_O 2
#define SVD_CODE_N 3
void c_dgesv(const int32_t *n,
const int32_t *nrhs,
double *a,
const int32_t *lda,
int32_t *ipiv,
double *b,
const int32_t *ldb,
int32_t *info);
void c_zgesv(const int32_t *n,
const int32_t *nrhs,
COMPLEX64 *a,
const int32_t *lda,
int32_t *ipiv,
COMPLEX64 *b,
const int32_t *ldb,
int32_t *info);
void c_dpotrf(C_BOOL upper,
const int32_t *n,
double *a,
const int32_t *lda,
int32_t *info);
void c_zpotrf(C_BOOL upper,
const int32_t *n,
COMPLEX64 *a,
const int32_t *lda,
int32_t *info);
void c_dsyev(C_BOOL calc_v,
C_BOOL upper,
const int32_t *n,
double *a,
const int32_t *lda,
double *w,
double *work,
const int32_t *lwork,
int32_t *info);
void c_dgeev(C_BOOL calc_vl,
C_BOOL calc_vr,
const int32_t *n,
double *a,
const int32_t *lda,
double *wr,
double *wi,
double *vl,
const int32_t *ldvl,
double *vr,
const int32_t *ldvr,
double *work,
const int32_t *lwork,
int32_t *info);
void c_zheev(
C_BOOL calc_v,
C_BOOL upper,
int32_t const *n,
COMPLEX64 *a,
int32_t const *lda,
double *w,
COMPLEX64 *work,
int32_t const *lwork,
double *rwork,
int32_t *info);
void c_dgesvd(int32_t jobu_code,
int32_t jobvt_code,
const int32_t *m,
const int32_t *n,
double *a,
const int32_t *lda,
double *s,
double *u,
const int32_t *ldu,
double *vt,
const int32_t *ldvt,
double *work,
const int32_t *lwork,
int32_t *info);
void c_dgetrf(const int32_t *m,
const int32_t *n,
double *a,
const int32_t *lda,
int32_t *ipiv,
int32_t *info);
void c_dgetri(const int32_t *n,
double *a,
const int32_t *lda,
const int32_t *ipiv,
double *work,
const int32_t *lwork,
int32_t *info);
void c_zgetrf(const int32_t *m,
const int32_t *n,
COMPLEX64 *a,
const int32_t *lda,
int32_t *ipiv,
int32_t *info);
void c_zgetri(const int32_t *n,
COMPLEX64 *a,
const int32_t *lda,
const int32_t *ipiv,
COMPLEX64 *work,
const int32_t *lwork,
int32_t *info);