SAF
|
Wrappers for optimised linear algebra routines, utilising CBLAS and LAPACK, and/or SIMD intrinsics. More...
#include "saf_utility_complex.h"
Go to the source code of this file.
Enumerations | |
enum | CONJ_FLAG { NO_CONJ = 1 , CONJ = 2 } |
Whether a vector should be conjugated or not (e.g. More... | |
Functions | |
void | utility_siminv (const float *a, const int len, int *index) |
Single-precision, index of minimum absolute value in a vector, i.e. | |
void | utility_ciminv (const float_complex *a, const int len, int *index) |
Single-precision, complex, index of maximum absolute value in a vector, i.e. | |
void | utility_diminv (const double *a, const int len, int *index) |
Double-precision, index of minimum absolute value in a vector, i.e. | |
void | utility_ziminv (const double_complex *a, const int len, int *index) |
Double-precision, complex, index of maximum absolute value in a vector, i.e. | |
void | utility_simaxv (const float *a, const int len, int *index) |
Single-precision, index of maximum absolute value in a vector, i.e. | |
void | utility_cimaxv (const float_complex *a, const int len, int *index) |
Single-precision, complex, index of maximum absolute value in a vector, i.e. | |
void | utility_dimaxv (const double *a, const int len, int *index) |
Double-precision, index of maximum absolute value in a vector, i.e. | |
void | utility_zimaxv (const double_complex *a, const int len, int *index) |
Double-precision, complex, index of maximum absolute value in a vector, i.e. | |
void | utility_svabs (const float *a, const int len, float *c) |
Single-precision, absolute values of vector elements, i.e. | |
void | utility_cvabs (const float_complex *a, const int len, float *c) |
Single-precision, complex, absolute values of vector elements, i.e. | |
void | utility_svmod (const float *a, const float *b, const int len, float *c) |
Single-precision, modulus of vector elements, i.e. | |
void | utility_svrecip (const float *a, const int len, float *c) |
Single-precision, vector-reciprocal/inversion, i.e. | |
void | utility_cvconj (const float_complex *a, const int len, float_complex *c) |
Single-precision, complex, vector-conjugate, i.e. | |
void | utility_zvconj (const double_complex *a, const int len, double_complex *c) |
Double-precision, complex, vector-conjugate, i.e. | |
void | utility_svvcopy (const float *a, const int len, float *c) |
Single-precision, vector-vector copy, i.e. | |
void | utility_cvvcopy (const float_complex *a, const int len, float_complex *c) |
Single-precision, complex, vector-vector copy, i.e. | |
void | utility_dvvcopy (const double *a, const int len, double *c) |
double-precision, vector-vector copy, i.e. | |
void | utility_zvvcopy (const double_complex *a, const int len, double_complex *c) |
double-precision, complex, vector-vector copy, i.e. | |
void | utility_svvadd (const float *a, const float *b, const int len, float *c) |
Single-precision, vector-vector addition, i.e. | |
void | utility_cvvadd (const float_complex *a, const float_complex *b, const int len, float_complex *c) |
Single-precision, complex, vector-vector addition, i.e. | |
void | utility_dvvadd (const double *a, const double *b, const int len, double *c) |
Double-precision, vector-vector addition, i.e. | |
void | utility_zvvadd (const double_complex *a, const double_complex *b, const int len, double_complex *c) |
Double-precision, complex, vector-vector addition, i.e. | |
void | utility_svvsub (const float *a, const float *b, const int len, float *c) |
Single-precision, vector-vector subtraction, i.e. | |
void | utility_cvvsub (const float_complex *a, const float_complex *b, const int len, float_complex *c) |
Single-precision, complex, vector-vector subtraction, i.e. | |
void | utility_dvvsub (const double *a, const double *b, const int len, double *c) |
Double-precision, vector-vector subtraction, i.e. | |
void | utility_zvvsub (const double_complex *a, const double_complex *b, const int len, double_complex *c) |
Double-precision, complex, vector-vector subtraction, i.e. | |
void | utility_svvmul (const float *a, const float *b, const int len, float *c) |
Single-precision, element-wise vector-vector multiplication i.e. | |
void | utility_cvvmul (const float_complex *a, const float_complex *b, const int len, float_complex *c) |
Single-precision, complex, element-wise vector-vector multiplication i.e. | |
void | utility_svvdot (const float *a, const float *b, const int len, float *c) |
Single-precision, vector-vector dot product, i.e. | |
void | utility_cvvdot (const float_complex *a, const float_complex *b, const int len, CONJ_FLAG flag, float_complex *c) |
Single-precision, complex, vector-vector dot product, i.e. | |
void | utility_svsmul (float *a, const float *s, const int len, float *c) |
Single-precision, multiplies each element in vector 'a' with a scalar 's', i.e. | |
void | utility_cvsmul (float_complex *a, const float_complex *s, const int len, float_complex *c) |
Single-precision, complex, multiplies each element in vector 'a' with a scalar 's', i.e. | |
void | utility_dvsmul (double *a, const double *s, const int len, double *c) |
Double-precision, multiplies each element in vector 'a' with a scalar 's', i.e. | |
void | utility_zvsmul (double_complex *a, const double_complex *s, const int len, double_complex *c) |
Double-precision, complex, multiplies each element in vector 'a' with a scalar 's', i.e. | |
void | utility_svsdiv (const float *a, const float *s, const int len, float *c) |
Single-precision, divides each element in vector 'a' with a scalar 's', i.e. | |
void | utility_svsadd (float *a, const float *s, const int len, float *c) |
Single-precision, adds each element in vector 'a' with a scalar 's', i.e. | |
void | utility_svssub (float *a, const float *s, const int len, float *c) |
Single-precision, subtracts each element in vector 'a' with a scalar 's', i.e. | |
void | utility_ssv2cv_inds (const float *sv, const int *inds, const int len, float *cv) |
Single-precision, sparse-vector to compressed vector given known indices i.e. | |
void | utility_csv2cv_inds (const float_complex *sv, const int *inds, const int len, float_complex *cv) |
Single-precision complex, sparse-vector to compressed vector given known indices. | |
void | utility_dsv2cv_inds (const double *sv, const int *inds, const int len, double *cv) |
Double-precision, sparse-vector to compressed vector given known indices i.e. | |
void | utility_zsv2cv_inds (const double_complex *sv, const int *inds, const int len, double_complex *cv) |
Double-precision complex, sparse-vector to compressed vector given known indices. | |
void | utility_ssvd_create (void **const phWork, int maxDim1, int maxDim2) |
(Optional) Pre-allocate the working struct used by utility_ssvd() | |
void | utility_ssvd_destroy (void **const phWork) |
De-allocate the working struct used by utility_ssvd() | |
void | utility_ssvd (void *const hWork, const float *A, const int dim1, const int dim2, float *U, float *S, float *V, float *sing) |
Singular value decomposition: single precision, i.e. | |
void | utility_csvd_create (void **const phWork, int maxDim1, int maxDim2) |
(Optional) Pre-allocate the working struct used by utility_csvd() | |
void | utility_csvd_destroy (void **const phWork) |
De-allocate the working struct used by utility_csvd() | |
void | utility_csvd (void *const hWork, const float_complex *A, const int dim1, const int dim2, float_complex *U, float_complex *S, float_complex *V, float *sing) |
Singular value decomposition: single precision complex, i.e. | |
void | utility_sseig_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_sseig() | |
void | utility_sseig_destroy (void **const phWork) |
De-allocate the working struct used by utility_sseig() | |
void | utility_sseig (void *const hWork, const float *A, const int dim, int sortDecFLAG, float *V, float *D, float *eig) |
Eigenvalue decomposition of a SYMMETRIC matrix: single precision, i.e. | |
void | utility_cseig_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_cseig() | |
void | utility_cseig_destroy (void **const phWork) |
De-allocate the working struct used by utility_cseig() | |
void | utility_cseig (void *const hWork, const float_complex *A, const int dim, int sortDecFLAG, float_complex *V, float_complex *D, float *eig) |
Eigenvalue decomposition of a SYMMETRIC/HERMITION matrix: single precision complex, i.e. | |
void | utility_ceigmp_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_ceigmp() | |
void | utility_ceigmp_destroy (void **const phWork) |
De-allocate the working struct used by utility_ceigmp() | |
void | utility_ceigmp (void *const hWork, const float_complex *A, const float_complex *B, const int dim, float_complex *VL, float_complex *VR, float_complex *D) |
Computes eigenvalues of a matrix pair using the QZ method, single precision complex, i.e. | |
void | utility_zeigmp_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_zeigmp() | |
void | utility_zeigmp_destroy (void **const phWork) |
De-allocate the working struct used by utility_zeigmp() | |
void | utility_zeigmp (void *const hWork, const double_complex *A, const double_complex *B, const int dim, double_complex *VL, double_complex *VR, double_complex *D) |
Computes eigenvalues of a matrix pair using the QZ method, double precision complex, i.e. | |
void | utility_ceig_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_ceig() | |
void | utility_ceig_destroy (void **const phWork) |
De-allocate the working struct used by utility_ceig() | |
void | utility_ceig (void *const hWork, const float_complex *A, const int dim, float_complex *VL, float_complex *VR, float_complex *D, float_complex *eig) |
Eigenvalue decomposition of a NON-SYMMETRIC matrix: single precision complex, i.e. | |
void | utility_zeig_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_zeig() | |
void | utility_zeig_destroy (void **const phWork) |
De-allocate the working struct used by utility_zeig() | |
void | utility_zeig (void *const hWork, const double_complex *A, const int dim, double_complex *VL, double_complex *VR, double_complex *D, double_complex *eig) |
Eigenvalue decomposition of a NON-SYMMETRIC matrix: double precision complex, i.e. | |
void | utility_sglslv_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_sglslv() | |
void | utility_sglslv_destroy (void **const phWork) |
De-allocate the working struct used by utility_sglslv() | |
void | utility_sglslv (void *const hWork, const float *A, const int dim, float *B, int nCol, float *X) |
General linear solver: single precision, i.e. | |
void | utility_cglslv_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_cglslv() | |
void | utility_cglslv_destroy (void **const phWork) |
De-allocate the working struct used by utility_cglslv() | |
void | utility_cglslv (void *const hWork, const float_complex *A, const int dim, float_complex *B, int nCol, float_complex *X) |
General linear solver: single precision complex, i.e. | |
void | utility_dglslv_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_dglslv() | |
void | utility_dglslv_destroy (void **const phWork) |
De-allocate the working struct used by utility_dglslv() | |
void | utility_dglslv (void *const hWork, const double *A, const int dim, double *B, int nCol, double *X) |
General linear solver: double precision, i.e. | |
void | utility_zglslv_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_zglslv() | |
void | utility_zglslv_destroy (void **const phWork) |
De-allocate the working struct used by utility_zglslv() | |
void | utility_zglslv (void *const hWork, const double_complex *A, const int dim, double_complex *B, int nCol, double_complex *X) |
General linear solver: double precision complex, i.e. | |
void | utility_sglslvt_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_sglslvt() | |
void | utility_sglslvt_destroy (void **const phWork) |
De-allocate the working struct used by utility_sglslvt() | |
void | utility_sglslvt (void *const hWork, const float *A, const int dim, float *B, int nCol, float *X) |
General linear solver (the other way): single precision, i.e. | |
void | utility_sslslv_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_sslslv() | |
void | utility_sslslv_destroy (void **const phWork) |
De-allocate the working struct used by utility_sslslv() | |
void | utility_sslslv (void *const hWork, const float *A, const int dim, float *B, int nCol, float *X) |
Linear solver for SYMMETRIC positive-definate 'A': single precision, i.e. | |
void | utility_cslslv_create (void **const phWork, int maxDim, int maxNCol) |
(Optional) Pre-allocate the working struct used by utility_cslslv() | |
void | utility_cslslv_destroy (void **const phWork) |
De-allocate the working struct used by utility_cslslv() | |
void | utility_cslslv (void *const hWork, const float_complex *A, const int dim, float_complex *B, int nCol, float_complex *X) |
Linear solver for HERMITIAN positive-definate 'A': single precision complex, i.e. | |
void | utility_spinv_create (void **const phWork, int maxDim1, int maxDim2) |
(Optional) Pre-allocate the working struct used by utility_spinv() | |
void | utility_spinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_spinv() | |
void | utility_spinv (void *const hWork, const float *A, const int dim1, const int dim2, float *B) |
General matrix pseudo-inverse (the svd way): single precision, i.e. | |
void | utility_cpinv_create (void **const phWork, int maxDim1, int maxDim2) |
(Optional) Pre-allocate the working struct used by utility_cpinv() | |
void | utility_cpinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_cpinv() | |
void | utility_cpinv (void *const hWork, const float_complex *A, const int dim1, const int dim2, float_complex *B) |
General matrix pseudo-inverse (the svd way): single precision complex, i.e. | |
void | utility_dpinv_create (void **const phWork, int maxDim1, int maxDim2) |
(Optional) Pre-allocate the working struct used by utility_dpinv() | |
void | utility_dpinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_dpinv() | |
void | utility_dpinv (void *const hWork, const double *A, const int dim1, const int dim2, double *B) |
General matrix pseudo-inverse (the svd way): double precision, i.e. | |
void | utility_zpinv_create (void **const phWork, int maxDim1, int maxDim2) |
(Optional) Pre-allocate the working struct used by utility_zpinv() | |
void | utility_zpinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_zpinv() | |
void | utility_zpinv (void *const hWork, const double_complex *A, const int dim1, const int dim2, double_complex *B) |
General matrix pseudo-inverse (the svd way): double precision complex, i.e. | |
void | utility_schol_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_schol() | |
void | utility_schol_destroy (void **const phWork) |
De-allocate the working struct used by utility_schol() | |
void | utility_schol (void *const hWork, const float *A, const int dim, float *X) |
Cholesky factorisation of a symmetric matrix positive-definate matrix: single precision, i.e. | |
void | utility_cchol_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_cchol() | |
void | utility_cchol_destroy (void **const phWork) |
De-allocate the working struct used by utility_cchol() | |
void | utility_cchol (void *const hWork, const float_complex *A, const int dim, float_complex *X) |
Cholesky factorisation of a hermitian positive-definate matrix: single precision complex, i.e. | |
void | utility_sdet_create (void **const phWork, int maxN) |
(Optional) Pre-allocate the working struct used by utility_sdet() | |
void | utility_sdet_destroy (void **const phWork) |
De-allocate the working struct used by utility_sdet() | |
float | utility_sdet (void *const hWork, float *A, int N) |
Determinant of a Matrix, single precision, i,e. | |
void | utility_ddet_create (void **const phWork, int maxN) |
(Optional) Pre-allocate the working struct used by utility_ddet() | |
void | utility_ddet_destroy (void **const phWork) |
De-allocate the working struct used by utility_ddet() | |
double | utility_ddet (void *const hWork, double *A, int N) |
Determinant of a Matrix, double precision, i,e. | |
void | utility_sinv_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_sinv() | |
void | utility_sinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_sinv() | |
void | utility_sinv (void *const hWork, float *A, float *B, const int dim) |
Matrix inversion: single precision, i.e. | |
void | utility_dinv_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_dinv() | |
void | utility_dinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_dinv() | |
void | utility_dinv (void *const hWork, double *A, double *B, const int dim) |
Matrix inversion: double precision, i.e. | |
void | utility_cinv_create (void **const phWork, int maxDim) |
(Optional) Pre-allocate the working struct used by utility_cinv() | |
void | utility_cinv_destroy (void **const phWork) |
De-allocate the working struct used by utility_cinv() | |
void | utility_cinv (void *const hWork, float_complex *A, float_complex *B, const int dim) |
Matrix inversion: double precision complex, i.e. | |
Wrappers for optimised linear algebra routines, utilising CBLAS and LAPACK, and/or SIMD intrinsics.
Definition in file saf_utility_veclib.h.