solve

Contents

solve#

Solves the system of equations AX=Y, where X is the unknown.

template<typename OpA, typename OpB>
__MATX_INLINE__ auto matx::solve(const OpA &A, const OpB &B)#

Running X = solve(A, B) solves the system A X^T = B^T for an unknown X given the rhs B. The transposition is used so that the different rhs vectors and solutions are stacked by row (another way to think about this is that X and B are presented using column-major storage). Currently, this operation is only implemented for solving a linear system with a very sparse matrix A in CSR or DIA format.

Template Parameters:
  • OpA – Data type of A tensor (sparse)

  • OpB – Data type of B tensor

Parameters:
  • A – A Sparse tensor with system coefficients

  • B – B Dense tensor of known values

Returns:

Operator that produces the output tensor X with the solution

Currently only supported for sparse matrix A, please see Sparse Tensor Type.