#include <unistd.h>
#include <scoplib/macros.h>
#include <scoplib/matrix.h>
#include <scoplib/statement.h>
#include <scoplib/vector.h>
Go to the source code of this file.
Classes | |
struct | scoplib_scop |
Defines | |
#define | SCOPLIB_RELEASE "0.2.1" |
#define | SCOPLIB_VERSION "64" |
#define | SCOPLIB_INT_T_IS_LONGLONG |
Typedefs | |
typedef struct scoplib_scop | scoplib_scop_t |
typedef struct scoplib_scop * | scoplib_scop_p |
Functions | |
void | scoplib_scop_print_structure (FILE *, scoplib_scop_p, int) |
void | scoplib_scop_print (FILE *, scoplib_scop_p) |
void | scoplib_scop_print_dot_scop (FILE *, scoplib_scop_p) |
void | scoplib_scop_print_dot_scop_options (FILE *file, scoplib_scop_p scop, int options) |
scoplib_scop_p | scoplib_scop_read (FILE *) |
char * | scoplib_scop_tag_content (scoplib_scop_p, char *, char *) |
char * | scoplib_scop_tag_content_from_string (char *, char *, char *) |
scoplib_scop_p | scoplib_scop_malloc () |
void | scoplib_scop_free (scoplib_scop_p) |
scoplib_scop_p | scoplib_scop_dup (scoplib_scop_p) |
void | scoplib_scop_shallow_free (scoplib_scop_p) |
scoplib_scop_p | scoplib_scop_shallow_copy (scoplib_scop_p) |
void | scoplib_scop_normalize_schedule (scoplib_scop_p) |
#define SCOPLIB_INT_T_IS_LONGLONG |
#define SCOPLIB_RELEASE "0.2.1" |
Referenced by scoplib_scop_print_dot_scop_().
#define SCOPLIB_VERSION "64" |
Referenced by scoplib_scop_print_dot_scop_().
typedef struct scoplib_scop* scoplib_scop_p |
typedef struct scoplib_scop scoplib_scop_t |
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 duplicated. |
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.
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(), scoplib_scop_read(), and scoplib_scop_shallow_copy().
void scoplib_scop_normalize_schedule | ( | scoplib_scop_p | scop | ) |
scoplib_scop_normalize_schedule function:
This function normalize the beta part of the 2d+1 schedules
scop | The scop whose information have to be printed. |
References scoplib_statement::nb_iterators, scoplib_matrix::NbColumns, scoplib_matrix::NbRows, scoplib_statement::next, scoplib_matrix::p, scoplib_statement::schedule, SCOPVAL_get_si, SCOPVAL_set_si, and scoplib_scop::statement.
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_().
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.
scoplib_scop_p scoplib_scop_shallow_copy | ( | scoplib_scop_p | scop | ) |
scoplib_scop_shallow_copy function:
This function returns a mixed deep and shallow copy of the input scop. Items in arrays, parameters, stm->iterators and stm->body are not duplicated.
scop | The scop whose information have to be duplicated. |
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_shallow_free | ( | scoplib_scop_p | scop | ) |
scoplib_scop_shallow_free function:
This function frees the allocated memory for a scoplib_scop_t structure, without touching the content of arrays, parameters and iterators fields.
scop | The pointer to the scop we want to free. |
References scoplib_scop::arrays, scoplib_scop::context, scoplib_scop::optiontags, scoplib_scop::parameters, scoplib_matrix_free(), scoplib_statement_shallow_free(), and scoplib_scop::statement.
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().