linalg 1.6.1
A linear algebra library that provides a user-friendly interface to several BLAS and LAPACK routines.
Loading...
Searching...
No Matches
linalg_c_api Module Reference

Provides a C-friendly API to the LINALG library. Notice, all C-API LINALG routines begin with the prefix "la_". More...

Functions/Subroutines

integer(c_int) function la_rank1_update (m, n, alpha, x, y, a, lda)
 Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array. More...
 
integer(c_int) function la_rank1_update_cmplx (m, n, alpha, x, y, a, lda)
 Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array. More...
 
integer(c_int) function la_trace (m, n, a, lda, rst)
 Computes the trace of a matrix (the sum of the main diagonal elements). More...
 
integer(c_int) function la_trace_cmplx (m, n, a, lda, rst)
 Computes the trace of a matrix (the sum of the main diagonal elements). More...
 
integer(c_int) function la_mtx_mult (transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
 Computes the matrix operation C = alpha * op(A) * op(B) + beta * C. More...
 
integer(c_int) function la_mtx_mult_cmplx (opa, opb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
 Computes the matrix operation C = alpha * op(A) * op(B) + beta * C. More...
 
integer(c_int) function la_diag_mtx_mult (lside, transb, m, n, k, alpha, a, b, ldb, beta, c, ldc)
 Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C. More...
 
integer(c_int) function la_diag_mtx_mult_mixed (lside, opb, m, n, k, alpha, a, b, ldb, beta, c, ldc)
 Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C. More...
 
integer(c_int) function la_diag_mtx_mult_cmplx (lside, opb, m, n, k, alpha, a, b, ldb, beta, c, ldc)
 Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C. More...
 
integer(c_int) function la_rank (m, n, a, lda, rnk)
 Computes the rank of a matrix. More...
 
integer(c_int) function la_rank_cmplx (m, n, a, lda, rnk)
 Computes the rank of a matrix. More...
 
integer(c_int) function la_det (n, a, lda, d)
 Computes the determinant of a square matrix. More...
 
integer(c_int) function la_det_cmplx (n, a, lda, d)
 Computes the determinant of a square matrix. More...
 
integer(c_int) function la_tri_mtx_mult (upper, alpha, n, a, lda, beta, b, ldb)
 Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix. More...
 
integer(c_int) function la_tri_mtx_mult_cmplx (upper, alpha, n, a, lda, beta, b, ldb)
 Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix. More...
 
integer(c_int) function la_lu_factor (m, n, a, lda, ipvt)
 Computes the LU factorization of an M-by-N matrix. More...
 
integer(c_int) function la_lu_factor_cmplx (m, n, a, lda, ipvt)
 Computes the LU factorization of an M-by-N matrix. More...
 
integer(c_int) function la_form_lu (n, a, lda, ipvt, u, ldu, p, ldp)
 Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor. More...
 
integer(c_int) function la_form_lu_cmplx (n, a, lda, ipvt, u, ldu, p, ldp)
 Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor. More...
 
integer(c_int) function la_qr_factor (m, n, a, lda, tau)
 Computes the QR factorization of an M-by-N matrix without pivoting. More...
 
integer(c_int) function la_qr_factor_cmplx (m, n, a, lda, tau)
 Computes the QR factorization of an M-by-N matrix without pivoting. More...
 
integer(c_int) function la_qr_factor_pvt (m, n, a, lda, tau, jpvt)
 Computes the QR factorization of an M-by-N matrix with column pivoting. More...
 
integer(c_int) function la_qr_factor_cmplx_pvt (m, n, a, lda, tau, jpvt)
 Computes the QR factorization of an M-by-N matrix with column pivoting. More...
 
integer(c_int) function la_form_qr (fullq, m, n, r, ldr, tau, q, ldq)
 Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. More...
 
integer(c_int) function la_form_qr_cmplx (fullq, m, n, r, ldr, tau, q, ldq)
 Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. More...
 
integer(c_int) function la_form_qr_pvt (fullq, m, n, r, ldr, tau, pvt, q, ldq, p, ldp)
 Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R. More...
 
integer(c_int) function la_form_qr_cmplx_pvt (fullq, m, n, r, ldr, tau, pvt, q, ldq, p, ldp)
 Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R. More...
 
integer(c_int) function la_mult_qr (lside, trans, m, n, k, a, lda, tau, c, ldc)
 Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q). More...
 
integer(c_int) function la_mult_qr_cmplx (lside, trans, m, n, k, a, lda, tau, c, ldc)
 Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q). More...
 
integer(c_int) function la_qr_rank1_update (m, n, q, ldq, r, ldr, u, v)
 Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1. More...
 
integer(c_int) function la_qr_rank1_update_cmplx (m, n, q, ldq, r, ldr, u, v)
 Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1. More...
 
integer(c_int) function la_cholesky_factor (upper, n, a, lda)
 Computes the Cholesky factorization of a symmetric, positive definite matrix. More...
 
integer(c_int) function la_cholesky_factor_cmplx (upper, n, a, lda)
 Computes the Cholesky factorization of a symmetric, positive definite matrix. More...
 
integer(c_int) function la_cholesky_rank1_update (n, r, ldr, u)
 Computes the rank 1 update to a Cholesky factored matrix (upper triangular). More...
 
integer(c_int) function la_cholesky_rank1_update_cmplx (n, r, ldr, u)
 Computes the rank 1 update to a Cholesky factored matrix (upper triangular). More...
 
integer(c_int) function la_cholesky_rank1_downdate (n, r, ldr, u)
 Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular). More...
 
integer(c_int) function la_cholesky_rank1_downdate_cmplx (n, r, ldr, u)
 Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular). More...
 
integer(c_int) function la_svd (m, n, a, lda, s, u, ldu, vt, ldv)
 Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix. More...
 
integer(c_int) function la_svd_cmplx (m, n, a, lda, s, u, ldu, vt, ldv)
 Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix. More...
 
integer(c_int) function la_solve_tri_mtx (lside, upper, trans, nounit, m, n, alpha, a, lda, b, ldb)
 Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix. More...
 
integer(c_int) function la_solve_tri_mtx_cmplx (lside, upper, trans, nounit, m, n, alpha, a, lda, b, ldb)
 Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix. More...
 
integer(c_int) function la_solve_lu (m, n, a, lda, ipvt, b, ldb)
 Solves a system of LU-factored equations. More...
 
integer(c_int) function la_solve_lu_cmplx (m, n, a, lda, ipvt, b, ldb)
 Solves a system of LU-factored equations. More...
 
integer(c_int) function la_solve_qr (m, n, k, a, lda, tau, b, ldb)
 Solves a system of M QR-factored equations of N unknowns where M >= N. More...
 
integer(c_int) function la_solve_qr_cmplx (m, n, k, a, lda, tau, b, ldb)
 Solves a system of M QR-factored equations of N unknowns where M >= N. More...
 
integer(c_int) function la_solve_qr_pvt (m, n, k, a, lda, tau, jpvt, b, ldb)
 Solves a system of M QR-factored equations of N unknowns. More...
 
integer(c_int) function la_solve_qr_cmplx_pvt (m, n, k, a, lda, tau, jpvt, b, ldb)
 Solves a system of M QR-factored equations of N unknowns. More...
 
integer(c_int) function la_solve_cholesky (upper, m, n, a, lda, b, ldb)
 Solves a system of Cholesky factored equations. More...
 
integer(c_int) function la_solve_cholesky_cmplx (upper, m, n, a, lda, b, ldb)
 Solves a system of Cholesky factored equations. More...
 
integer(c_int) function la_solve_least_squares (m, n, k, a, lda, b, ldb)
 Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank. More...
 
integer(c_int) function la_solve_least_squares_cmplx (m, n, k, a, lda, b, ldb)
 Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank. More...
 
integer(c_int) function la_inverse (n, a, lda)
 Computes the inverse of a square matrix. More...
 
integer(c_int) function la_inverse_cmplx (n, a, lda)
 Computes the inverse of a square matrix. More...
 
integer(c_int) function la_pinverse (m, n, a, lda, ainv, ldai)
 Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition. More...
 
