Clan  0.8.1
Data Structures | Typedefs | Functions
domain.h File Reference
#include <clan/symbol.h>
#include <clan/options.h>
Include dependency graph for domain.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  clan_domain
 

Typedefs

typedef struct clan_domain clan_domain_t
 
typedef struct clan_domainclan_domain_p
 

Functions

void clan_domain_idump (FILE *, clan_domain_p, int)
 
void clan_domain_dump (FILE *, clan_domain_p)
 
clan_domain_p clan_domain_malloc ()
 
void clan_domain_free (clan_domain_p)
 
clan_domain_p clan_domain_clone (clan_domain_p)
 
void clan_domain_push (clan_domain_p *, clan_domain_p)
 
clan_domain_p clan_domain_pop (clan_domain_p *)
 
void clan_domain_dup (clan_domain_p *)
 
void clan_domain_drop (clan_domain_p *)
 
void clan_domain_and (clan_domain_p, struct osl_relation *)
 
void clan_domain_stride (clan_domain_p, int, int)
 
void clan_domain_for (clan_domain_p, int, clan_symbol_p, struct osl_relation *, struct osl_relation *, int, clan_options_p)
 
void clan_domain_xfor (clan_domain_p, int, clan_symbol_p, struct osl_relation_list *, struct osl_relation_list *, int *, clan_options_p)
 

Typedef Documentation

◆ clan_domain_p

typedef struct clan_domain* clan_domain_p

Definition at line 64 of file domain.h.

◆ clan_domain_t

typedef struct clan_domain clan_domain_t

Definition at line 63 of file domain.h.

Function Documentation

◆ clan_domain_and()

void clan_domain_and ( clan_domain_p  ,
struct osl_relation *   
)

◆ clan_domain_clone()

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.

Parameters
[in]listThe pointer to the domain list we want to copy.
Returns
A pointer to the full copy of the domain list in parameter.

Definition at line 178 of file domain.c.

References clan_domain_malloc(), clan_domain::constraints, and clan_domain::next.

Referenced by clan_domain_dup().

◆ clan_domain_drop()

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.

Parameters
[in,out]headPointer 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().

◆ clan_domain_dump()

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

Parameters
[in]fileFile where informations are printed.
[in]listThe relation whose information has to be printed.

Definition at line 117 of file domain.c.

References clan_domain_idump().

◆ clan_domain_dup()

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.

Parameters
[in,out]headPointer 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().

◆ clan_domain_for()

void clan_domain_for ( clan_domain_p  ,
int  ,
clan_symbol_p  ,
struct osl_relation *  ,
struct osl_relation *  ,
int  ,
clan_options_p   
)

◆ clan_domain_free()

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.

Parameters
[in,out]listThe 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().

◆ clan_domain_idump()

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

Parameters
[in]fileFile where informations are printed.
[in]domainThe clan_domain whose information has to be printed.
[in]levelNumber 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_malloc()

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.

Returns
A pointer to an empty domain with fields set to default values.

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

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.

Parameters
[in,out]headPointer to the head of the domain stack. It is updated to the previous element in the stack (NULL if there is none).
Returns
The top element of the stack (detached from the list).

Definition at line 227 of file domain.c.

References clan_domain::next.

Referenced by clan_domain_drop(), and clan_domain_dup().

◆ clan_domain_push()

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.

Parameters
[in,out]headPointer to the head of the domain stack.
[in,out]nodeDomain 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().

◆ clan_domain_stride()

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.

Parameters
[in,out]domainThe set of constraint set to update.
[in]depthThe loop depth corresponding to the stride.
[in]strideThe loop stride value.

Definition at line 293 of file domain.c.

References clan_relation_stride(), and clan_domain::constraints.

Referenced by clan_domain_for().

◆ clan_domain_xfor()

void clan_domain_xfor ( clan_domain_p  ,
int  ,
clan_symbol_p  ,
struct osl_relation_list *  ,
struct osl_relation_list *  ,
int *  ,
clan_options_p   
)