#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <scoplib/scop.h>
Functions | |
void | scoplib_scop_print_structure (FILE *file, scoplib_scop_p scop, int level) |
void | scoplib_scop_print (FILE *file, scoplib_scop_p scop) |
static void | scoplib_scop_print_dot_scop_ (FILE *file, scoplib_scop_p scop, int castle, int arraystag) |
void | scoplib_scop_print_dot_scop (FILE *file, scoplib_scop_p scop) |
void | scoplib_scop_print_dot_scop_options (FILE *file, scoplib_scop_p scop, int options) |
static char ** | scoplib_scop_read_strings (FILE *file, int nb_strings) |
static int | scoplib_scop_read_int (FILE *file, char **str) |
char ** | scoplib_scop_generate_names (char *seed, int nb) |
char * | scoplib_scop_tag_content (scoplib_scop_p scop, char *tag, char *endtag) |
char * | scoplib_scop_tag_content_from_string (char *str, char *tag, char *endtag) |
scoplib_scop_p | scoplib_scop_read (FILE *file) |
scoplib_scop_p | scoplib_scop_malloc () |
void | scoplib_scop_free (scoplib_scop_p scop) |
scoplib_scop_p | scoplib_scop_dup (scoplib_scop_p scop) |
scoplib_scop_p scoplib_scop_dup | ( | scoplib_scop_p | scop | ) |
scoplib_scop_dup function: This function returns a fresh identical (non shadow) copy of the input scop.
scop | The scop whose information have to be printed. |
References scoplib_scop::arrays, scoplib_statement::body, scoplib_scop::context, scoplib_statement::domain, scoplib_matrix_list::elt, scoplib_statement::iterators, scoplib_scop::nb_arrays, scoplib_statement::nb_iterators, scoplib_scop::nb_parameters, scoplib_statement::next, scoplib_scop::optiontags, scoplib_scop::parameters, scoplib_statement::read, scoplib_statement::schedule, scoplib_matrix_copy(), scoplib_matrix_list_malloc(), scoplib_scop_malloc(), scoplib_statement_malloc(), scoplib_scop::statement, scoplib_scop::usr, and scoplib_statement::write.
void scoplib_scop_free | ( | scoplib_scop_p | scop | ) |
scoplib_scop_free function: This function frees the allocated memory for a scoplib_scop_t structure.
scop | The pointer to the scop we want to free. |
References scoplib_scop::arrays, scoplib_scop::context, scoplib_scop::nb_arrays, scoplib_scop::nb_parameters, scoplib_scop::optiontags, scoplib_scop::parameters, scoplib_matrix_free(), scoplib_statement_free(), and scoplib_scop::statement.
char** scoplib_scop_generate_names | ( | char * | seed, | |
int | nb | |||
) |
scoplib_scop_generate_names function: This function generates an array of size 'nb' of chars of the form "seedXX" where XX goes from 1 to nb.
seed | The template for the created names | |
nb | The number of created items. |
Referenced by scoplib_scop_read(), and scoplib_statement_read().
scoplib_scop_p scoplib_scop_malloc | ( | ) |
scoplib_scop_malloc function: This function allocates the memory space for a scoplib_scop_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
References scoplib_scop::arrays, scoplib_scop::context, scoplib_scop::nb_arrays, scoplib_scop::nb_parameters, scoplib_scop::optiontags, scoplib_scop::parameters, scoplib_scop::statement, and scoplib_scop::usr.
Referenced by scoplib_scop_dup(), and scoplib_scop_read().
void scoplib_scop_print | ( | FILE * | file, | |
scoplib_scop_p | scop | |||
) |
scoplib_scop_print function: This function prints the content of a scoplib_scop_t structure (*scop) into a file (file, possibly stdout).
file | File where informations are printed. | |
scop | The scop whose information have to be printed. |
References scoplib_scop_print_structure().
void scoplib_scop_print_dot_scop | ( | FILE * | file, | |
scoplib_scop_p | scop | |||
) |
scoplib_scop_print_dot_scop function: This function prints the content of a scoplib_scop_t structure (*scop) into a file (file, possibly stdout) for the .scop format.
file | File where informations are printed. | |
scop | The scop whose information have to be printed. |
References scoplib_scop_print_dot_scop_().
static void scoplib_scop_print_dot_scop_ | ( | FILE * | file, | |
scoplib_scop_p | scop, | |||
int | castle, | |||
int | arraystag | |||
) | [static] |
References scoplib_scop::arrays, scoplib_scop::context, scoplib_scop::nb_arrays, scoplib_scop::nb_parameters, scoplib_scop::optiontags, scoplib_scop::parameters, scoplib_matrix_print_dot_scop(), SCOPLIB_RELEASE, scoplib_scop_tag_content(), scoplib_statement_number(), scoplib_statement_print_dot_scop(), SCOPLIB_TYPE_DOMAIN, SCOPLIB_VERSION, and scoplib_scop::statement.
Referenced by scoplib_scop_print_dot_scop(), and scoplib_scop_print_dot_scop_options().
void scoplib_scop_print_dot_scop_options | ( | FILE * | file, | |
scoplib_scop_p | scop, | |||
int | options | |||
) |
scoplib_scop_print_dot_scop_castle function: This function prints the content of a scoplib_scop_t structure (*scop) into a file (file, possibly stdout) for the .scop format, with the castle.
file | File where informations are printed. | |
scop | The scop whose information have to be printed. |
References SCOPLIB_SCOP_PRINT_ARRAYSTAG, SCOPLIB_SCOP_PRINT_CASTLE, and scoplib_scop_print_dot_scop_().
void scoplib_scop_print_structure | ( | FILE * | file, | |
scoplib_scop_p | scop, | |||
int | level | |||
) |
scoplib_scop_print_structure function: Displays a scoplib_scop_t structure (*scop) 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. | |
scop | The scop whose information have to be printed. | |
level | Number of spaces before printing, for each line. |
References scoplib_scop::arrays, scoplib_scop::context, scoplib_scop::nb_arrays, scoplib_scop::nb_parameters, scoplib_scop::parameters, scoplib_matrix_print_structure(), scoplib_statement_print_structure(), and scoplib_scop::statement.
Referenced by scoplib_scop_print().
scoplib_scop_p scoplib_scop_read | ( | FILE * | file | ) |
scoplib_scop_read function: This function reads a scoplib_scop_t structure from an input stream (possibly stdin) corresponding to a scoplib SCoP dump.
file | The input stream |
References scoplib_scop::arrays, scoplib_scop::context, scoplib_scop::nb_arrays, scoplib_scop::nb_parameters, scoplib_matrix::NbColumns, scoplib_matrix::NbRows, scoplib_statement::next, scoplib_scop::optiontags, scoplib_matrix::p, scoplib_scop::parameters, scoplib_statement::read, scoplib_matrix_read(), SCOPLIB_MAX_STRING, scoplib_scop_generate_names(), scoplib_scop_malloc(), scoplib_scop_read_int(), scoplib_scop_read_strings(), scoplib_scop_tag_content(), scoplib_statement_read(), SCOPVAL_get_si, scoplib_scop::statement, and scoplib_statement::write.
static int scoplib_scop_read_int | ( | FILE * | file, | |
char ** | str | |||
) | [static] |
Internal function. Read an int on the input 'file'.
should be placed somewhere else, it's duplicated in statement.c.
References SCOPLIB_MAX_STRING.
Referenced by scoplib_scop_read().
static char** scoplib_scop_read_strings | ( | FILE * | file, | |
int | nb_strings | |||
) | [static] |
Internal function. Read 'nb_strings' strings on the input 'file'.
should be placed somewhere else, it's duplicated in statement.c.
References SCOPLIB_MAX_STRING.
Referenced by scoplib_scop_read().
char* scoplib_scop_tag_content | ( | scoplib_scop_p | scop, | |
char * | tag, | |||
char * | endtag | |||
) |
scoplib_scop_tag_content function: This function returns a freshly allocated string containing the content, in the optional tags section, between the tag 'tag' and the tag 'endtag'. If the tag 'tag' is not found, returns NULL.
References scoplib_scop::optiontags, and scoplib_scop_tag_content_from_string().
Referenced by scoplib_scop_print_dot_scop_(), and scoplib_scop_read().
char* scoplib_scop_tag_content_from_string | ( | char * | str, | |
char * | tag, | |||
char * | endtag | |||
) |
scoplib_scop_tag_content_from_string function: This function returns a freshly allocated string containing the content, in the given string 'str', between the tag 'tag' and the tag 'endtag'. If the tag 'tag' is not found, returns NULL.
Referenced by scoplib_scop_tag_content().