integer(c_int) function la_pinverse_cmplx (m, n, a, lda, ainv, ldai)
 Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition. More...
 
integer(c_int) function la_eigen_symm (vecs, n, a, lda, vals)
 Computes the eigenvalues, and optionally the eigenvectors of a real, symmetric matrix. More...
 
integer(c_int) function la_eigen_asymm (vecs, n, a, lda, vals, v, ldv)
 Computes the eigenvalues, and optionally the right eigenvectors of a square matrix. More...
 
integer(c_int) function la_eigen_gen (vecs, n, a, lda, b, ldb, alpha, beta, v, ldv)
 Computes the eigenvalues, and optionally the right eigenvectors of a square matrix assuming the structure of the eigenvalue problem is A*X = lambda*B*X. More...
 
integer(c_int) function la_eigen_cmplx (vecs, n, a, lda, vals, v, ldv)
 Computes the eigenvalues, and optionally the right eigenvectors of a square matrix. More...
 
integer(c_int) function la_sort_eigen (ascend, n, vals, vecs, ldv)
 A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach. More...
 
integer(c_int) function la_sort_eigen_cmplx (ascend, n, vals, vecs, ldv)
 A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach. More...
 

Detailed Description

Provides a C-friendly API to the LINALG library. Notice, all C-API LINALG routines begin with the prefix "la_".

Function/Subroutine Documentation

◆ la_cholesky_factor()

integer(c_int) function linalg_c_api::la_cholesky_factor ( logical(c_bool), intent(in), value  upper,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda 
)

Computes the Cholesky factorization of a symmetric, positive definite matrix.

Parameters
[in]upperSet to true to compute the upper triangular factoriztion A = U**T * U; else, set to false to compute the lower triangular factorzation A = L * L**T.
[in]nThe dimension of matrix A.
[in,out]aOn input, the N-by-N matrix to factor. On output, the factored matrix is returned in either the upper or lower triangular portion of the matrix, dependent upon the value of upper.
[in]ldaThe leading dimension of matrix A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_MATRIX_FORMAT_ERROR: Occurs if a is not positive definite.

Definition at line 1704 of file linalg_c_api.f90.

◆ la_cholesky_factor_cmplx()

integer(c_int) function linalg_c_api::la_cholesky_factor_cmplx ( logical(c_bool), intent(in), value  upper,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda 
)

Computes the Cholesky factorization of a symmetric, positive definite matrix.

Parameters
[in]upperSet to true to compute the upper triangular factoriztion A = U**H * U; else, set to false to compute the lower triangular factorzation A = L * L**H.
[in]nThe dimension of matrix A.
[in,out]aOn input, the N-by-N matrix to factor. On output, the factored matrix is returned in either the upper or lower triangular portion of the matrix, dependent upon the value of upper.
[in]ldaThe leading dimension of matrix A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_MATRIX_FORMAT_ERROR: Occurs if a is not positive definite.

Definition at line 1748 of file linalg_c_api.f90.

◆ la_cholesky_rank1_downdate()

integer(c_int) function linalg_c_api::la_cholesky_rank1_downdate ( integer(c_int), intent(in), value  n,
real(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
real(c_double), dimension(*), intent(inout)  u 
)

Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular).

Parameters
[in]nThe dimension of the matrix.
[in,out]rOn input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.
[in]ldrThe leading dimension of matrix R.
[in,out]uOn input, the N-element update vector U. On output, the rotation sines used to transform R to R1.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldr is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_MATRIX_FORMAT_ERROR: Occurs if the downdated matrix is not positive definite.

Definition at line 1877 of file linalg_c_api.f90.

◆ la_cholesky_rank1_downdate_cmplx()

