OpenScop  0.9.0
Data Structures | Defines | Typedefs | Functions
pluto_unroll.h File Reference
#include <stdio.h>
#include <stdbool.h>
#include "../strings.h"
#include "../interface.h"
Include dependency graph for pluto_unroll.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  osl_pluto_unroll

Defines

#define OSL_URI_PLUTO_UNROLL   "pluto_unroll"

Typedefs

typedef struct osl_pluto_unroll osl_pluto_unroll_t
typedef struct osl_pluto_unrollosl_pluto_unroll_p

Functions

void osl_pluto_unroll_idump (FILE *, osl_pluto_unroll_p, int)
void osl_pluto_unroll_dump (FILE *, osl_pluto_unroll_p)
char * osl_pluto_unroll_sprint (osl_pluto_unroll_p)
osl_pluto_unroll_p osl_pluto_unroll_sread (char **)
osl_pluto_unroll_p osl_pluto_unroll_malloc ()
void osl_pluto_unroll_free (osl_pluto_unroll_p)
void osl_pluto_unroll_fill (osl_pluto_unroll_p, char const *const, bool const, int const)
osl_pluto_unroll_p osl_pluto_unroll_clone (osl_pluto_unroll_p)
int osl_pluto_unroll_equal_one (osl_pluto_unroll_p, osl_pluto_unroll_p)
int osl_pluto_unroll_equal (osl_pluto_unroll_p, osl_pluto_unroll_p)
osl_strings_p osl_pluto_unroll_to_strings (osl_pluto_unroll_p)
osl_interface_p osl_pluto_unroll_interface ()

Define Documentation

#define OSL_URI_PLUTO_UNROLL   "pluto_unroll"

Definition at line 81 of file pluto_unroll.h.

Referenced by osl_pluto_unroll_interface().


Typedef Documentation

Definition at line 95 of file pluto_unroll.h.

Definition at line 94 of file pluto_unroll.h.


Function Documentation

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.

Parameters:
[in]pluto_unrollThe pointer to the list of pluto_unroll structure to clone.
Returns:
a pointer to the clone of list of the pluto_unroll structure.

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).

Parameters:
[in]fileThe file where the information has to be printed.
[in]pluto_unrollThe pluto_unroll structure to print.

Definition at line 157 of file pluto_unroll.c.

References osl_pluto_unroll_idump().

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.

Parameters:
[in]aThe first pluto_unroll list.
[in]bThe second pluto_unroll list.
Returns:
1 if a and b are the same (content-wise), 0 otherwise.

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

Parameters:
[in]pluto_unrollThe pointer to the osl_pluto_unroll_t
[in]jamtrue if jam, falsee otherwise
[in]factorUnroll 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.

Parameters:
[in,out]pluto_unrollThe 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.

Parameters:
[in]fileThe file where the information has to be printed.
[in]pluto_unrollThe pluto_unroll structure to print.
[in]levelNumber 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.

Returns:
an interface structure for the pluto_unroll extension.

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.

Returns:
a pointer to an empty pluto_unroll structure with fields set to default values.

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().

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.

Parameters:
[in]pluto_unrollThe loop structure to print.
Returns:
a string containing the OpenScop dump of the loop structure.

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_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.

Parameters:
[in,out]inputThe input string where to find an pluto_unroll structure. Updated to the position after what has been read.
Returns:
a pointer to the pluto_unroll structure that 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().