Do more. Code less. Free software for GPU computing.
<scroll to top>
Enumerations | Functions

Solving linear systems

Linear Algebra

Enumerations

enum  afSolve {
  af_solve_none = 0, af_solve_posdef = 1, af_solve_nonposdef = 2, af_solve_gaussian = 3,
  af_solve_pseudo = 4, af_solve_ctrans = 256, af_solve_trans = 512, af_solve_uppertri = 1024,
  af_solve_lowertri = 2048
}

Functions

array solve (const array &A, const array &B, afSolve options=af_solve_none)
 Solve linear system.

Enumeration Type Documentation

enum afSolve
Enumerator:
af_solve_none 
af_solve_posdef 

A is positive definite.

af_solve_nonposdef 

A is not positive definite.

af_solve_gaussian 

Use Gaussian elimination (fast, cannot be combined with other options)

af_solve_pseudo 

Use pseudo inverse (fast, cannot be combined with other options)

af_solve_ctrans 

Solve A.H() (conjugate transpose)

af_solve_trans 

Solve A.C() (non-conjugate transpose)

af_solve_uppertri 

Solve uppertri(A) (upper triangular system)

af_solve_lowertri 

Solve lowertri(A) (lower triangular system)


Function Documentation

array af::solve ( const array &  A,
const array &  B,
afSolve  options = af_solve_none 
)

Solve linear system.

Uses lu or cholesky for square systems and qr for non-square systems. Double-precision or complex input requires ArrayFire Pro.

Parameters:
[in]Asystem matrix
[in]Bresidual vector or matrix
[in]optionsbitwise combination (see afSolve)
Returns:
x from the linear system A * x = B.
Examples:
examples/misc/lin_algebra.cpp.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines