OpenScop  0.9.0
Functions
dependence.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <osl/macros.h>
#include <osl/scop.h>
#include <osl/statement.h>
#include <osl/relation.h>
#include <osl/names.h>
#include <osl/util.h>
#include <osl/extensions/dependence.h>
Include dependency graph for dependence.c:

Go to the source code of this file.

Functions

void osl_dependence_idump (FILE *file, osl_dependence_p dependence, int level)
void osl_dependence_dump (FILE *file, osl_dependence_p dependence)
void osl_dependence_print (FILE *file, osl_dependence_p dependence)
char * osl_dependence_sprint (osl_dependence_p dependence)
static osl_dependence_p osl_dependence_read_one_dep (char **input, int precision)
osl_dependence_p osl_dependence_sread (char **input)
osl_dependence_p osl_dependence_psread (char **input, int precision)
osl_dependence_p osl_dependence_malloc ()
void osl_dependence_free (osl_dependence_p dependence)
osl_dependence_p osl_dependence_nclone (osl_dependence_p dep, int n)
osl_dependence_p osl_dependence_clone (osl_dependence_p dep)
int osl_dependence_equal (osl_dependence_p d1, osl_dependence_p d2)
void osl_dependence_add (osl_dependence_p *start, osl_dependence_p *now, osl_dependence_p dependence)
int osl_nb_dependences (osl_dependence_p deps)
osl_interface_p osl_dependence_interface ()

Function Documentation

void osl_dependence_add ( osl_dependence_p start,
osl_dependence_p now,
osl_dependence_p  dependence 
)

osl_dependence_add function: This function adds a osl_dependence_p structure (dependence) at a given place (now) of a NULL terminated list of osl_dependence_p structures. The beginning of this list is (start). This function updates (now) to the end of the loop list (loop), and updates (start) if the added element is the first one -that is when (start) is NULL-.

  • 18/09/2003: first version.

Definition at line 599 of file dependence.c.

References osl_dependence::next.

osl_dependence_clone function: This functions builds and returns a "hard copy" (not a pointer copy) of an osl_dependence_t data structure provided as parameter.

Parameters:
[in]statementThe pointer to the dependence we want to clone.
Returns:
A pointer to the clone of the dependence provided as parameter.

Definition at line 524 of file dependence.c.

References osl_dependence_nclone().

Referenced by osl_dependence_interface().

void osl_dependence_dump ( FILE *  file,
osl_dependence_p  dependence 
)

osl_dependence_dump function: This function prints the content of a osl_dependence_p structure (dependence) into a file (file, possibly stdout).

Definition at line 217 of file dependence.c.

References osl_dependence_idump().

osl_dependence_equal function: this function returns true if the two dependences provided as parameters are the same, false otherwise (the usr field is not tested). NOTE: the different pointer to statements or relations are nto compared

Parameters:
[in]d1The first dependence.
[in]d2The second dependence.
Returns:
1 if d1 and d2 are the same (content-wise), 0 otherwise.

Definition at line 538 of file dependence.c.

References osl_dependence::depth, osl_dependence::domain, osl_dependence::label_source, osl_dependence::label_target, osl_dependence::next, osl_dependence_equal(), osl_relation_equal(), osl_dependence::ref_source, osl_dependence::ref_target, osl_dependence::source_nb_local_dims_access, osl_dependence::source_nb_local_dims_domain, osl_dependence::source_nb_output_dims_access, osl_dependence::source_nb_output_dims_domain, osl_dependence::target_nb_local_dims_access, osl_dependence::target_nb_local_dims_domain, osl_dependence::target_nb_output_dims_access, osl_dependence::target_nb_output_dims_domain, and osl_dependence::type.

Referenced by osl_dependence_equal(), and osl_dependence_interface().

void osl_dependence_free ( osl_dependence_p  dependence)

osl_dependence_free function: This function frees the allocated memory for a osl_dependence_p structure.

  • 18/09/2003: first version.

Definition at line 449 of file dependence.c.

References osl_dependence::domain, osl_dependence::next, and osl_relation_free().

Referenced by osl_dependence_interface().

void osl_dependence_idump ( FILE *  file,
osl_dependence_p  dependence,
int  level 
)

osl_dependence_interface function: this function creates an interface structure corresponding to the dependence extension and returns it).

Returns:
An interface structure for the dependence extension.

Definition at line 641 of file dependence.c.

References osl_dependence_clone(), osl_dependence_equal(), osl_dependence_free(), osl_dependence_idump(), osl_dependence_malloc(), osl_dependence_sprint(), osl_dependence_sread(), osl_interface_malloc(), OSL_strdup, and OSL_URI_DEPENDENCE.

Referenced by osl_interface_get_default_registry().

void osl_dependence_print ( FILE *  file,
osl_dependence_p  dependence 
)

osl_dependence_print function: Print the dependence, formatted to fit the .scop representation.

Definition at line 226 of file dependence.c.

References osl_dependence_sprint().

osl_dependence_p osl_dependence_psread ( char **  input,
int  precision 
)

osl_dependence_psread function Retrieve a osl_dependence_p list from the option tag in the scop.

Definition at line 371 of file dependence.c.

References osl_dependence::next, OSL_debug, osl_dependence_read_one_dep(), and osl_util_read_int().

Referenced by osl_dependence_sread().

static osl_dependence_p osl_dependence_read_one_dep ( char **  input,
int  precision 
) [static]
char* osl_dependence_sprint ( osl_dependence_p  dependence)

osl_dependence_sread function: Retrieve a osl_dependence_p list from the option tag in the scop.

Definition at line 361 of file dependence.c.

References osl_dependence_psread(), and osl_util_get_precision().

Referenced by osl_dependence_interface().

osl_nb_dependences function: This function returns the number of dependences in the dependence list

Parameters:
dependenceThe first dependence of the dependence list.

Definition at line 624 of file dependence.c.

References osl_dependence::next.