integer(c_int) function linalg_c_api::la_cholesky_rank1_downdate_cmplx ( integer(c_int), intent(in), value  n,
complex(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
complex(c_double), dimension(*), intent(inout)  u 
)

Computes the rank 1 downdate to a Cholesky factored matrix (upper triangular).

Parameters
[in]nThe dimension of the matrix.
[in,out]rOn input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.
[in]ldrThe leading dimension of matrix R.
[in,out]uOn input, the N-element update vector U. On output, the rotation sines used to transform R to R1.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldr is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_MATRIX_FORMAT_ERROR: Occurs if the downdated matrix is not positive definite.

Definition at line 1921 of file linalg_c_api.f90.

◆ la_cholesky_rank1_update()

integer(c_int) function linalg_c_api::la_cholesky_rank1_update ( integer(c_int), intent(in), value  n,
real(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
real(c_double), dimension(*), intent(inout)  u 
)

Computes the rank 1 update to a Cholesky factored matrix (upper triangular).

Parameters
[in]nThe dimension of the matrix.
[in,out]rOn input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.
[in]ldrThe leading dimension of matrix R.
[in,out]uOn input, the N-element update vector U. On output, the rotation sines used to transform R to R1.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldr is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 1791 of file linalg_c_api.f90.

◆ la_cholesky_rank1_update_cmplx()

integer(c_int) function linalg_c_api::la_cholesky_rank1_update_cmplx ( integer(c_int), intent(in), value  n,
complex(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
complex(c_double), dimension(*), intent(inout)  u 
)

Computes the rank 1 update to a Cholesky factored matrix (upper triangular).

Parameters
[in]nThe dimension of the matrix.
[in,out]rOn input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.
[in]ldrThe leading dimension of matrix R.
[in,out]uOn input, the N-element update vector U. On output, the rotation sines used to transform R to R1.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldr is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 1833 of file linalg_c_api.f90.

◆ la_det()

integer(c_int) function linalg_c_api::la_det ( integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), intent(out)  d 
)

Computes the determinant of a square matrix.

Parameters
nThe dimension of the matrix.
aThe N-by-N matrix. The matrix is overwritten on output.
ldaThe leading dimension of the matrix.
[out]dThe determinant of a.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_ARRAY_SIZE_ERROR: Occurs if any of the input arrays are not sized appropriately.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 666 of file linalg_c_api.f90.

◆ la_det_cmplx()

integer(c_int) function linalg_c_api::la_det_cmplx ( integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), intent(out)  d 
)

Computes the determinant of a square matrix.

Parameters
nThe dimension of the matrix.
aThe N-by-N matrix. The matrix is overwritten on output.
ldaThe leading dimension of the matrix.
[out]dThe determinant of a.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_ARRAY_SIZE_ERROR: Occurs if any of the input arrays are not sized appropriately.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 703 of file linalg_c_api.f90.

◆ la_diag_mtx_mult()

integer(c_int) function linalg_c_api::la_diag_mtx_mult ( logical(c_bool), intent(in), value  lside,
logical(c_bool), intent(in), value  transb,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
real(c_double), intent(in), value  alpha,
real(c_double), dimension(*), intent(in)  a,
real(c_double), dimension(ldb,*), intent(in)  b,
integer(c_int), intent(in), value  ldb,
real(c_double), intent(in), value  beta,
real(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C.

Parameters
lsideSet to true to apply matrix A from the left; else, set to false to apply matrix A from the left.
transSet to true if op(B) == B**T; else, set to false if op(B) == B.
mThe number of rows in the matrix C.
nThe number of columns in the matrix C.
kThe inner dimension of the matrix product A * op(B).
alphaA scalar multiplier.
aA P-element array containing the diagonal elements of matrix A where P = MIN(m, k) if lside is true; else, P = MIN(n, k) if lside is false.
bThe LDB-by-TDB matrix B where (LDB = leading dimension of B, and TDB = trailing dimension of B):
  • lside == true & trans == true: LDB = n, TDB = k
  • lside == true & trans == false: LDB = k, TDB = n
  • lside == false & trans == true: LDB = k, TDB = m
  • lside == false & trans == false: LDB = m, TDB = k
ldbThe leading dimension of matrix B.
betaA scalar multiplier.
cThe m by n matrix C.
ldcThe leading dimension of matrix C.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldb, or ldc are not correct.
  • LA_ARRAY_SIZE_ERROR: Occurs if any of the input array sizes are incorrect.

Definition at line 339 of file linalg_c_api.f90.

◆ la_diag_mtx_mult_cmplx()

integer(c_int) function linalg_c_api::la_diag_mtx_mult_cmplx ( logical(c_bool), intent(in), value  lside,
integer(c_int), intent(in), value  opb,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), intent(in), value  alpha,
complex(c_double), dimension(*), intent(in)  a,
complex(c_double), dimension(ldb,*), intent(in)  b,
integer(c_int), intent(in), value  ldb,
complex(c_double), intent(in), value  beta,
complex(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C.

Parameters
lsideSet to true to apply matrix A from the left; else, set to false to apply matrix A from the left.
opbSet to LA_TRANSPOSE to compute op(B) as a direct transpose of B, set to LA_HERMITIAN_TRANSPOSE to compute op(B) as the Hermitian transpose of B, otherwise, set to NO_OPERATION to compute op(B) as B.
mThe number of rows in the matrix C.
nThe number of columns in the matrix C.
kThe inner dimension of the matrix product A * op(B).
alphaA scalar multiplier.
aA P-element array containing the diagonal elements of matrix A where P = MIN(m, k) if lside is true; else, P = MIN(n, k) if lside is false.
bThe LDB-by-TDB matrix B where (LDB = leading dimension of B, and TDB = trailing dimension of B):
  • lside == true & trans == true: LDB = n, TDB = k
  • lside == true & trans == false: LDB = k, TDB = n
  • lside == false & trans == true: LDB = k, TDB = m
  • lside == false & trans == false: LDB = m, TDB = k
ldbThe leading dimension of matrix B.
betaA scalar multiplier.
cThe m by n matrix C.
ldcThe leading dimension of matrix C.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldb, or ldc are not correct.
  • LA_ARRAY_SIZE_ERROR: Occurs if any of the input array sizes are incorrect.

Definition at line 516 of file linalg_c_api.f90.

◆ la_diag_mtx_mult_mixed()

integer(c_int) function linalg_c_api::la_diag_mtx_mult_mixed ( logical(c_bool), intent(in), value  lside,
integer(c_int), intent(in), value  opb,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), intent(in), value  alpha,
real(c_double), dimension(*), intent(in)  a,
complex(c_double), dimension(ldb,*), intent(in)  b,
integer(c_int), intent(in), value  ldb,
complex(c_double), intent(in), value  beta,
complex(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Computes the matrix operation: C = alpha * A * op(B) + beta * C, or C = alpha * op(B) * A + beta * C.

Parameters
lsideSet to true to apply matrix A from the left; else, set to false to apply matrix A from the left.
opbSet to LA_TRANSPOSE to compute op(B) as a direct transpose of B, set to LA_HERMITIAN_TRANSPOSE to compute op(B) as the Hermitian transpose of B, otherwise, set to NO_OPERATION to compute op(B) as B.
mThe number of rows in the matrix C.
nThe number of columns in the matrix C.
kThe inner dimension of the matrix product A * op(B).
alphaA scalar multiplier.
aA P-element array containing the diagonal elements of matrix A where P = MIN(m, k) if lside is true; else, P = MIN(n, k) if lside is false.
bThe LDB-by-TDB matrix B where (LDB = leading dimension of B, and TDB = trailing dimension of B):
  • lside == true & trans == true: LDB = n, TDB = k
  • lside == true & trans == false: LDB = k, TDB = n
  • lside == false & trans == true: LDB = k, TDB = m
  • lside == false & trans == false: LDB = m, TDB = k
ldbThe leading dimension of matrix B.
betaA scalar multiplier.
cThe m by n matrix C.
ldcThe leading dimension of matrix C.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldb, or ldc are not correct.
  • LA_ARRAY_SIZE_ERROR: Occurs if any of the input array sizes are incorrect.

Definition at line 428 of file linalg_c_api.f90.

◆ la_eigen_asymm()

integer(c_int) function linalg_c_api::la_eigen_asymm ( logical(c_bool), intent(in), value  vecs,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(out)  vals,
complex(c_double), dimension(ldv,*), intent(out)  v,
integer(c_int), intent(in), value  ldv 
)

Computes the eigenvalues, and optionally the right eigenvectors of a square matrix.

Parameters
[in]vecsSet to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues.
[in]nThe dimension of the matrix.
[in,out]aOn input, the N-by-N matrix on which to operate. On output, the contents of this matrix are overwritten.
[in]ldaThe leading dimension of matrix A.
[out]valsAn N-element array containing the eigenvalues of the matrix. The eigenvalues are not sorted.
[out]vAn N-by-N matrix where the right eigenvectors will be written (one per column).
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda or ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs if the algorithm failed to converge.

Definition at line 2891 of file linalg_c_api.f90.

◆ la_eigen_cmplx()

integer(c_int) function linalg_c_api::la_eigen_cmplx ( logical(c_bool), intent(in), value  vecs,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(out)  vals,
complex(c_double), dimension(ldv,*), intent(out)  v,
integer(c_int), intent(in), value  ldv 
)

Computes the eigenvalues, and optionally the right eigenvectors of a square matrix.

Parameters
[in]vecsSet to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues.
[in]nThe dimension of the matrix.
[in,out]aOn input, the N-by-N matrix on which to operate. On output, the contents of this matrix are overwritten.
[in]ldaThe leading dimension of matrix A.
[out]valsAn N-element array containing the eigenvalues of the matrix. The eigenvalues are not sorted.
[out]vAn N-by-N matrix where the right eigenvectors will be written (one per column).
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda or ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs if the algorithm failed to converge.

Definition at line 3026 of file linalg_c_api.f90.

◆ la_eigen_gen()

integer(c_int) function linalg_c_api::la_eigen_gen ( logical(c_bool), intent(in), value  vecs,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb,
complex(c_double), dimension(*), intent(out)  alpha,
real(c_double), dimension(*), intent(out)  beta,
complex(c_double), dimension(ldv,*), intent(out)  v,
integer(c_int), intent(in), value  ldv 
)

Computes the eigenvalues, and optionally the right eigenvectors of a square matrix assuming the structure of the eigenvalue problem is A*X = lambda*B*X.

Parameters
[in]vecsSet to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues.
[in]nThe dimension of the matrix.
[in,out]aOn input, the N-by-N matrix A. On output, the contents of this matrix are overwritten.
[in]ldaThe leading dimension of matrix A.
[in,out]bOn input, the N-by-N matrix B. On output, the contents of this matrix are overwritten.
[in]ldbThe leading dimension of matrix B.
[out]alphaAn N-element array that, if beta is not supplied, contains the eigenvalues. If beta is supplied however, the eigenvalues must be computed as ALPHA / BETA. This however, is not as trivial as it seems as it is entirely possible, and likely, that ALPHA / BETA can overflow or underflow. With that said, the values in ALPHA will always be less than and usually comparable with the NORM(A).
[out]betaAn optional N-element array that if provided forces alpha to return the numerator, and this array contains the denominator used to determine the eigenvalues as ALPHA / BETA. If used, the values in this array will always be less than and usually comparable with the NORM(B).
[out]vAn N-by-N matrix where the right eigenvectors will be written (one per column).
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda or ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs if the algorithm failed to converge.

Definition at line 2964 of file linalg_c_api.f90.

◆ la_eigen_symm()

integer(c_int) function linalg_c_api::la_eigen_symm ( logical(c_bool), intent(in), value  vecs,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(out)  vals 
)

Computes the eigenvalues, and optionally the eigenvectors of a real, symmetric matrix.

Parameters
[in]vecsSet to true to compute the eigenvectors as well as the eigenvalues; else, set to false to just compute the eigenvalues.
[in]nThe dimension of the matrix.
[in,out]aOn input, the N-by-N symmetric matrix on which to operate. On output, and if vecs is set to true, the matrix will contain the eigenvectors (one per column) corresponding to each eigenvalue in vals. If vecs is set to false, the lower triangular portion of the matrix is overwritten.
[in]ldaThe leading dimension of matrix A.
[out]valsAn N-element array that will contain the eigenvalues sorted into ascending order.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs if the algorithm failed to converge.

Definition at line 2842 of file linalg_c_api.f90.

◆ la_form_lu()

integer(c_int) function linalg_c_api::la_form_lu ( integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), dimension(*), intent(in)  ipvt,
real(c_double), dimension(ldu,*), intent(out)  u,
integer(c_int), intent(in), value  ldu,
real(c_double), dimension(ldp,*), intent(out)  p,
integer(c_int), intent(in), value  ldp 
)

Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor.

Parameters
nThe dimension of the input matrix.
[in,out]aOn input, the N-by-N matrix as output by la_lu_factor. On output, the N-by-N lower triangular matrix L.
ldaThe leading dimension of a.
ipvtThe N-element pivot array as output by la_lu_factor.
[out]uAn N-by-N matrix where the U matrix will be written.
lduThe leading dimension of u.
[out]pAn N-by-N matrix where the row permutation matrix will be written.
ldpThe leading dimension of p.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, ldu, or ldp is not correct.

Definition at line 930 of file linalg_c_api.f90.

◆ la_form_lu_cmplx()

integer(c_int) function linalg_c_api::la_form_lu_cmplx ( integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), dimension(*), intent(in)  ipvt,
complex(c_double), dimension(ldu,*), intent(out)  u,
integer(c_int), intent(in), value  ldu,
real(c_double), dimension(ldp,*), intent(out)  p,
integer(c_int), intent(in), value  ldp 
)

Extracts the L, U, and P matrices from the LU factorization output from la_lu_factor.

Parameters
nThe dimension of the input matrix.
[in,out]aOn input, the N-by-N matrix as output by la_lu_factor. On output, the N-by-N lower triangular matrix L.
ldaThe leading dimension of a.
ipvtThe N-element pivot array as output by la_lu_factor.
[out]uAn N-by-N matrix where the U matrix will be written.
lduThe leading dimension of u.
[out]pAn N-by-N matrix where the row permutation matrix will be written.
ldpThe leading dimension of p.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, ldu, or ldp is not correct.

Definition at line 970 of file linalg_c_api.f90.

◆ la_form_qr()

integer(c_int) function linalg_c_api::la_form_qr ( logical(c_bool), intent(in), value  fullq,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
real(c_double), dimension(*), intent(in)  tau,
real(c_double), dimension(ldq,*), intent(out)  q,
integer(c_int), intent(in), value  ldq 
)

Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm.

Parameters
[in]fullqSet to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0].
[in]mThe number of rows in R.
[in]nThe number of columns in R.
[in,out]rOn input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R.
[in]ldrThe leading dimension of matrix R.
[in]tauA MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r.
[out]qAn M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N.
[in]ldqThe leading dimension of matrix Q.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1222 of file linalg_c_api.f90.

◆ la_form_qr_cmplx()

integer(c_int) function linalg_c_api::la_form_qr_cmplx ( logical(c_bool), intent(in), value  fullq,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
complex(c_double), dimension(*), intent(in)  tau,
complex(c_double), dimension(ldq,*), intent(out)  q,
integer(c_int), intent(in), value  ldq 
)

Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm.

Parameters
[in]fullqSet to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0].
[in]mThe number of rows in R.
[in]nThe number of columns in R.
[in,out]rOn input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R.
[in]ldrThe leading dimension of matrix R.
[in]tauA MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r.
[out]qAn M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N.
[in]ldqThe leading dimension of matrix Q.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1280 of file linalg_c_api.f90.

◆ la_form_qr_cmplx_pvt()

integer(c_int) function linalg_c_api::la_form_qr_cmplx_pvt ( logical(c_bool), intent(in), value  fullq,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
complex(c_double), dimension(*), intent(in)  tau,
integer(c_int), dimension(*), intent(in)  pvt,
complex(c_double), dimension(ldq,*), intent(out)  q,
integer(c_int), intent(in), value  ldq,
complex(c_double), dimension(ldp,*), intent(out)  p,
integer(c_int), intent(in), value  ldp 
)

Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R.

Parameters
[in]fullqSet to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0].
[in]mThe number of rows in R.
[in]nThe number of columns in R.
[in,out]rOn input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R.
[in]ldrThe leading dimension of matrix R.
[in]tauA MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r.
[in]pvtAn N-element array containing the pivot information from the QR factorization.
[out]qAn M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N.
[in]ldqThe leading dimension of matrix Q.
[out]pAn N-by-N matrix where the pivot matrix P will be written.
[in]ldpThe leading dimension of matrix P.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1410 of file linalg_c_api.f90.

