#include <stdio.h>
#include <scoplib/macros.h>
#include <scoplib/matrix.h>
Go to the source code of this file.
Classes | |
struct | scoplib_statement |
Typedefs | |
typedef struct scoplib_statement | scoplib_statement_t |
typedef struct scoplib_statement * | scoplib_statement_p |
Functions | |
void | scoplib_statement_print_structure (FILE *, scoplib_statement_p, int) |
void | scoplib_statement_print (FILE *, scoplib_statement_p) |
void | scoplib_statement_print_dot_scop (FILE *, scoplib_statement_p, int, char **, int, char **) |
scoplib_statement_p | scoplib_statement_read (FILE *, int, char ***, int *) |
scoplib_statement_p | scoplib_statement_malloc () |
void | scoplib_statement_free (scoplib_statement_p) |
void | scoplib_statement_add (scoplib_statement_p *, scoplib_statement_p) |
void | scoplib_statement_compact (scoplib_statement_p, int) |
int | scoplib_statement_number (scoplib_statement_p) |
typedef struct scoplib_statement* scoplib_statement_p |
typedef struct scoplib_statement scoplib_statement_t |
void scoplib_statement_add | ( | scoplib_statement_p * | location, | |
scoplib_statement_p | statement | |||
) |
scoplib_statement_add function: This function adds a statement "statement" at the end of the statement list pointed by "location".
location | Address of the first element of the statement list. | |
statement | The statement to add to the list. |
void scoplib_statement_compact | ( | scoplib_statement_p | , | |
int | ||||
) |
void scoplib_statement_free | ( | scoplib_statement_p | statement | ) |
scoplib_statement_free function: This function frees the allocated memory for a scoplib_statement_t structure.
statement | The pointer to the statement we want to free. |
References scoplib_statement::body, scoplib_statement::control_predicates, scoplib_statement::domain, scoplib_statement::exit_predicates, scoplib_statement::iterators, scoplib_statement::nb_iterators, scoplib_statement::next, scoplib_statement::read, scoplib_statement::schedule, scoplib_matrix_free(), scoplib_matrix_list_free(), and scoplib_statement::write.
Referenced by scoplib_scop_free().
scoplib_statement_p scoplib_statement_malloc | ( | ) |
scoplib_statement_malloc function: This function allocates the memory space for a scoplib_statement_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
References scoplib_statement::body, scoplib_statement::control_predicates, scoplib_statement::domain, scoplib_statement::exit_predicates, scoplib_statement::iterators, scoplib_statement::nb_control_predicates, scoplib_statement::nb_exit_predicates, scoplib_statement::nb_iterators, scoplib_statement::next, scoplib_statement::read, scoplib_statement::schedule, scoplib_scop::statement, and scoplib_statement::write.
Referenced by scoplib_scop_dup(), and scoplib_statement_read().
int scoplib_statement_number | ( | scoplib_statement_p | statement | ) |
scoplib_statement_number function: This function returns the number of statements in the statement list provided as parameter.
statement | The first element of the statement list. |
References scoplib_statement::next.
Referenced by scoplib_scop_print_dot_scop_().
void scoplib_statement_print | ( | FILE * | file, | |
scoplib_statement_p | statement | |||
) |
scoplib_statement_print function: This function prints the content of a scoplib_statement_t structure (*statement) into a file (file, possibly stdout).
file | File where informations are printed. | |
statement | The statement whose information have to be printed. |
References scoplib_statement_print_structure().
void scoplib_statement_print_dot_scop | ( | FILE * | file, | |
scoplib_statement_p | statement, | |||
int | nb_parameters, | |||
char ** | parameters, | |||
int | nb_arrays, | |||
char ** | arrays | |||
) |
scoplib_statement_print_dot_scop function: This function prints the content of a scoplib_statement_t structure (*statement) into a file (file, possibly stdout) for the .scop format.
file | File where informations are printed. | |
statement | The statement whose information have to be printed. | |
nb_parameters | The number of parameters in the SCoP. | |
parameters | An array containing all parameters names. | |
nb_arrays | The number of arrays accessed in the SCoP. | |
arrays | An array containing all accessed array names. |
References scoplib_statement::body, scoplib_statement::domain, scoplib_statement::iterators, scoplib_statement::nb_iterators, scoplib_statement::next, scoplib_statement::read, scoplib_statement::schedule, scoplib_matrix_list_print_dot_scop(), scoplib_matrix_print_dot_scop(), SCOPLIB_TYPE_ACCESS, SCOPLIB_TYPE_DOMAIN, SCOPLIB_TYPE_SCATTERING, and scoplib_statement::write.
Referenced by scoplib_scop_print_dot_scop_().
void scoplib_statement_print_structure | ( | FILE * | file, | |
scoplib_statement_p | statement, | |||
int | level | |||
) |
scoplib_statement_print_structure function: Displays a scoplib_statement_t structure (*statement) 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.
file | File where informations are printed. | |
statement | The statement whose information have to be printed. | |
level | Number of spaces before printing, for each line. |
: do it!
References scoplib_statement::body, scoplib_statement::domain, scoplib_statement::iterators, scoplib_statement::nb_iterators, scoplib_statement::next, scoplib_statement::read, scoplib_statement::schedule, scoplib_matrix_list_print_structure(), scoplib_matrix_print_structure(), and scoplib_statement::write.
Referenced by scoplib_scop_print_structure(), and scoplib_statement_print().
scoplib_statement_p scoplib_statement_read | ( | FILE * | file, | |
int | nb_parameters, | |||
char *** | arrays, | |||
int * | nb_arr | |||
) |
scoplib_statement_read function: This function reads a scoplib_statement_t structure from an input stream (possibly stdin).
file | The input stream | |
nb_parameters | The number of global parameters for the program | |
arrays | The array containing names of arrays of the input program | |
nb_arr | The size of the array parameter |
References scoplib_statement::body, scoplib_statement::domain, scoplib_matrix_list::elt, scoplib_statement::iterators, scoplib_statement::nb_iterators, scoplib_matrix::NbColumns, scoplib_statement::read, scoplib_statement::schedule, scoplib_matrix_list_read(), scoplib_matrix_read(), scoplib_matrix_read_arrays(), scoplib_scop_generate_names(), scoplib_statement_malloc(), scoplib_statement_read_int(), scoplib_statement_read_strings(), and scoplib_statement::write.
Referenced by scoplib_scop_read().