Candl  0.6.1
Functions
matrix.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <candl/candl.h>
Include dependency graph for matrix.c:

Functions

void candl_matrix_print_structure (FILE *file, CandlMatrix *matrix, int level)
void candl_matrix_print (FILE *file, CandlMatrix *matrix)
void candl_matrix_print_data (FILE *file, CandlMatrix *matrix)
void candl_matrix_list_print_structure (file, list, level)
void candl_matrix_list_print (FILE *file, CandlMatrixList *list)
void candl_matrix_free (CandlMatrix *matrix)
void candl_matrix_list_free (CandlMatrixList *list)
CandlMatrixcandl_matrix_read (FILE *file)
CandlMatrixListcandl_matrix_list_read (FILE *file)
CandlMatrixcandl_matrix_malloc (int nb_rows, int nb_columns)
CandlMatrixListcandl_matrix_list_malloc ()
CandlMatrixcandl_matrix_violation (CandlMatrix *dependence, CandlMatrix *t_source, CandlMatrix *t_target, int dimension, int nb_par)
int candl_matrix_check_point (CandlMatrix *domain, CandlMatrix *context)

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().

void candl_matrix_free ( CandlMatrix matrix)

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.

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  ,
list  ,
level   
)

candl_matrix_list_print_structure function: Displays a CandlMatrixList structure (list) 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.

  • 11/12/2005: first version.

References candl_matrix_print_structure(), candlmatrixlist::matrix, and candlmatrixlist::next.

Referenced by candl_matrix_list_print().

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(), candl_program_convert_scop(), and is_covering().

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().