◆ la_form_qr_pvt()

integer(c_int) function linalg_c_api::la_form_qr_pvt ( logical(c_bool), intent(in), value  fullq,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
real(c_double), dimension(*), intent(in)  tau,
integer(c_int), dimension(*), intent(in)  pvt,
real(c_double), dimension(ldq,*), intent(out)  q,
integer(c_int), intent(in), value  ldq,
real(c_double), dimension(ldp,*), intent(out)  p,
integer(c_int), intent(in), value  ldp 
)

Forms the full M-by-M orthogonal matrix Q from the elementary reflectors returned by the base QR factorization algorithm. This routine also inflates the pivot array into an N-by-N matrix P such that A * P = Q * R.

Parameters
[in]fullqSet to true to always return the full Q matrix; else, set to false, and in the event that M > N, Q may be supplied as M-by-N, and therefore only return the useful submatrix Q1 (Q = [Q1, Q2]) as the factorization can be written as Q * R = [Q1, Q2] * [R1; 0].
[in]mThe number of rows in R.
[in]nThe number of columns in R.
[in,out]rOn input, the M-by-N factored matrix as returned by the QR factorization routine. On output, the upper triangular matrix R.
[in]ldrThe leading dimension of matrix R.
[in]tauA MIN(M, N)-element array containing the scalar factors of each elementary reflector defined in r.
[in]pvtAn N-element array containing the pivot information from the QR factorization.
[out]qAn M-by-M matrix where the full Q matrix will be written. In the event that fullq is set to false, and M > N, this matrix need only by M-by-N.
[in]ldqThe leading dimension of matrix Q.
[out]pAn N-by-N matrix where the pivot matrix P will be written.
[in]ldpThe leading dimension of matrix P.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1344 of file linalg_c_api.f90.

◆ la_inverse()

integer(c_int) function linalg_c_api::la_inverse ( integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda 
)

Computes the inverse of a square matrix.

Parameters
[in]nThe dimension of matrix A.
[in,out]aOn input, the N-by-N matrix to invert. On output, the inverted matrix.
[in]ldaThe leading dimension of matrix A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_SINGULAR_MATRIX_ERROR: Occurs if the input matrix is singular.

Definition at line 2671 of file linalg_c_api.f90.

◆ la_inverse_cmplx()

integer(c_int) function linalg_c_api::la_inverse_cmplx ( integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda 
)

Computes the inverse of a square matrix.

Parameters
[in]nThe dimension of matrix A.
[in,out]aOn input, the N-by-N matrix to invert. On output, the inverted matrix.
[in]ldaThe leading dimension of matrix A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_SINGULAR_MATRIX_ERROR: Occurs if the input matrix is singular.

Definition at line 2708 of file linalg_c_api.f90.

◆ la_lu_factor()

integer(c_int) function linalg_c_api::la_lu_factor ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), dimension(*), intent(out)  ipvt 
)

Computes the LU factorization of an M-by-N matrix.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix on which to operate. On output, the LU factored matrix in the form [L\U] where the unit diagonal elements of L are not stored.
ldaThe leading dimension of matrix A.
[out]ipvtAn MIN(M, N)-element array used to track row-pivot operations. The array stored pivot information such that row I is interchanged with row IPVT(I).
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_SINGULAR_MATRIX_ERROR: Occurs as a warning if a is found to be singular.

Definition at line 834 of file linalg_c_api.f90.

◆ la_lu_factor_cmplx()

integer(c_int) function linalg_c_api::la_lu_factor_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), dimension(*), intent(out)  ipvt 
)

