OpenScop
0.9.0
|
#include <stdlib.h>
#include <string.h>
#include "../include/osl/extensions/pluto_unroll.h"
#include "../include/osl/macros.h"
Go to the source code of this file.
Functions | |
void | osl_pluto_unroll_idump (FILE *file, osl_pluto_unroll_p pluto_unroll, int level) |
void | osl_pluto_unroll_dump (FILE *file, osl_pluto_unroll_p pluto_unroll) |
char * | osl_pluto_unroll_sprint (osl_pluto_unroll_p pluto_unroll) |
osl_pluto_unroll_p | osl_pluto_unroll_sread (char **input) |
osl_pluto_unroll_p | osl_pluto_unroll_malloc () |
void | osl_pluto_unroll_free (osl_pluto_unroll_p pluto_unroll) |
void | osl_pluto_unroll_fill (osl_pluto_unroll_p pluto_unroll, char const *const iterator_name, bool const jam, int const factor) |
osl_pluto_unroll_p | osl_pluto_unroll_clone (osl_pluto_unroll_p pluto_unroll) |
int | osl_pluto_unroll_equal (osl_pluto_unroll_p a, osl_pluto_unroll_p b) |
osl_interface_p | osl_pluto_unroll_interface () |
osl_pluto_unroll_p osl_pluto_unroll_clone | ( | osl_pluto_unroll_p | pluto_unroll | ) |
osl_pluto_unroll_clone function: this function builds and returns a "hard copy" (not a pointer copy) of a list of osl_pluto_unroll_t data structures.
[in] | pluto_unroll | The pointer to the list of pluto_unroll structure to clone. |
Definition at line 339 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, osl_pluto_unroll::next, osl_pluto_unroll_fill(), and osl_pluto_unroll_malloc().
Referenced by osl_pluto_unroll_interface().
void osl_pluto_unroll_dump | ( | FILE * | file, |
osl_pluto_unroll_p | pluto_unroll | ||
) |
osl_pluto_unroll_dump function: this function prints the content of an osl_pluto_unroll_t structure (*pluto_unroll) into a file (file, possibly stdout).
[in] | file | The file where the information has to be printed. |
[in] | pluto_unroll | The pluto_unroll structure to print. |
Definition at line 157 of file pluto_unroll.c.
References osl_pluto_unroll_idump().
int osl_pluto_unroll_equal | ( | osl_pluto_unroll_p | a, |
osl_pluto_unroll_p | b | ||
) |
osl_pluto_unroll_equal function: this function returns true if the two pluto_unroll lists are the same (content-wise), false otherwise. Two lists are equal if one contains all the elements of the other and vice versa. The exact order of the nodes is not taken into account by this function.
[in] | a | The first pluto_unroll list. |
[in] | b | The second pluto_unroll list. |
Definition at line 371 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, and osl_pluto_unroll::next.
Referenced by osl_pluto_unroll_interface().
void osl_pluto_unroll_fill | ( | osl_pluto_unroll_p | pluto_unroll, |
char const *const | iterator_name, | ||
bool const | jam, | ||
int const | factor | ||
) |
osl_pluto_unroll_fill function: this function fill the osl_pluto_unroll_t with the iterator name, if jam or not and the unroll factor
[in] | pluto_unroll | The pointer to the osl_pluto_unroll_t |
[in] | jam | true if jam, falsee otherwise |
[in] | factor | Unroll factor |
Definition at line 310 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, OSL_realloc, and OSL_warning.
Referenced by osl_pluto_unroll_clone().
void osl_pluto_unroll_free | ( | osl_pluto_unroll_p | pluto_unroll | ) |
osl_pluto_unroll_free function: this function frees the allocated memory for an pluto_unroll structure.
[in,out] | pluto_unroll | The pointer to the pluto_unroll structure we want to free. |
Definition at line 287 of file pluto_unroll.c.
References osl_pluto_unroll::iter, osl_pluto_unroll::next, and osl_pluto_unroll_free().
Referenced by osl_pluto_unroll_free(), and osl_pluto_unroll_interface().
void osl_pluto_unroll_idump | ( | FILE * | file, |
osl_pluto_unroll_p | pluto_unroll, | ||
int | level | ||
) |
osl_loop_idump function: this function displays an osl_pluto_unroll_t structure (pluto_unroll) 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] | pluto_unroll | The pluto_unroll structure to print. |
[in] | level | Number of spaces before printing, for each line. |
Definition at line 87 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, and osl_pluto_unroll::next.
Referenced by osl_pluto_unroll_dump(), and osl_pluto_unroll_interface().
osl_pluto_unroll_interface function: this function creates an interface structure corresponding to the pluto_unroll extension and returns it.
Definition at line 409 of file pluto_unroll.c.
References osl_interface_malloc(), osl_pluto_unroll_clone(), osl_pluto_unroll_equal(), osl_pluto_unroll_free(), osl_pluto_unroll_idump(), osl_pluto_unroll_malloc(), osl_pluto_unroll_sprint(), osl_pluto_unroll_sread(), OSL_strdup, and OSL_URI_PLUTO_UNROLL.
Referenced by osl_interface_get_default_registry().
osl_pluto_unroll_malloc function: this function allocates the memory space for an osl_pluto_unroll_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 267 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, osl_pluto_unroll::next, and OSL_malloc.
Referenced by osl_pluto_unroll_clone(), osl_pluto_unroll_interface(), and osl_pluto_unroll_sread().
char* osl_pluto_unroll_sprint | ( | osl_pluto_unroll_p | pluto_unroll | ) |
osl_pluto_unroll_sprint function: this function prints the content of an osl_pluto_unroll_t structure (*pluto_unroll) into a string (returned) in the OpenScop textual format.
[in] | pluto_unroll | The loop structure to print. |
Definition at line 171 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, osl_pluto_unroll::next, OSL_MAX_STRING, and OSL_realloc.
Referenced by osl_pluto_unroll_interface().
osl_pluto_unroll_p osl_pluto_unroll_sread | ( | char ** | input | ) |
osl_pluto_unroll_sread function: this function reads a pluto_unroll structure from a string complying to the OpenScop textual format and returns a pointer to this pluto_unroll structure. The input parameter is updated to the position in the input string this function reaches right after reading the comment structure.
[in,out] | input | The input string where to find an pluto_unroll structure. Updated to the position after what has been read. |
Definition at line 229 of file pluto_unroll.c.
References osl_pluto_unroll::factor, osl_pluto_unroll::iter, osl_pluto_unroll::jam, osl_pluto_unroll::next, osl_pluto_unroll_malloc(), osl_util_read_int(), and osl_util_read_line().
Referenced by osl_pluto_unroll_interface().