namespace solver

// namespaces

namespace xf::solver::internal
namespace xf::solver::internal_gelinear
namespace xf::solver::internal_gemi
namespace xf::solver::internal_polinear
namespace xf::solver::internal_pomi
namespace xf::solver::internal_trtrs

gelinearsolver

#include "LinearSolver/gelinearsolver.hpp"
template <
    typename T,
    int NMAX,
    int NCU
    >
void gelinearsolver (
    int n,
    T* A,
    int b,
    T* B,
    int lda,
    int ldb,
    int& info
    )

This function solves a system of linear equation with general matrix along with multiple right-hand side vector

\[\begin{equation*} {Ax=B}\end{equation*}\]

where \(A\) is a dense general matrix of size \(n \times n\) , \(x\) is a vector need to be computed, and \(B\) is input vector.

The maximum matrix size supported in FPGA is templated by NMAX.

Parameters:

T data type (support float and double)
NMAX maximum number of rows/columns of input matrix
NCU number of computation unit
n number of rows/cols of matrix A
A input matrix of size \(n \times n\)
b number of columns of matrix B
B input matrix of size \(b \times n\) , and overwritten by the output matrix x
lda leading dimention of input matrix A
ldb leading dimention of input matrix B
info output info (unused)

gematrixinverse

#include "LinearSolver/gematrixinverse.hpp"
template <
    typename T,
    int NMAX,
    int NCU
    >
void gematrixinverse (
    int m,
    T* A,
    int lda,
    int& info
    )

This function computes the inverse matrix of \(A\)

\[\begin{equation*} {A}^{-1}\end{equation*}\]

where \(A\) is a dense general matrix of size \(m \times m\) . The maximum matrix size supported in FPGA is templated by NMAX.

Parameters:

T data type (support float and double)
NMAX maximum number of rows/columns of input matrix
NCU number of computation unit
m number of rows/cols of matrix A
A input matrix of size \(n \times n\)
lda leading dimention of input matrix A
info output info (unused)

gtsv

#include "LinearSolver/gtsv_pcr.hpp"
template <
    typename T,
    unsigned int NMAX,
    unsigned int NCU
    >
int gtsv (
    unsigned int n,
    T* matDiagLow,
    T* matDiag,
    T* matDiagUp,
    T* rhs
    )

Tri-diagonal linear solver. Compute solution to linear system with a tridiagonal matrix. Parallel Cyclic Reduction method.

Parameters:

T data type (support float and double)
NMAX matrix size
NCU number of compute units
matDiagLow lower diagonal of matrix
matDiag diagonal of matrix
matDiagUp upper diagonal of matrix
rhs right-hand side

polinearsolver

#include "LinearSolver/polinearsolver.hpp"
template <
    typename T,
    int NMAX,
    int NCU
    >
void polinearsolver (
    int n,
    T* A,
    int b,
    T* B,
    int lda,
    int ldb,
    int& info
    )

This function solves a system of linear equation with symmetric positive definite (SPD) matrix along with multiple right-hand side vector

\[\begin{equation*} {Ax=B}\end{equation*}\]

where \(A\) is a dense SPD triangular matrix of size \(m \times m\) , \(x\) is a vector need to be computed, and \(B\) is input vector.

The maximum matrix size supported in FPGA is templated by NMAX.

Parameters:

T data type (support float and double)
NMAX maximum number of rows/columns of input matrix
NCU number of computation unit
n number of rows/cols of matrix A
A input matrix of size \(n \times n\)
b number of columns of matrix B
B input matrix of size \(b \times n\) , and overwritten by the output matrix x
lda leading dimention of input matrix A
ldb leading dimention of input matrix B
info output info (unused)

pomatrixinverse

#include "LinearSolver/pomatrixinverse.hpp"
template <
    typename T,
    int NMAX,
    int NCU
    >
void pomatrixinverse (
    int m,
    T* A,
    int lda,
    int& info
    )

This function computes the inverse matrix of \(A\)

\[\begin{equation*} {A}^{-1}\end{equation*}\]

where \(A\) is a dense symmetric positive-definite matrix of size \(m \times m\) . The maximum matrix size supported in FPGA is templated by NMAX.

Parameters:

T data type (support float and double)
NMAX maximum number of rows/columns of input matrix
NCU number of computation unit
m number of rows/cols of matrix A
A input matrix of size \(n \times n\)
lda leading dimention of input matrix A
info output info (unused)

trtrs

#include "LinearSolver/trtrs.hpp"
template <
    typename T,
    int NMAX,
    int NCU
    >
void trtrs (
    char uplo,
    int m,
    T* A,
    int b,
    T* B,
    int lda,
    int ldb,
    int& info
    )

This function solves a system of linear equation with triangular coefficient matrix along with multiple right-hand side vector

\[\begin{equation*} {Ax=B}\end{equation*}\]

where \(A\) is a dense lower or upper triangular matrix of size \(m \times m\) , \(x\) is a vector need to be computed, and \(B\) is input vector.

The maximum matrix size supported in FPGA is templated by NMAX.

Parameters:

T data type (support float and double)
NMAX maximum number of rows/columns of input matrix
NCU number of computation unit
m number of rows/cols of matrix A
A input matrix of size \(n \times n\)
b number of columns of matrix B
B input matrix of size \(b \times n\) , and overwritten by the output matrix x
lda leading dimention of input matrix A
ldb leading dimention of input matrix B
info output info (unused)