Clan
0.8.1
|
#include <stdlib.h>
#include <stdio.h>
#include <osl/macros.h>
#include <osl/relation_list.h>
#include <clan/macros.h>
#include <clan/relation.h>
#include <clan/relation_list.h>
#include <clan/domain.h>
#include <clan/vector.h>
Go to the source code of this file.
Functions | |
void | clan_domain_idump (FILE *file, clan_domain_p domain, int level) |
void | clan_domain_dump (FILE *file, clan_domain_p list) |
clan_domain_p | clan_domain_malloc () |
void | clan_domain_free (clan_domain_p list) |
clan_domain_p | clan_domain_clone (clan_domain_p list) |
void | clan_domain_push (clan_domain_p *head, clan_domain_p node) |
clan_domain_p | clan_domain_pop (clan_domain_p *head) |
void | clan_domain_dup (clan_domain_p *head) |
void | clan_domain_drop (clan_domain_p *head) |
void | clan_domain_and (clan_domain_p domain, osl_relation_p new_constraints) |
void | clan_domain_stride (clan_domain_p domain, int depth, int stride) |
void | clan_domain_for (clan_domain_p domain, int depth, clan_symbol_p iterator, osl_relation_p initialization, osl_relation_p condition, int stride, clan_options_p options) |
void | clan_domain_xfor (clan_domain_p domain, int depth, clan_symbol_p iterator, osl_relation_list_p initialization, osl_relation_list_p condition, int *stride, clan_options_p options) |
void clan_domain_and | ( | clan_domain_p | domain, |
osl_relation_p | new_constraints | ||
) |
clan_domain_and function: this function adds new constraints to every set of constraint set of the domain.
[in,out] | domain | The set of constraint set to update. |
[in] | new_constraints | The constraints to every constraint set. |
Definition at line 276 of file domain.c.
References clan_relation_and(), and clan_domain::constraints.
Referenced by clan_domain_for().
clan_domain_p clan_domain_clone | ( | clan_domain_p | list | ) |
clan_domain_clone function: This functions builds and returns a quasi-"hard copy" (not a pointer copy) of a clan_domain_t data structure provided as parameter.
[in] | list | The pointer to the domain list we want to copy. |
Definition at line 178 of file domain.c.
References clan_domain_malloc(), clan_domain::constraints, and clan_domain::next.
Referenced by clan_domain_dup().
void clan_domain_drop | ( | clan_domain_p * | head | ) |
clan_domain_drop function: this function sees a list of domains as a stack of domains and performs the drop operation (pop and destroy popped element) onto this stack.
[in,out] | head | Pointer to the head of the domain stack. It is updated to the previous element in the stack (NULL if there is none). |
Definition at line 263 of file domain.c.
References clan_domain_free(), and clan_domain_pop().
void clan_domain_dump | ( | FILE * | file, |
clan_domain_p | list | ||
) |
clan_domain_dump function: This function prints the content of a clan_domain_t into a file (file, possibly stdout).
[in] | file | File where informations are printed. |
[in] | list | The relation whose information has to be printed. |
Definition at line 117 of file domain.c.
References clan_domain_idump().
void clan_domain_dup | ( | clan_domain_p * | head | ) |
clan_domain_dup function: this function sees a list of domains as a stack of domains and performs the dup operation (duplicate the top element) onto this stack.
[in,out] | head | Pointer to the head of the domain stack. It is updated to the new element after duplication. |
Definition at line 247 of file domain.c.
References clan_domain_clone(), clan_domain_pop(), and clan_domain_push().
void clan_domain_for | ( | clan_domain_p | domain, |
int | depth, | ||
clan_symbol_p | iterator, | ||
osl_relation_p | initialization, | ||
osl_relation_p | condition, | ||
int | stride, | ||
clan_options_p | options | ||
) |
clan_domain_for function: this function adds the contribution of a for loop to a domain.
[in,out] | domain | The set of constraint set to update. |
[in] | depth | The loop depth. |
[in] | iterator | The loop iterator symbol. |
[in] | initialization | The loop initialiation right part constraints. |
[in] | condition | The loop condition part constraints. |
[in] | stride | The loop stride value. |
[in] | options | Clan's options. |
Definition at line 320 of file domain.c.
References clan_domain_and(), clan_domain_stride(), clan_relation_greater(), clan_relation_loop_context(), clan_vector_term(), clan_options::noloopcontext, and clan_options::precision.
Referenced by clan_domain_xfor().
void clan_domain_free | ( | clan_domain_p | list | ) |
clan_domain_free function: This function frees the allocated memory for a clan_domain_t structure, and all the domains stored in the list.
[in,out] | list | The pointer to the domain list we want to free. |
Definition at line 151 of file domain.c.
References clan_domain::constraints, and clan_domain::next.
Referenced by clan_domain_drop(), and clan_domain_xfor().
void clan_domain_idump | ( | FILE * | file, |
clan_domain_p | domain, | ||
int | level | ||
) |
clan_domain_idump function: Displays a clan_domain_t structure into a file (file, possibly stdout).
[in] | file | File where informations are printed. |
[in] | domain | The clan_domain whose information has to be printed. |
[in] | level | Number of spaces before printing, for each line. |
Definition at line 63 of file domain.c.
References clan_domain::constraints, and clan_domain::next.
Referenced by clan_domain_dump().
clan_domain_p clan_domain_malloc | ( | ) |
clan_domain_malloc function: This function allocates the memory space for a clan_domain_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 134 of file domain.c.
References clan_domain::constraints, and clan_domain::next.
Referenced by clan_domain_clone(), and clan_domain_xfor().
clan_domain_p clan_domain_pop | ( | clan_domain_p * | head | ) |
clan_domain_pop function: this function sees a list of domains as a stack of domains and performs the pop operation onto this stack.
[in,out] | head | Pointer to the head of the domain stack. It is updated to the previous element in the stack (NULL if there is none). |
Definition at line 227 of file domain.c.
References clan_domain::next.
Referenced by clan_domain_drop(), and clan_domain_dup().
void clan_domain_push | ( | clan_domain_p * | head, |
clan_domain_p | node | ||
) |
clan_domain_push function: this function sees a list of domains as a stack of domains and performs the push operation onto this stack.
[in,out] | head | Pointer to the head of the domain stack. |
[in,out] | node | Domain node to add to the stack. Its next field is updated to the previous head of the stack. |
Definition at line 211 of file domain.c.
References clan_domain::next.
Referenced by clan_domain_dup().
void clan_domain_stride | ( | clan_domain_p | domain, |
int | depth, | ||
int | stride | ||
) |
clan_domain_stride function: this function applies the contribution of a loop stride to every set of constraint set of the domain.
[in,out] | domain | The set of constraint set to update. |
[in] | depth | The loop depth corresponding to the stride. |
[in] | stride | The loop stride value. |
Definition at line 293 of file domain.c.
References clan_relation_stride(), and clan_domain::constraints.
Referenced by clan_domain_for().
void clan_domain_xfor | ( | clan_domain_p | domain, |
int | depth, | ||
clan_symbol_p | iterator, | ||
osl_relation_list_p | initialization, | ||
osl_relation_list_p | condition, | ||
int * | stride, | ||
clan_options_p | options | ||
) |
clan_domain_xfor function: this function adds the contribution of a xfor loop to a domain.
[in,out] | domain | The set of constraint set to update. |
[in] | depth | The loop depth. |
[in] | iterator | The loop iterator symbols. |
[in] | initialization | The loop initialiation right part constraints. |
[in] | condition | The loop condition part constraints. |
[in] | stride | The loop stride values. |
[in] | options | Clan's options. |
Definition at line 372 of file domain.c.
References clan_domain_for(), clan_domain_free(), clan_domain_malloc(), clan_relation_list_nb_elements(), clan_domain::constraints, and clan_symbol::next.