Computes the LU factorization of an M-by-N matrix.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix on which to operate. On output, the LU factored matrix in the form [L\U] where the unit diagonal elements of L are not stored.
ldaThe leading dimension of matrix A.
[out]ipvtAn MIN(M, N)-element array used to track row-pivot operations. The array stored pivot information such that row I is interchanged with row IPVT(I).
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_SINGULAR_MATRIX_ERROR: Occurs as a warning if a is found to be singular.

Definition at line 881 of file linalg_c_api.f90.

◆ la_mtx_mult()

integer(c_int) function linalg_c_api::la_mtx_mult ( logical(c_bool), intent(in), value  transa,
logical(c_bool), intent(in), value  transb,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
real(c_double), intent(in), value  alpha,
real(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(ldb,*), intent(in)  b,
integer(c_int), intent(in), value  ldb,
real(c_double), intent(in), value  beta,
real(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Computes the matrix operation C = alpha * op(A) * op(B) + beta * C.

Parameters
transaSet to true to compute op(A) as the transpose of A; else, set to false to compute op(A) as A.
transbSet to true to compute op(B) as the transpose of B; else, set to false to compute op(B) as B.
mThe number of rows in c.
nThe number of columns in c.
kThe interior dimension of the product a and b.
alphaA scalar multiplier.
aIf transa is true, this matrix must be k by m; else, if transa is false, this matrix must be m by k.
ldaThe leading dimension of matrix a.
bIf transb is true, this matrix must be n by k; else, if transb is false, this matrix must be k by n.
ldbThe leading dimension of matrix b.
betaA scalar multiplier.
cThe m by n matrix C.
ldcThe leading dimension of matrix c.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, ldb, or ldc are not correct.

Definition at line 183 of file linalg_c_api.f90.

◆ la_mtx_mult_cmplx()

integer(c_int) function linalg_c_api::la_mtx_mult_cmplx ( integer(c_int), intent(in), value  opa,
integer(c_int), intent(in), value  opb,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), intent(in), value  alpha,
complex(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(ldb,*), intent(in)  b,
integer(c_int), intent(in), value  ldb,
complex(c_double), intent(in), value  beta,
complex(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Computes the matrix operation C = alpha * op(A) * op(B) + beta * C.

Parameters
opaSet to LA_TRANSPOSE to compute op(A) as a direct transpose of A, set to LA_HERMITIAN_TRANSPOSE to compute op(A) as the Hermitian transpose of A, otherwise, set to NO_OPERATION to compute op(A) as A.
opbSet to LA_TRANSPOSE to compute op(B) as a direct transpose of B, set to LA_HERMITIAN_TRANSPOSE to compute op(B) as the Hermitian transpose of B, otherwise, set to NO_OPERATION to compute op(B) as B.
mThenumber of rows in c.
nThe number of columns in c.
kThe interior dimension of the product a and b.
alphaA scalar multiplier.
aIf opa is LA_TRANSPOSE or LA_HERMITIAN_TRANSPOSE, this matrix must be k by m; else, this matrix must be m by k.
ldaThe leading dimension of matrix a.
bIf opb is LA_TRANSPOSE or LA_HERMITIAN_TRANSPOSE, this matrix must be n by k; else, this matrix must be k by n.
ldbThe leading dimension of matrix b.
betaA scalar multiplier.
cThe m by n matrix C.
ldcThe leading dimension of matrix c.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, ldb, or ldc are not correct.

Definition at line 254 of file linalg_c_api.f90.

◆ la_mult_qr()

integer(c_int) function linalg_c_api::la_mult_qr ( logical(c_bool), intent(in), value  lside,
logical(c_bool), intent(in), value  trans,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(in)  tau,
real(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q).

Parameters
[in]lsideSet to true to apply Q or Q**T from the left; else, set to false to apply Q or Q**T from the right.
[in]transSet to true to apply Q**T; else, set to false.
[in]mThe number of rows in matrix C.
[in]nThe number of columns in matrix C.
[in]kThe number of elementary reflectors whose product defines the matrix Q.
[in]aOn input, an LDA-by-K matrix containing the elementary reflectors output from the QR factorization. If lside is set to true, LDA = M, and M >= K >= 0; else, if lside is set to false, LDA = N, and N >= K >= 0. Notice, the contents of this matrix are restored on exit.
[in]ldaThe leading dimension of matrix A.
[in]tauA K-element array containing the scalar factors of each elementary reflector defined in a.
[in,out]cOn input, the M-by-N matrix C. On output, the product of the orthogonal matrix Q and the original matrix C.
[in]ldcTHe leading dimension of matrix C.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1473 of file linalg_c_api.f90.

◆ la_mult_qr_cmplx()

integer(c_int) function linalg_c_api::la_mult_qr_cmplx ( logical(c_bool), intent(in), value  lside,
logical(c_bool), intent(in), value  trans,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(in)  tau,
complex(c_double), dimension(ldc,*), intent(inout)  c,
integer(c_int), intent(in), value  ldc 
)

Multiplies a general matrix by the orthogonal matrix Q from a QR factorization such that: C = op(Q) * C, or C = C * op(Q).

Parameters
[in]lsideSet to true to apply Q or Q**H from the left; else, set to false to apply Q or Q**H from the right.
[in]transSet to true to apply Q**H; else, set to false.
[in]mThe number of rows in matrix C.
[in]nThe number of columns in matrix C.
[in]kThe number of elementary reflectors whose product defines the matrix Q.
[in]aOn input, an LDA-by-K matrix containing the elementary reflectors output from the QR factorization. If lside is set to true, LDA = M, and M >= K >= 0; else, if lside is set to false, LDA = N, and N >= K >= 0. Notice, the contents of this matrix are restored on exit.
[in]ldaThe leading dimension of matrix A.
[in]tauA K-element array containing the scalar factors of each elementary reflector defined in a.
[in,out]cOn input, the M-by-N matrix C. On output, the product of the orthogonal matrix Q and the original matrix C.
[in]ldcTHe leading dimension of matrix C.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1544 of file linalg_c_api.f90.

◆ la_pinverse()

integer(c_int) function linalg_c_api::la_pinverse ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(ldai,*), intent(out)  ainv,
integer(c_int), intent(in), value  ldai 
)

Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition.

Parameters
[in]mThe number of rows in the matrix. @parma[in] n The number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to invert. The matrix is overwritten on output.
[in]ldaThe leading dimension of matrix A.
[out]ainvThe N-by-M matrix where the pseudo-inverse of a will be written.
[in]ldaiThe leading dimension of matrix AINV.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldai is not correct.

Definition at line 2750 of file linalg_c_api.f90.

◆ la_pinverse_cmplx()

integer(c_int) function linalg_c_api::la_pinverse_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(ldai,*), intent(out)  ainv,
integer(c_int), intent(in), value  ldai 
)

Computes the Moore-Penrose pseudo-inverse of an M-by-N matrix by means of singular value decomposition.

Parameters
[in]mThe number of rows in the matrix. @parma[in] n The number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to invert. The matrix is overwritten on output.
[in]ldaThe leading dimension of matrix A.
[out]ainvThe N-by-M matrix where the pseudo-inverse of a will be written.
[in]ldaiThe leading dimension of matrix AINV.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldai is not correct.

Definition at line 2793 of file linalg_c_api.f90.

◆ la_qr_factor()

integer(c_int) function linalg_c_api::la_qr_factor ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(out)  tau 
)

Computes the QR factorization of an M-by-N matrix without pivoting.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors.
ldaThe leading dimension of matrix A.
[out]tauA MIN(M, N)-element array used to store the scalar factors of the elementary reflectors.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1011 of file linalg_c_api.f90.

◆ la_qr_factor_cmplx()

integer(c_int) function linalg_c_api::la_qr_factor_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(out)  tau 
)

Computes the QR factorization of an M-by-N matrix without pivoting.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors.
ldaThe leading dimension of matrix A.
[out]tauA MIN(M, N)-element array used to store the scalar factors of the elementary reflectors.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1060 of file linalg_c_api.f90.

◆ la_qr_factor_cmplx_pvt()

integer(c_int) function linalg_c_api::la_qr_factor_cmplx_pvt ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(out)  tau,
integer(c_int), dimension(*), intent(inout)  jpvt 
)

Computes the QR factorization of an M-by-N matrix with column pivoting.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors.
ldaThe leading dimension of matrix A.
[out]tauA MIN(M, N)-element array used to store the scalar factors of the elementary reflectors.
[in,out]jpvtOn input, an N-element array that if JPVT(I) .ne. 0, the I-th column of A is permuted to the front of A * P; if JPVT(I) = 0, the I-th column of A is a free column. On output, if JPVT(I) = K, then the I-th column of A * P was the K-th column of A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1167 of file linalg_c_api.f90.

◆ la_qr_factor_pvt()

integer(c_int) function linalg_c_api::la_qr_factor_pvt ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(out)  tau,
integer(c_int), dimension(*), intent(inout)  jpvt 
)

