PIPS
alloc.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include "linear_assert.h"
#include "boolean.h"
#include "arithmetique.h"
#include "matrix.h"
+ Include dependency graph for alloc.c:

Go to the source code of this file.

Functions

Pmatrix matrix_new (int m, int n)
 package matrix More...
 
void matrix_rm (Pmatrix a)
 

Function Documentation

◆ matrix_new()

Pmatrix matrix_new ( int  m,
int  n 
)

package matrix

cproto-generated files

Definition at line 41 of file alloc.c.

42 {
43  Pmatrix a = (Pmatrix) malloc(sizeof(Smatrix));
45  a->number_of_lines = m;
46  a->number_of_columns = n;
47  a->coefficients = (Value *) malloc(sizeof(Value)*((n*m)));
48  return a;
49 }
int Value
#define VALUE_ONE
void * malloc(YYSIZE_T)
package matrice
Definition: matrix-local.h:63
Value * coefficients
Definition: matrix-local.h:67
int number_of_lines
Definition: matrix-local.h:65
int number_of_columns
Definition: matrix-local.h:66
Value denominator
Definition: matrix-local.h:64

References Pmatrix::coefficients, Pmatrix::denominator, malloc(), Pmatrix::number_of_columns, Pmatrix::number_of_lines, and VALUE_ONE.

Referenced by call_rwt(), compute_delay_merged_nest(), compute_delay_tiled_nest(), extract_lattice(), fusion_buffer(), main(), make_reindex(), matrices_to_1D_lattice(), matrix_determinant(), matrix_fscan(), matrix_general_inversion(), matrix_hermite(), matrix_sub_determinant(), matrix_unimodular_inversion(), prepare_reindexing(), region_sc_minimal(), sc_resol_smith(), smith_int(), Tiling2_buffer(), Tiling_buffer_allocation(), transformer_to_1D_lattice(), xml_Connection(), xml_ConstOffset(), xml_LoopOffset(), and xml_Transposition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ matrix_rm()

void matrix_rm ( Pmatrix  a)

Definition at line 52 of file alloc.c.

53 {
54  if (a) {
55  free(a->coefficients);
56  free(a);
57  }
58 }
void free(void *)

References Pmatrix::coefficients, and free().

+ Here is the call graph for this function: