votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::accelerate Namespace Reference

LAPACK routines of Apple Accelerate, called directly. More...

Functions

bool LapackAvailable ()
 Whether the routines below can run here (Accelerate build, macOS 13.3+).
int dsyevd (char jobz, char uplo, long n, double *a, long lda, double *w)
int dpotrf (char uplo, long n, double *a, long lda)
 Cholesky factorisation of a symmetric positive definite matrix.
int dpotri (char uplo, long n, double *a, long lda)
 Inverse from the Cholesky factor of dpotrf (one triangle).

Variables

constexpr int kAccelerateUnavailable = -1000

Detailed Description

LAPACK routines of Apple Accelerate, called directly.

With Accelerate, Eigen's LAPACK calls go through LAPACKE, and the LAPACKE the build finds (e.g. Homebrew's) sits on a reference LAPACK and BLAS: single threaded and slow. These wrappers call Accelerate's own LAPACK (the interface of macOS 13.3 and later) instead. They live in a file that does not see lapacke.h, so the two LAPACK declarations never meet.

Column-major double matrices, leading dimension lda. Each function returns the LAPACK info (0 on success), or kAccelerateUnavailable when this build or this macOS has no Accelerate LAPACK; callers then use their other path.

Function Documentation

◆ dpotrf()

int votca::xtp::accelerate::dpotrf ( char uplo,
long n,
double * a,
long lda )

Cholesky factorisation of a symmetric positive definite matrix.

Definition at line 112 of file accelerate_lapack.cc.

◆ dpotri()

int votca::xtp::accelerate::dpotri ( char uplo,
long n,
double * a,
long lda )

Inverse from the Cholesky factor of dpotrf (one triangle).

Definition at line 113 of file accelerate_lapack.cc.

◆ dsyevd()

int votca::xtp::accelerate::dsyevd ( char jobz,
char uplo,
long n,
double * a,
long lda,
double * w )

Eigenvalues (ascending, into w) and, for jobz 'V', eigenvectors (into a) of a symmetric matrix, divide and conquer.

Definition at line 109 of file accelerate_lapack.cc.

◆ LapackAvailable()

bool votca::xtp::accelerate::LapackAvailable ( )

Whether the routines below can run here (Accelerate build, macOS 13.3+).

Definition at line 108 of file accelerate_lapack.cc.

Variable Documentation

◆ kAccelerateUnavailable

int votca::xtp::accelerate::kAccelerateUnavailable = -1000
constexpr

Definition at line 42 of file accelerate_lapack.h.