Computes the QR factorization of an M-by-N matrix with column pivoting.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to factor. On output, the elements on and above the diagonal contain the MIN(M, N)-by-N upper trapezoidal matrix R (R is upper triangular if M >= N). The elements below the diagonal, along with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors.
ldaThe leading dimension of matrix A.
[out]tauA MIN(M, N)-element array used to store the scalar factors of the elementary reflectors.
[in,out]jpvtOn input, an N-element array that if JPVT(I) .ne. 0, the I-th column of A is permuted to the front of A * P; if JPVT(I) = 0, the I-th column of A is a free column. On output, if JPVT(I) = K, then the I-th column of A * P was the K-th column of A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1113 of file linalg_c_api.f90.

◆ la_qr_rank1_update()

integer(c_int) function linalg_c_api::la_qr_rank1_update ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(ldq,*), intent(inout)  q,
integer(c_int), intent(in), value  ldq,
real(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
real(c_double), dimension(*), intent(inout)  u,
real(c_double), dimension(*), intent(inout)  v 
)

Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1.

Parameters
[in]mThe number of rows in R.
[in]nThe number of columns in R.
[in,out]qOn input, the original M-by-K orthogonal matrix Q. On output, the updated matrix Q1.
[in]ldqThe leading dimension of matrix Q.
[in,out]rOn input, the M-by-N matrix R. On output, the updated matrix R1.
[in]ldrThe leading dimension of matrix R.
[in,out]uOn input, the M-element U update vector. On output, the original content of the array is overwritten.
[in,out]vOn input, the N-element V update vector. On output, the original content of the array is overwritten.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldq or ldr is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1609 of file linalg_c_api.f90.

◆ la_qr_rank1_update_cmplx()

integer(c_int) function linalg_c_api::la_qr_rank1_update_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(ldq,*), intent(inout)  q,
integer(c_int), intent(in), value  ldq,
complex(c_double), dimension(ldr,*), intent(inout)  r,
integer(c_int), intent(in), value  ldr,
complex(c_double), dimension(*), intent(inout)  u,
complex(c_double), dimension(*), intent(inout)  v 
)

Computes the rank 1 update to an M-by-N QR factored matrix A (M >= N) where A = Q * R, and A1 = A + U * V**T such that A1 = Q1 * R1.

Parameters
[in]mThe number of rows in R.
[in]nThe number of columns in R.
[in,out]qOn input, the original M-by-K orthogonal matrix Q. On output, the updated matrix Q1.
[in]ldqThe leading dimension of matrix Q.
[in,out]rOn input, the M-by-N matrix R. On output, the updated matrix R1.
[in]ldrThe leading dimension of matrix R.
[in,out]uOn input, the M-element U update vector. On output, the original content of the array is overwritten.
[in,out]vOn input, the N-element V update vector. On output, the original content of the array is overwritten.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldq or ldr is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 1659 of file linalg_c_api.f90.

◆ la_rank()

integer(c_int) function linalg_c_api::la_rank ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), intent(out)  rnk 
)

Computes the rank of a matrix.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
aThe M-by-N matrix. The matrix is overwritten as part of this operation.
ldaThe leading dimension of matrix A.
[out]rnkThe rank of a.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs as a warning if the QR iteration process could not converge to a zero value.

Definition at line 588 of file linalg_c_api.f90.

◆ la_rank1_update()

integer(c_int) function linalg_c_api::la_rank1_update ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), intent(in), value  alpha,
real(c_double), dimension(*), intent(in)  x,
real(c_double), dimension(*), intent(in)  y,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda 
)

Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array.

Parameters
[in]mThe number of rows in the matrix.
[in]nThe number of columns in the matrix.
[in]alphaThe scalar multiplier.
[in]xAn M-element array.
[in]yAn N-element array.
[in,out]aOn input, the M-by-N matrix to update. On output, the updated M-by-N matrix.
[in]ldaThe leading dimension of matrix A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.

Definition at line 29 of file linalg_c_api.f90.

◆ la_rank1_update_cmplx()

integer(c_int) function linalg_c_api::la_rank1_update_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), intent(in), value  alpha,
complex(c_double), dimension(*), intent(in)  x,
complex(c_double), dimension(*), intent(in)  y,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda 
)

Performs the rank-1 update to matrix A such that: A = alpha * X * Y**T + A, where A is an M-by-N matrix, alpha is a scalar, X is an M-element array, and N is an N-element array.

Parameters
[in]mThe number of rows in the matrix.
[in]nThe number of columns in the matrix.
[in]alphaThe scalar multiplier.
[in]xAn M-element array.
[in]yAn N-element array.
[in,out]aOn input, the M-by-N matrix to update. On output, the updated M-by-N matrix.
[in]ldaThe leading dimension of matrix A.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.

Definition at line 68 of file linalg_c_api.f90.

◆ la_rank_cmplx()

integer(c_int) function linalg_c_api::la_rank_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), intent(out)  rnk 
)

Computes the rank of a matrix.

Parameters
mThe number of rows in the matrix.
nThe number of columns in the matrix.
aThe M-by-N matrix. The matrix is overwritten as part of this operation.
ldaThe leading dimension of matrix A.
[out]rnkThe rank of a.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs as a warning if the QR iteration process could not converge to a zero value.

Definition at line 628 of file linalg_c_api.f90.

◆ la_solve_cholesky()

integer(c_int) function linalg_c_api::la_solve_cholesky ( logical(c_bool), intent(in), value  upper,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of Cholesky factored equations.

Parameters
[in]upperSet to true if the original matrix A was factored such that A = U**T * U; else, set to false if the factorization of A was A = L**T * L.
[in]mThe number of rows in matrix B.
[in]nThe number of columns in matrix B.
[in]aThe M-by-M Cholesky factored matrix.
[in]ldaThe leading dimension of matrix A.
[in,out]bOn input, the M-by-N right-hand-side matrix B. On output, the M-by-N solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.

Definition at line 2490 of file linalg_c_api.f90.

◆ la_solve_cholesky_cmplx()

integer(c_int) function linalg_c_api::la_solve_cholesky_cmplx ( logical(c_bool), intent(in), value  upper,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of Cholesky factored equations.

Parameters
[in]upperSet to true if the original matrix A was factored such that A = U**T * U; else, set to false if the factorization of A was A = L**T * L.
[in]mThe number of rows in matrix B.
[in]nThe number of columns in matrix B.
[in]aThe M-by-M Cholesky factored matrix.
[in]ldaThe leading dimension of matrix A.
[in,out]bOn input, the M-by-N right-hand-side matrix B. On output, the M-by-N solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.

Definition at line 2531 of file linalg_c_api.f90.

◆ la_solve_least_squares()

integer(c_int) function linalg_c_api::la_solve_least_squares ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank.

Parameters
[in]mThe number of equations (rows in matrix A).
[in]nThe number of unknowns (columns in matrix A).
[in]kThe number of columns in the right-hand-side matrix.
[in,out]aOn input, the M-by-N matrix A. On output, if M >= N, the QR factorization of A in the form as output by qr_factor; else, if M < N, the LQ factorization of A.
[in]ldaThe leading dimension of matrix A.
[in,out]bIf M >= N, the M-by-NRHS matrix B. On output, the first N rows contain the N-by-NRHS solution matrix X. If M < N, an N-by-NRHS matrix with the first M rows containing the matrix B. On output, the N-by-NRHS solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_INVALID_OPERATION_ERROR: Occurs if a is not of full rank.

Definition at line 2579 of file linalg_c_api.f90.

◆ la_solve_least_squares_cmplx()

integer(c_int) function linalg_c_api::la_solve_least_squares_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves the overdetermined or underdetermined system (A*X = B) of M equations of N unknowns using a QR or LQ factorization of the matrix A. Notice, it is assumed that matrix A has full rank.

Parameters
[in]mThe number of equations (rows in matrix A).
[in]nThe number of unknowns (columns in matrix A).
[in]kThe number of columns in the right-hand-side matrix.
[in,out]aOn input, the M-by-N matrix A. On output, if M >= N, the QR factorization of A in the form as output by qr_factor; else, if M < N, the LQ factorization of A.
[in]ldaThe leading dimension of matrix A.
[in,out]bIf M >= N, the M-by-NRHS matrix B. On output, the first N rows contain the N-by-NRHS solution matrix X. If M < N, an N-by-NRHS matrix with the first M rows containing the matrix B. On output, the N-by-NRHS solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_INVALID_OPERATION_ERROR: Occurs if a is not of full rank.

Definition at line 2631 of file linalg_c_api.f90.

◆ la_solve_lu()

integer(c_int) function linalg_c_api::la_solve_lu ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), dimension(*), intent(in)  ipvt,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of LU-factored equations.

Parameters
[in]mThe number of rows in matrix B.
[in]nThe number of columns in matrix B.
[in]aThe M-by-M LU factored matrix.
[in]ldaThe leading dimension of matrix A.
[in]ipvtThe M-element pivot array from the LU factorization.
[in,out]bOn input, the M-by-N right-hand-side. On output, the M-by-N solution.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.

Definition at line 2200 of file linalg_c_api.f90.

◆ la_solve_lu_cmplx()

integer(c_int) function linalg_c_api::la_solve_lu_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
integer(c_int), dimension(*), intent(in)  ipvt,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of LU-factored equations.

Parameters
[in]mThe number of rows in matrix B.
[in]nThe number of columns in matrix B.
[in]aThe M-by-M LU factored matrix.
[in]ldaThe leading dimension of matrix A.
[in]ipvtThe M-element pivot array from the LU factorization.
[in,out]bOn input, the M-by-N right-hand-side. On output, the M-by-N solution.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.

Definition at line 2239 of file linalg_c_api.f90.

◆ la_solve_qr()

integer(c_int) function linalg_c_api::la_solve_qr ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(in)  tau,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of M QR-factored equations of N unknowns where M >= N.

Parameters
[in]mThe number of equations (rows in matrix A).
[in]nThe number of unknowns (columns in matrix A).
[in]kThe number of columns in the right-hand-side matrix.
[in,out]aOn input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored.
[in]ldaThe leading dimension of matrix A.
[in]tauA MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor.
[in,out]bOn input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct, or if m is less than n.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 2285 of file linalg_c_api.f90.

◆ la_solve_qr_cmplx()

integer(c_int) function linalg_c_api::la_solve_qr_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(in)  tau,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of M QR-factored equations of N unknowns where M >= N.

Parameters
[in]mThe number of equations (rows in matrix A).
[in]nThe number of unknowns (columns in matrix A).
[in]kThe number of columns in the right-hand-side matrix.
[in,out]aOn input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored.
[in]ldaThe leading dimension of matrix A.
[in]tauA MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor.
[in,out]bOn input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct, or if m is less than n.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 2336 of file linalg_c_api.f90.

◆ la_solve_qr_cmplx_pvt()

integer(c_int) function linalg_c_api::la_solve_qr_cmplx_pvt ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(*), intent(in)  tau,
integer(c_int), dimension(*), intent(in)  jpvt,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of M QR-factored equations of N unknowns.

Parameters
[in]mThe number of equations (rows in matrix A).
[in]nThe number of unknowns (columns in matrix A).
[in]kThe number of columns in the right-hand-side matrix.
[in,out]aOn input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored.
[in]ldaThe leading dimension of matrix A.
[in]tauA MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor.
[in]jpvtThe N-element array that was used to track the column pivoting operations in the QR factorization.
[in,out]bOn input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 2441 of file linalg_c_api.f90.

◆ la_solve_qr_pvt()

integer(c_int) function linalg_c_api::la_solve_qr_pvt ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  k,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(in)  tau,
integer(c_int), dimension(*), intent(in)  jpvt,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves a system of M QR-factored equations of N unknowns.

Parameters
[in]mThe number of equations (rows in matrix A).
[in]nThe number of unknowns (columns in matrix A).
[in]kThe number of columns in the right-hand-side matrix.
[in,out]aOn input, the M-by-N QR factored matrix as returned by qr_factor. On output, the contents of this matrix are restored.
[in]ldaThe leading dimension of matrix A.
[in]tauA MIN(M, N)-element array containing the scalar factors of the elementary reflectors as returned by qr_factor.
[in]jpvtThe N-element array that was used to track the column pivoting operations in the QR factorization.
[in,out]bOn input, the M-by-K right-hand-side matrix. On output, the first N rows are overwritten by the solution matrix X.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 2387 of file linalg_c_api.f90.

◆ la_solve_tri_mtx()

integer(c_int) function linalg_c_api::la_solve_tri_mtx ( logical(c_bool), intent(in), value  lside,
logical(c_bool), intent(in), value  upper,
logical(c_bool), intent(in), value  trans,
logical(c_bool), intent(in), value  nounit,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), intent(in), value  alpha,
real(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix.

Parameters
[in]lsideSet to true to solve op(A) * X = alpha * B; else, set to false to solve X * op(A) = alpha * B.
[in]upperSet to true if A is an upper triangular matrix; else, set to false if A is a lower triangular matrix.
[in]transSet to true if op(A) = A**T; else, set to false if op(A) = A.
[in]nounitSet to true if A is not a unit-diagonal matrix (ones on every diagonal element); else, set to false if A is a unit-diagonal matrix.
[in]mThe number of rows in matrix B.
[in]nThe number of columns in matrix B.
[in]alphaThe scalar multiplier to B.
[in]aIf lside is true, the M-by-M triangular matrix on which to operate; else, if lside is false, the N-by-N triangular matrix on which to operate.
[in]ldaThe leading dimension of matrix A.
[in,out]bOn input, the M-by-N right-hand-side. On output, the M-by-N solution.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.

Definition at line 2089 of file linalg_c_api.f90.

◆ la_solve_tri_mtx_cmplx()

integer(c_int) function linalg_c_api::la_solve_tri_mtx_cmplx ( logical(c_bool), intent(in), value  lside,
logical(c_bool), intent(in), value  upper,
logical(c_bool), intent(in), value  trans,
logical(c_bool), intent(in), value  nounit,
integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), intent(in), value  alpha,
complex(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Solves one of the matrix equations: op(A) * X = alpha * B, or X * op(A) = alpha * B, where A is a triangular matrix.

Parameters
[in]lsideSet to true to solve op(A) * X = alpha * B; else, set to false to solve X * op(A) = alpha * B.
[in]upperSet to true if A is an upper triangular matrix; else, set to false if A is a lower triangular matrix.
[in]transSet to true if op(A) = A**H; else, set to false if op(A) = A.
[in]nounitSet to true if A is not a unit-diagonal matrix (ones on every diagonal element); else, set to false if A is a unit-diagonal matrix.
[in]mThe number of rows in matrix B.
[in]nThe number of columns in matrix B.
[in]alphaThe scalar multiplier to B.
[in]aIf lside is true, the M-by-M triangular matrix on which to operate; else, if lside is false, the N-by-N triangular matrix on which to operate.
[in]ldaThe leading dimension of matrix A.
[in,out]bOn input, the M-by-N right-hand-side. On output, the M-by-N solution.
[in]ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, or ldb is not correct.

Definition at line 2150 of file linalg_c_api.f90.

◆ la_sort_eigen()

integer(c_int) function linalg_c_api::la_sort_eigen ( logical(c_bool), intent(in), value  ascend,
integer(c_int), intent(in), value  n,
real(c_double), dimension(*), intent(inout)  vals,
real(c_double), dimension(ldv,*), intent(inout)  vecs,
integer(c_int), intent(in), value  ldv 
)

A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach.

Parameters
[in]ascend
[in]nThe number of eigenvalues.
[in,out]valsOn input, an N-element array containing the eigenvalues. On output, the sorted eigenvalues.
[in,out]vecsOn input, an N-by-N matrix containing the eigenvectors associated with vals (one vector per column). On output, the sorted eigenvector matrix.
[in]ldvThe leading dimension of vecs.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 3083 of file linalg_c_api.f90.

◆ la_sort_eigen_cmplx()

integer(c_int) function linalg_c_api::la_sort_eigen_cmplx ( logical(c_bool), intent(in), value  ascend,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(*), intent(inout)  vals,
complex(c_double), dimension(ldv,*), intent(inout)  vecs,
integer(c_int), intent(in), value  ldv 
)

A sorting routine specifically tailored for sorting of eigenvalues and their associated eigenvectors using a quick-sort approach.

Parameters
[in]ascend
[in]nThe number of eigenvalues.
[in,out]valsOn input, an N-element array containing the eigenvalues. On output, the sorted eigenvalues.
[in,out]vecsOn input, an N-by-N matrix containing the eigenvectors associated with vals (one vector per column). On output, the sorted eigenvector matrix.
[in]ldvThe leading dimension of vecs.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.

Definition at line 3128 of file linalg_c_api.f90.

◆ la_svd()

integer(c_int) function linalg_c_api::la_svd ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(out)  s,
real(c_double), dimension(ldu,*), intent(out)  u,
integer(c_int), intent(in), value  ldu,
real(c_double), dimension(ldv,*), intent(out)  vt,
integer(c_int), intent(in), value  ldv 
)

Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix.

Parameters
[in]mThe number of rows in the matrix.
[in]nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to factor. The matrix is overwritten on output.
[in]ldaThe leading dimension of matrix A.
[out]sA MIN(M, N)-element array containing the singular values of a sorted in descending order.
[out]uAn M-by-M matrix where the orthogonal U matrix will be written.
[in]lduThe leading dimension of matrix U.
[out]vtAn N-by-N matrix where the transpose of the right singular vector matrix V.
[in]ldvThe leading dimension of matrix V.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, ldu, or ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs as a warning if the QR iteration process could not converge to a zero value.

Definition at line 1975 of file linalg_c_api.f90.

◆ la_svd_cmplx()

integer(c_int) function linalg_c_api::la_svd_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(inout)  a,
integer(c_int), intent(in), value  lda,
real(c_double), dimension(*), intent(out)  s,
complex(c_double), dimension(ldu,*), intent(out)  u,
integer(c_int), intent(in), value  ldu,
complex(c_double), dimension(ldv,*), intent(out)  vt,
integer(c_int), intent(in), value  ldv 
)

Computes the singular value decomposition of a matrix A. The SVD is defined as: A = U * S * V**T, where U is an M-by-M orthogonal matrix, S is an M-by-N diagonal matrix, and V is an N-by-N orthogonal matrix.

Parameters
[in]mThe number of rows in the matrix.
[in]nThe number of columns in the matrix.
[in,out]aOn input, the M-by-N matrix to factor. The matrix is overwritten on output.
[in]ldaThe leading dimension of matrix A.
[out]sA MIN(M, N)-element array containing the singular values of a sorted in descending order.
[out]uAn M-by-M matrix where the orthogonal U matrix will be written.
[in]lduThe leading dimension of matrix U.
[out]vtAn N-by-N matrix where the transpose of the right singular vector matrix V.
[in]ldvThe leading dimension of matrix V.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda, ldu, or ldv is not correct.
  • LA_OUT_OF_MEMORY_ERROR: Occurs if local memory must be allocated, and there is insufficient memory available.
  • LA_CONVERGENCE_ERROR: Occurs as a warning if the QR iteration process could not converge to a zero value.

Definition at line 2032 of file linalg_c_api.f90.

◆ la_trace()

integer(c_int) function linalg_c_api::la_trace ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
real(c_double), intent(out)  rst 
)

