#include <stdio.h>
#include <piplib/piplib.h>
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 *) |
CandlMatrix * | candl_matrix_read (FILE *) |
CandlMatrixList * | candl_matrix_list_read (FILE *) |
CandlMatrix * | candl_matrix_malloc (int, int) |
CandlMatrixList * | candl_matrix_list_malloc () |
CandlMatrix * | candl_matrix_violation (CandlMatrix *, CandlMatrix *, CandlMatrix *, int, int) |
int | candl_matrix_check_point (CandlMatrix *, CandlMatrix *) |
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 ;
typedef struct candlmatrixlist CandlMatrixList |
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 | ) |
candl_matrix_free function: This function frees the allocated memory for a CandlMatrix structure.
Referenced by candl_dependence_check_domain_is_included(), candl_dependence_expand_scalar(), candl_dependence_free(), candl_dependence_prune_scalar_waw(), candl_dependence_prune_with_privatization(), candl_dependence_system(), candl_program_free(), candl_violation(), and candl_violation_free().
void candl_matrix_list_free | ( | CandlMatrixList * | list | ) |
candl_matrix_list_free function: This function frees the allocated memory for a CandlMatrixList structure.
References candlmatrixlist::matrix, candlmatrixlist::next, and candldependence::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.
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).
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.
References candl_matrix_read(), CANDL_MAX_STRING, candlmatrixlist::matrix, candlmatrixlist::next, and candldependence::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.
Referenced by candl_dependence_build_system(), candl_dependence_check_domain_is_included(), candl_dependence_expand_scalar(), candl_dependence_is_loop_carried(), 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).
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.
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.
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.
References CANDL_assign, CANDL_clear, CANDL_decrement, CANDL_init, candl_matrix_malloc(), CANDL_oppose, CANDL_set_si, and CANDL_subtract.
Referenced by candl_violation().