M4RI  20140914
Functions
triangular.h File Reference

Triangular system solving with Matrix routines. More...

#include <m4ri/mzd.h>

Go to the source code of this file.

Functions

void mzd_trsm_upper_right (mzd_t const *U, mzd_t *B, const int cutoff)
 Solves X U = B with X and B matrices and U upper triangular. More...
 
void _mzd_trsm_upper_right (mzd_t const *U, mzd_t *B, const int cutoff)
 Solves X U = B with X and B matrices and U upper triangular. More...
 
void mzd_trsm_lower_right (mzd_t const *L, mzd_t *B, const int cutoff)
 Solves X L = B with X and B matrices and L lower triangular. More...
 
void _mzd_trsm_lower_right (mzd_t const *L, mzd_t *B, const int cutoff)
 Solves X L = B with X and B with matrices and L lower triangular. More...
 
void mzd_trsm_lower_left (mzd_t const *L, mzd_t *B, const int cutoff)
 Solves L X = B with X and B matrices and L lower triangular. More...
 
void _mzd_trsm_lower_left (mzd_t const *L, mzd_t *B, const int cutoff)
 Solves L X = B with X and B matrices and L lower triangular. More...
 
void mzd_trsm_upper_left (mzd_t const *U, mzd_t *B, const int cutoff)
 Solves U X = B with X and B matrices and U upper triangular. More...
 
void _mzd_trsm_upper_left (mzd_t const *U, mzd_t *B, const int cutoff)
 Solves U X = B with X and B matrices and U upper triangular. More...
 
mzd_tmzd_trtri_upper (mzd_t *A)
 Invert the upper triangular matrix A by reduction to matrix multiplication. More...
 

Detailed Description

Triangular system solving with Matrix routines.

Author
Clement Pernet cleme.nosp@m.nt.p.nosp@m.ernet.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Function Documentation

void _mzd_trsm_lower_left ( mzd_t const *  L,
mzd_t B,
const int  cutoff 
)

Solves L X = B with X and B matrices and L lower triangular.

X is stored inplace on B.

Parameters
LInput lower triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
void _mzd_trsm_lower_right ( mzd_t const *  L,
mzd_t B,
const int  cutoff 
)

Solves X L = B with X and B with matrices and L lower triangular.

This version assumes that the matrices are at an even position on the m4ri_radix grid and that their dimension is a multiple of m4ri_radix. X is stored inplace on B.

Attention
Note, that the 'right' variants of TRSM are slower than the 'left' variants.
Parameters
LInput lower triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
  |\
  | \
  |  \
  |L00\
  |____\
  |    |\
  |    | \
  |    |  \
  |L10 |L11\
  |____|____\
   _________
  |B0  |B1  |
  |____|____|
void _mzd_trsm_upper_left ( mzd_t const *  U,
mzd_t B,
const int  cutoff 
)

Solves U X = B with X and B matrices and U upper triangular.

X is stored inplace on B.

Parameters
UInput upper triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
void _mzd_trsm_upper_right ( mzd_t const *  U,
mzd_t B,
const int  cutoff 
)

Solves X U = B with X and B matrices and U upper triangular.

X is stored inplace on B.

Attention
Note, that the 'right' variants of TRSM are slower than the 'left' variants.
Parameters
UInput upper triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
  _________
  \U00|   |
   \  |U01|
    \ |   |
     \|___|
      \U11|
       \  |
        \ |
         \|
   _______
  |B0 |B1 |
  |___|___|
void mzd_trsm_lower_left ( mzd_t const *  L,
mzd_t B,
const int  cutoff 
)

Solves L X = B with X and B matrices and L lower triangular.

X is stored inplace on B.

This is the wrapper function including bounds checks. See _mzd_trsm_lower_left() for implementation details.

Parameters
LInput lower triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
void mzd_trsm_lower_right ( mzd_t const *  L,
mzd_t B,
const int  cutoff 
)

Solves X L = B with X and B matrices and L lower triangular.

X is stored inplace on B.

This is the wrapper function including bounds checks. See _mzd_trsm_upper_right() for implementation details.

Attention
Note, that the 'right' variants of TRSM are slower than the 'left' variants.
Parameters
LInput upper triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
void mzd_trsm_upper_left ( mzd_t const *  U,
mzd_t B,
const int  cutoff 
)

Solves U X = B with X and B matrices and U upper triangular.

X is stored inplace on B.

This is the wrapper function including bounds checks. See _mzd_trsm_upper_left() for implementation details.

Parameters
UInput upper triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
void mzd_trsm_upper_right ( mzd_t const *  U,
mzd_t B,
const int  cutoff 
)

Solves X U = B with X and B matrices and U upper triangular.

X is stored inplace on B.

Attention
Note, that the 'right' variants of TRSM are slower than the 'left' variants.

This is the wrapper function including bounds checks. See _mzd_trsm_upper_right() for implementation details.

Parameters
UInput upper triangular matrix.
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion.
mzd_t* mzd_trtri_upper ( mzd_t A)

Invert the upper triangular matrix A by reduction to matrix multiplication.

Parameters
AMatrix to be inverted (overwritten).
Returns
Inverse of A or throws an error