Computes the trace of a matrix (the sum of the main diagonal elements).

Parameters
[in]mThe number of rows in the matrix.
[in]nThe number of columns in the matrix.
[in]aThe M-by-N matrix on which to operate.
[in]ldaThe leading dimension of the matrix.
[out]rstThe results of the operation.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.

Definition at line 103 of file linalg_c_api.f90.

◆ la_trace_cmplx()

integer(c_int) function linalg_c_api::la_trace_cmplx ( integer(c_int), intent(in), value  m,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), intent(out)  rst 
)

Computes the trace of a matrix (the sum of the main diagonal elements).

Parameters
[in]mThe number of rows in the matrix.
[in]nThe number of columns in the matrix.
[in]aThe M-by-N matrix on which to operate.
[in]ldaThe leading dimension of the matrix.
[out]rstThe results of the operation.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda is not correct.

Definition at line 137 of file linalg_c_api.f90.

◆ la_tri_mtx_mult()

integer(c_int) function linalg_c_api::la_tri_mtx_mult ( logical(c_bool), intent(in), value  upper,
real(c_double), intent(in), value  alpha,
integer(c_int), intent(in), value  n,
real(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
real(c_double), intent(in), value  beta,
real(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix.

Parameters
upperSet to true if matrix A is upper triangular, and B = alpha * A**T * A + beta * B is to be calculated; else, set to false if A is lower triangular, and B = alpha * A * A**T + beta * B is to be computed.
alphaA scalar multiplier.
nThe dimension of the matrix.
aThe n by n triangular matrix A. Notice, if upper is true, only the upper triangular portion of this matrix is referenced; else, if upper is false, only the lower triangular portion of this matrix is referenced.
ldaThe leading dimension of matrix A.
betaA scalar multiplier.
bOn input, the n by n matrix B. On output, the n by n resulting matrix.
ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda or ldb are not correct.

Definition at line 750 of file linalg_c_api.f90.

◆ la_tri_mtx_mult_cmplx()

integer(c_int) function linalg_c_api::la_tri_mtx_mult_cmplx ( logical(c_bool), intent(in), value  upper,
complex(c_double), intent(in), value  alpha,
integer(c_int), intent(in), value  n,
complex(c_double), dimension(lda,*), intent(in)  a,
integer(c_int), intent(in), value  lda,
complex(c_double), intent(in), value  beta,
complex(c_double), dimension(ldb,*), intent(inout)  b,
integer(c_int), intent(in), value  ldb 
)

Computes the triangular matrix operation: B = alpha * A**T * A + beta * B, or B = alpha * A * A**T + beta * B, where A is a triangular matrix.

Parameters
upperSet to true if matrix A is upper triangular, and B = alpha * A**T * A + beta * B is to be calculated; else, set to false if A is lower triangular, and B = alpha * A * A**T + beta * B is to be computed.
alphaA scalar multiplier.
nThe dimension of the matrix.
aThe n by n triangular matrix A. Notice, if upper is true, only the upper triangular portion of this matrix is referenced; else, if upper is false, only the lower triangular portion of this matrix is referenced.
ldaThe leading dimension of matrix A.
betaA scalar multiplier.
bOn input, the n by n matrix B. On output, the n by n resulting matrix.
ldbThe leading dimension of matrix B.
Returns
An error code. The following codes are possible.
  • LA_NO_ERROR: No error occurred. Successful operation.
  • LA_INVALID_INPUT_ERROR: Occurs if lda or ldb are not correct.

Definition at line 795 of file linalg_c_api.f90.