SPB Git

Repository Public

CAccelShim.h 1.6 KB 27 lines c

1#ifndef ORIX_CACCEL_SHIM_H2#define ORIX_CACCEL_SHIM_H34// Thin wrappers over Accelerate's LAPACK/BLAS (new interface). All matrices are COLUMN-MAJOR5// with leading dimension equal to the row count. Every function returns the LAPACK `info`6// code (0 = success); workspace is managed internally.78/// QR factorisation of the m×n matrix `a` (overwritten: R in the upper triangle, reflectors below). `tau` has min(m,n) entries.9int orix_dgeqrf(int m, int n, double *a, double *tau);10/// Builds the first n columns of Q (m×n, thin) in place from the output of `orix_dgeqrf`; k = number of reflectors.11int orix_dorgqr(int m, int n, int k, double *a, const double *tau);12/// Thin SVD a = U diag(s) Vt. `a` (m×n) is destroyed; u is m×k, vt is k×n, s has k = min(m,n) entries.13int orix_dgesdd(int m, int n, double *a, double *s, double *u, double *vt);14/// Eigen-decomposition of the symmetric n×n matrix `a` (upper triangle read). On exit `a` holds the15/// eigenvectors in columns and `w` the eigenvalues in ascending order.16int orix_dsyev(int n, double *a, double *w);17/// Cholesky factorisation a = L Lt of a symmetric positive-definite matrix; L is left in the lower triangle.18int orix_dpotrf(int n, double *a);19/// Solves a x = b for nrhs right-hand sides by LU with partial pivoting; `a` is destroyed, `b` (n×nrhs) is replaced by x.20int orix_dgesv(int n, int nrhs, double *a, double *b);21/// In-place inverse of a general n×n matrix by LU.22int orix_dgetri(int n, double *a);23/// c (m×n) = a (m×k) * b (k×n), all column-major.24void orix_dgemm(int m, int n, int k, const double *a, const double *b, double *c);2526#endif27
Files main
Menu

Theme