Candl 0.6.0
Classes | Typedefs | Functions
program.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <candl/matrix.h>
#include <candl/statement.h>
#include <scoplib/scop.h>
Include dependency graph for program.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  candl_program

Typedefs

typedef struct candl_program CandlProgram
typedef struct candl_program candl_program_t
typedef struct candl_programcandl_program_p

Functions

void candl_program_print_structure (FILE *, candl_program_p, int)
void candl_program_print (FILE *, candl_program_p)
void candl_program_print_candl_file (FILE *, candl_program_p)
candl_program_p candl_program_malloc ()
void candl_program_free (candl_program_p)
candl_program_p candl_program_read (FILE *)
candl_program_p candl_program_read_scop (FILE *)
candl_program_p candl_program_convert_scop (scoplib_scop_p, int **)

Typedef Documentation

typedef struct candl_program* candl_program_p
typedef struct candl_program CandlProgram

Function Documentation

candl_program_p candl_program_convert_scop ( scoplib_scop_p  scop,
int **  indices 
)

candl_program_convert_scop function: This function extracts the useful information of a scoplib_scop_t structure to a fresh, independent candl_program_t structure. This function is built only if candl was configured with ScopLib support.

References CANDL_ASSIGNMENT, CANDL_FAIL, CANDL_get_si, candl_matrix_malloc(), candl_program_malloc(), candl_statement_malloc(), candl_program::context, candlstatement::depth, candlstatement::domain, candlstatement::index, candlstatement::label, max, candl_program::nb_statements, candlstatement::read, candlstatement::ref, candl_program::statement, candlstatement::type, and candlstatement::written.

Referenced by candl_program_read_scop().

void candl_program_free ( candl_program_p  program)

candl_program_free function: This function frees the allocated memory for a candl_program_t structure, it recursively frees everything inside.

References candl_matrix_free(), candl_statement_free(), candl_program::context, candl_program::nb_statements, candl_program::scalars_privatizable, candl_program::statement, and candl_program::transformation.

Referenced by main().

candl_program_p candl_program_malloc ( )

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

  • 09/12/2005: first version.

References CANDL_FAIL, candl_program::context, candl_program::nb_statements, candl_program::scalars_privatizable, candl_program::statement, and candl_program::transformation.

Referenced by candl_program_convert_scop(), and candl_program_read().

void candl_program_print ( FILE *  file,
candl_program_p  program 
)

candl_program_print function: This function prints the content of a candl_program_t structure (program) into a file (file, possibly stdout).

References candl_program_print_structure().

Referenced by main().

void candl_program_print_candl_file ( FILE *  file,
candl_program_p  program 
)

candl_program_print function: This function prints a candl_program_t structure (program) into a candl-formatted file (file, possibly stdout).

References candl_matrix_print_data(), candl_program::context, candlstatement::depth, candlstatement::domain, candlstatement::index, candl_program::nb_statements, candlstatement::read, candl_program::statement, and candlstatement::written.

Referenced by main().

void candl_program_print_structure ( FILE *  file,
candl_program_p  program,
int  level 
)

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

* Copyright (C) 2003-2008 Cedric Bastoul * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 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 Lesser 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_program_print_structure function: Displays a candl_program_t structure (program) 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/09/2003: first version.

References candl_matrix_print_structure(), candl_statement_print_structure(), candl_program::context, candl_program::nb_statements, candl_program::statement, and candl_program::transformation.

Referenced by candl_program_print().

candl_program_p candl_program_read ( FILE *  file)

candl_program_read function: This function reads the informations to put in a candl_program_t structure from a file (file, possibly stdin). It returns a pointer to a candl_program_t structure containing the read informations. September 10th 2003: first version.

References CANDL_FAIL, candl_matrix_read(), CANDL_MAX_STRING, candl_program_malloc(), candl_statement_read(), candl_program::context, candl_program::nb_statements, candl_program::statement, and candl_program::transformation.

Referenced by main().

candl_program_p candl_program_read_scop ( FILE *  file)

candl_program_read_scop function: This function reads the informations to put in a candl_program_t structure from a file (file, possibly stdin) following the .scop format. It returns a pointer to a candl_program_t structure containing the read informations. This function is built only if candl was configured with ScopLib support.

References candl_program_convert_scop(), candl_program_scop_get_opt_indices(), and candl_program::nb_statements.

Referenced by main().