Classes | Typedefs | Functions

matrix.h File Reference

#include <stdio.h>
#include <piplib/piplib.h>
Include dependency graph for matrix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  candlmatrixlist

Typedefs

typedef PipMatrix CandlMatrix
typedef struct candlmatrixlist CandlMatrixList

Functions

void candl_matrix_print_structure (FILE *, CandlMatrix *, int)
void candl_matrix_print (FILE *, CandlMatrix *)
void candl_matrix_print_data (FILE *, CandlMatrix *)
void candl_matrix_list_print_structure (FILE *, CandlMatrixList *, int)
void candl_matrix_list_print (FILE *, CandlMatrixList *)
void candl_matrix_free (CandlMatrix *)
void candl_matrix_list_free (CandlMatrixList *)
CandlMatrixcandl_matrix_read (FILE *)
CandlMatrixListcandl_matrix_list_read (FILE *)
CandlMatrixcandl_matrix_malloc (int, int)
CandlMatrixListcandl_matrix_list_malloc ()
CandlMatrixcandl_matrix_violation (CandlMatrix *, CandlMatrix *, CandlMatrix *, int, int)
int candl_matrix_check_point (CandlMatrix *, CandlMatrix *)

Typedef Documentation

typedef PipMatrix CandlMatrix

------ ( ----------------------------------------------------------** )\ CAnDL ** ----- / ) --------------------------------------------------------** ( * ( matrix.h ** ---- #/ --------------------------------------------------------** .-"#'-. First version: december 9th 2005 ** --- |"-.-"| -------------------------------------------------------** | | | | | | ************************************************************* CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *

* Copyright (C) 2005-2008 Cedric Bastoul * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This software is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with software; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * CAnDL, the Chunky Dependence Analyzer * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * * The matrix structure comes directly from PipLib (defined in piplib/piplib.h) which is directly the PolyLib Matrix (defined in polylib/types.h) here is how it looks like (at least in PipLib 1.3.5 version):

struct pipmatrix { unsigned NbRows; // The number of rows (= NbConstraints in Polyhedron). unsigned NbColumns; // The number of columns (= Dimension+2 in Polyhedron). Value **p; // An array of pointers to the beginning of each row. Value *p_Init; // The matrix is stored here, contiguously in memory. int p_Init_size; // Needed to free the memory allocated by mpz_init. } ; typedef struct pipmatrix PipMatrix ;


Function Documentation

int candl_matrix_check_point ( CandlMatrix domain,
CandlMatrix context 
)

candl_matrix_check_point function: This function checks if there is an integral point in the set of constraints, provided a given domain (possibly NULL).

Referenced by candl_dependence_check_domain_is_included(), and candl_dependence_is_loop_carried().

void candl_matrix_free ( CandlMatrix matrix  ) 
void candl_matrix_list_free ( CandlMatrixList list  ) 

candl_matrix_list_free function: This function frees the allocated memory for a CandlMatrixList structure.

  • 11/12/2005: first version.

References candlmatrixlist::matrix, and candlmatrixlist::next.

CandlMatrixList* candl_matrix_list_malloc (  ) 

candl_matrix_list_malloc function: This function allocates the memory space for a CandlMatrixList structure and sets its fields with default values. Then it returns a pointer to the allocated space.

  • 11/12/2005: first version.

References candlmatrixlist::matrix, and candlmatrixlist::next.

void candl_matrix_list_print ( FILE *  file,
CandlMatrixList list 
)

candl_matrix_list_print function: This function prints the content of a CandlMatrixList structure (list) into a file (file, possibly stdout).

  • 11/12/2005: first version.

References candl_matrix_list_print_structure().

void candl_matrix_list_print_structure ( FILE *  ,
CandlMatrixList ,
int   
)
CandlMatrixList* candl_matrix_list_read ( FILE *  file  ) 

cloog_domain_list_read function: This function reads a list of matrices into a file (foo, posibly stdin) and returns a pointer to a CandlMatrixList containing the read information.

  • 11/12/2005: first version (from CLooG 0.14.0's cloog_domain_list_read).

References candl_matrix_read(), CANDL_MAX_STRING, candlmatrixlist::matrix, and candlmatrixlist::next.

CandlMatrix* candl_matrix_malloc ( int  nb_rows,
int  nb_columns 
)

candl_matrix_malloc function: This function allocates the memory space for a CandlMatrix structure and sets its fields with default values. Then it returns a pointer to the allocated space.

  • 09/12/2005: first version.

Referenced by candl_ddv_constant_val(), candl_ddv_create_from_dep(), candl_dependence_build_system(), candl_dependence_check_domain_is_included(), candl_dependence_expand_scalar(), candl_dependence_is_loop_carried(), candl_dependence_read_one_dep(), candl_matrix_violation(), and candl_program_convert_scop().

void candl_matrix_print ( FILE *  file,
CandlMatrix matrix 
)

candl_matrix_print function: This function prints the content of a CandlMatrix structure (matrix) into a file (file, possibly stdout).

  • 09/12/2005: first version (from CLooG 0.14.0).

References candl_matrix_print_structure().

void candl_matrix_print_data ( FILE *  file,
CandlMatrix matrix 
)

candl_matrix_print_data function: This function prints the content of a CandlMatrix data (matrix) into a file (file, possibly stdout).

References CANDL_FMT, and CANDL_print.

Referenced by candl_program_print_candl_file().

void candl_matrix_print_structure ( FILE *  file,
CandlMatrix matrix,
int  level 
)

------ ( ----------------------------------------------------------** )\ CAnDL ** ----- / ) --------------------------------------------------------** ( * ( matrix.c ** ---- #/ --------------------------------------------------------** .-"#'-. First version: december 9th 2005 ** --- |"-.-"| -------------------------------------------------------** | | | | | | ************************************************************* CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *

* Copyright (C) 2005 Cedric Bastoul * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This software is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with software; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * CAnDL, the Chunky Dependence Analyzer * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * * candl_matrix_print_structure function: Displays a CandlMatrix structure (matrix) into a file (file, possibly stdout) in a way that trends to be understandable without falling in a deep depression or, for the lucky ones, getting a headache... It includes an indentation level (level) in order to work with others print_structure functions.

  • 09/12/2005: first version (from CLooG 0.14.0).

References CANDL_FMT, and CANDL_print.

Referenced by candl_dependence_print_structure(), candl_matrix_list_print_structure(), candl_matrix_print(), candl_program_print_structure(), candl_statement_print_structure(), and candl_violation_print_structure().

CandlMatrix* candl_matrix_read ( FILE *  file  ) 

candl_matrix_read function: This function reads a matrix into a file (foo, posibly stdin) and returns a pointer to a CandlMatrix containing the read informations.

  • 09/12/2005: first version.

Referenced by candl_matrix_list_read(), and candl_program_read().

CandlMatrix* candl_matrix_violation ( CandlMatrix dependence,
CandlMatrix t_source,
CandlMatrix t_target,
int  dimension,
int  nb_par 
)

candl_matrix_violation function : this function builds the constraint system corresponding to a violation of a dependence, for a given transformation couple at a given depth.

  • dependence is the constraint system of a dependence between two statements,
  • t_source is the transformation function for the source statement,
  • t_target is the transformation function for the target statement,
  • dimension is the transformation dimension checked for legality,
  • nb_par is the number of parameters.
  • 13/12/2005: first version (extracted from candl_violation).

References CANDL_assign, CANDL_clear, CANDL_decrement, CANDL_init, candl_matrix_malloc(), CANDL_oppose, CANDL_set_si, and CANDL_subtract.

Referenced by candl_violation().