PIPS
|
#include <stdio.h>
#include <math.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "effects.h"
#include "complexity_ri.h"
#include "ri-util.h"
#include "effects-util.h"
#include "misc.h"
#include "matrice.h"
#include "complexity.h"
Go to the source code of this file.
Macros | |
#define | A(i, j) a[n*i + j] |
comp_matrice.c More... | |
#define | Y(i, j) y[n*i + j] |
Added by AP, March 23rd 93: allows the simulation of a two-dimensional array with a mono-dimensional memory allocation. More... | |
Functions | |
void | lu_decomposition (float *a, int n, int *indx, int *pd) |
comp_matrice.c More... | |
void | lu_back_substitution (float *a, int n, int *indx, float *b) |
void | float_matrice_inversion (float *a, int n, int *indx, int *pd) |
#define A | ( | i, | |
j | |||
) | a[n*i + j] |
matrice inversion for floating point. 20 Oct. 92 L. Zhou
void lu_decomposition(a, n, indx, pd) Given an NxN matrix A, with physical dimension NP, here we give NP the value MAX_CONTROLS_IN_UNSTRUCTURED ( that is 100 ) this routine replaces it by the LU decomposition of a rowwise permutation of itself. A and N are input, A is output INDX is output vector which recoreds the row permutation effected by the partial pivoting; D is out put as +- 1 depending on whether the number of row interchanges was even or odd, respectively.
void lu_back_substitution(a, n, indx, b) Added by AP, March 15th 93
Definition at line 63 of file comp_matrice.c.
#define Y | ( | i, | |
j | |||
) | y[n*i + j] |
Added by AP, March 23rd 93: allows the simulation of a two-dimensional array with a mono-dimensional memory allocation.
Definition at line 196 of file comp_matrice.c.
set up identity matrix
indx | ndx |
pd | d |
Definition at line 198 of file comp_matrice.c.
References A, lu_back_substitution(), lu_decomposition(), malloc(), and Y.
Referenced by unstructured_to_complexity().
back substitution
indx | ndx |
Definition at line 155 of file comp_matrice.c.
Referenced by float_matrice_inversion().
Added by AP, March 15th 93
If using gcc to compile, vv can be declared as vv[n] LZ 29/10/92 float vv[n];
loop over rows to get the implicit scaling information
loopover columns of Crout's method
a | Modif by AP, March 15th 93 float a[n][n]; int indx[n]; |
indx | ndx |
pd | d |
Definition at line 65 of file comp_matrice.c.
References A, fprintf(), MAX_CONTROLS_IN_UNSTRUCTURED, sum(), and user_error.
Referenced by float_matrice_inversion().