OpenScop
0.9.0
|
Go to the source code of this file.
Data Structures | |
struct | osl_arrays |
Defines | |
#define | OSL_URI_ARRAYS "arrays" |
Typedefs | |
typedef struct osl_arrays | osl_arrays_t |
typedef struct osl_arrays * | osl_arrays_p |
Functions | |
void | osl_arrays_idump (FILE *, osl_arrays_p, int) |
void | osl_arrays_dump (FILE *, osl_arrays_p) |
char * | osl_arrays_sprint (osl_arrays_p) |
osl_arrays_p | osl_arrays_sread (char **) |
osl_arrays_p | osl_arrays_malloc () |
void | osl_arrays_free (osl_arrays_p) |
osl_arrays_p | osl_arrays_clone (osl_arrays_p) |
int | osl_arrays_equal (osl_arrays_p, osl_arrays_p) |
osl_strings_p | osl_arrays_to_strings (osl_arrays_p) |
osl_interface_p | osl_arrays_interface () |
#define OSL_URI_ARRAYS "arrays" |
Definition at line 77 of file arrays.h.
Referenced by osl_arrays_interface(), osl_generic_print_options_scoplib(), osl_scop_print(), and osl_scop_print_scoplib().
typedef struct osl_arrays* osl_arrays_p |
typedef struct osl_arrays osl_arrays_t |
osl_arrays_p osl_arrays_clone | ( | osl_arrays_p | arrays | ) |
osl_arrays_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_arrays_t data structure.
[in] | arrays | The pointer to the arrays structure to clone. |
Definition at line 283 of file arrays.c.
References osl_arrays::id, osl_arrays::names, osl_arrays::nb_names, osl_arrays_malloc(), OSL_malloc, and OSL_strdup.
Referenced by osl_arrays_interface().
void osl_arrays_dump | ( | FILE * | file, |
osl_arrays_p | arrays | ||
) |
osl_arrays_dump function: this function prints the content of an osl_arrays_t structure (*arrays) into a file (file, possibly stdout).
[in] | file | The file where the information has to be printed. |
[in] | arrays | The arrays structure to print. |
Definition at line 134 of file arrays.c.
References osl_arrays_idump().
int osl_arrays_equal | ( | osl_arrays_p | a1, |
osl_arrays_p | a2 | ||
) |
osl_arrays_equal function: this function returns true if the two arrays structures are the same (content-wise), false otherwise. This functions considers two arrays structures as equal if the order of the array names differ, however the identifiers and names must be the same.
[in] | a1 | The first arrays structure. |
[in] | a2 | The second arrays structure. |
Definition at line 314 of file arrays.c.
References osl_arrays::id, osl_arrays::names, osl_arrays::nb_names, and OSL_info.
Referenced by osl_arrays_interface().
void osl_arrays_free | ( | osl_arrays_p | arrays | ) |
osl_arrays_free function: this function frees the allocated memory for an arrays structure.
[in,out] | arrays | The pointer to the arrays structure we want to free. |
Definition at line 258 of file arrays.c.
References osl_arrays::id, osl_arrays::names, and osl_arrays::nb_names.
Referenced by osl_arrays_interface().
void osl_arrays_idump | ( | FILE * | file, |
osl_arrays_p | arrays, | ||
int | level | ||
) |
osl_arrays_idump function: this function displays an osl_arrays_t structure (*arrays) into a file (file, possibly stdout) in a way that trends to be understandable. It includes an indentation level (level) in order to work with others idump functions.
[in] | file | The file where the information has to be printed. |
[in] | arrays | The arrays structure to print. |
[in] | level | Number of spaces before printing, for each line. |
Definition at line 90 of file arrays.c.
References osl_arrays::id, osl_arrays::names, and osl_arrays::nb_names.
Referenced by osl_arrays_dump(), and osl_arrays_interface().
osl_arrays_interface function: this function creates an interface structure corresponding to the arrays extension and returns it).
Definition at line 392 of file arrays.c.
References osl_arrays_clone(), osl_arrays_equal(), osl_arrays_free(), osl_arrays_idump(), osl_arrays_malloc(), osl_arrays_sprint(), osl_arrays_sread(), osl_interface_malloc(), OSL_strdup, and OSL_URI_ARRAYS.
Referenced by osl_interface_get_default_registry().
osl_arrays_malloc function: this function allocates the memory space for an osl_arrays_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 241 of file arrays.c.
References osl_arrays::id, osl_arrays::names, osl_arrays::nb_names, and OSL_malloc.
Referenced by osl_arrays_clone(), osl_arrays_interface(), and osl_arrays_sread().
char* osl_arrays_sprint | ( | osl_arrays_p | arrays | ) |
osl_arrays_sprint function: this function prints the content of an osl_arrays_t structure (*arrays) into a string (returned) in the OpenScop textual format.
[in] | arrays | The arrays structure to print. |
Definition at line 146 of file arrays.c.
References osl_arrays::id, osl_arrays::names, osl_arrays::nb_names, OSL_malloc, OSL_MAX_STRING, OSL_realloc, and osl_util_safe_strcat().
Referenced by osl_arrays_interface(), and osl_generic_print_options_scoplib().
osl_arrays_p osl_arrays_sread | ( | char ** | input | ) |
osl_arrays_sread function: this function reads an arrays structure from a string complying to the OpenScop textual format and returns a pointer to this arrays structure. The string should contain only one textual format of an arrays structure. The input parameter is updated to the position in the input string this function reach right after reading the comment structure.
[in,out] | input | The input string where to find an arrays structure. Updated to the position after what has been read. |
Definition at line 194 of file arrays.c.
References osl_arrays::id, osl_arrays::names, osl_arrays::nb_names, osl_arrays_malloc(), OSL_debug, OSL_malloc, osl_util_read_int(), and osl_util_read_string().
Referenced by osl_arrays_interface().
osl_strings_p osl_arrays_to_strings | ( | osl_arrays_p | arrays | ) |
osl_arrays_to_strings function: this function creates a strings structure containing the textual names contained in a names structure. Each name is placed according to its id in the strings array. The "empty" strings cells are filled with dummy names.
[in] | arrays | The arrays structure to convert to a strings. |
Definition at line 360 of file arrays.c.
References osl_arrays::id, osl_arrays::names, osl_arrays::nb_names, OSL_strdup, osl_strings_generate(), and osl_strings::string.
Referenced by osl_scop_print(), and osl_scop_print_scoplib().