OpenScop  0.9.0
dependence.h
Go to the documentation of this file.
1 
2  /*+-----------------------------------------------------------------**
3  ** OpenScop Library **
4  **-----------------------------------------------------------------**
5  ** extensions/dependence.h **
6  **-----------------------------------------------------------------**
7  ** First version: 02/07/2012 **
8  **-----------------------------------------------------------------**
9 
10 
11  *****************************************************************************
12  * OpenScop: Structures and formats for polyhedral tools to talk together *
13  *****************************************************************************
14  * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, *
15  * / / / // // // // / / / // // / / // / /|,_, *
16  * / / / // // // // / / / // // / / // / / / /\ *
17  * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ *
18  * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ *
19  * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ *
20  * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ *
21  * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ *
22  * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ *
23  * | I | | | | e | | | | | | | | | | | | | \ \ \ *
24  * | T | | | | | | | | | | | | | | | | | \ \ \ *
25  * | E | | | | | | | | | | | | | | | | | \ \ \ *
26  * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ *
27  * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / *
28  * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' *
29  * *
30  * Copyright (C) 2008 University Paris-Sud 11 and INRIA *
31  * *
32  * (3-clause BSD license) *
33  * Redistribution and use in source and binary forms, with or without *
34  * modification, are permitted provided that the following conditions *
35  * are met: *
36  * *
37  * 1. Redistributions of source code must retain the above copyright notice, *
38  * this list of conditions and the following disclaimer. *
39  * 2. Redistributions in binary form must reproduce the above copyright *
40  * notice, this list of conditions and the following disclaimer in the *
41  * documentation and/or other materials provided with the distribution. *
42  * 3. The name of the author may not be used to endorse or promote products *
43  * derived from this software without specific prior written permission. *
44  * *
45  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR *
46  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES *
47  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *
48  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, *
49  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT *
50  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
51  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
52  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
53  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *
54  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
55  * *
56  * OpenScop Library, a library to manipulate OpenScop formats and data *
57  * structures. Written by: *
58  * Cedric Bastoul <Cedric.Bastoul@u-psud.fr> and *
59  * Louis-Noel Pouchet <Louis-Noel.pouchet@inria.fr> *
60  * *
61  *****************************************************************************/
62 
63 #ifndef OSL_DEPENDENCE_H
64 # define OSL_DEPENDENCE_H
65 
66 # include <stdio.h>
67 # include <osl/interface.h>
68 # include <osl/statement.h>
69 # include <osl/relation.h>
70 
71 # if defined(__cplusplus)
72 extern "C"
73  {
74 # endif
75 
76 
77 # define OSL_URI_DEPENDENCE "dependence"
78 
79 # define OSL_DEPENDENCE_RAW 1
80 # define OSL_DEPENDENCE_WAR 2
81 # define OSL_DEPENDENCE_WAW 3
82 # define OSL_DEPENDENCE_RAR 4
83 # define OSL_DEPENDENCE_RAW_SCALPRIV 5
84 
85 
86 # define OSL_DEPENDENCE_EQUAL 1
87 # define OSL_DEPENDENCE_POSIT 2
88 # define OSL_DEPENDENCE_LATER 3
89 # define OSL_DEPENDENCE_NEVER 4
90 
91 # define OSL_DEPENDENCE_ASSIGNMENT 1
92 # define OSL_DEPENDENCE_P_REDUCTION 2
93 # define OSL_DEPENDENCE_M_REDUCTION 3
94 # define OSL_DEPENDENCE_T_REDUCTION 4
95 
129  int depth;
130  int type;
145  /* Other useful information */
146 
149 
152 
157 
158  void* usr;
160  struct osl_dependence * next;
162  /* These attributes are not filled by osl
163  * You can use the function candl_dependence_init_fields of CandL
164  */
165 
171 };
172 
175 
176 
177 /*+***************************************************************************
178  * Structure display function *
179  *****************************************************************************/
180 void osl_dependence_idump(FILE *, osl_dependence_p, int);
181 void osl_dependence_dump(FILE *, osl_dependence_p);
182 char * osl_dependence_sprint(osl_dependence_p);
183 void osl_dependence_print(FILE *, osl_dependence_p);
184 
185 
186 /*****************************************************************************
187  * Reading function *
188  *****************************************************************************/
189 osl_dependence_p osl_dependence_sread(char **);
190 osl_dependence_p osl_dependence_psread(char **, int);
191 
192 /*+***************************************************************************
193  * Memory allocation/deallocation function *
194  *****************************************************************************/
195 osl_dependence_p osl_dependence_malloc();
196 void osl_dependence_free(osl_dependence_p);
197 
198 /*+***************************************************************************
199  * Processing functions *
200  *****************************************************************************/
201 osl_dependence_p osl_dependence_clone(osl_dependence_p);
202 int osl_dependence_equal(osl_dependence_p, osl_dependence_p);
203 void osl_dependence_add(osl_dependence_p*, osl_dependence_p*,
204  osl_dependence_p);
205 int osl_nb_dependences(osl_dependence_p);
207 
208 # if defined(__cplusplus)
209  }
210 # endif
211 
212 #endif /* define OSL_DEPENDENCE_H */
int target_nb_output_dims_access
Definition: dependence.h:151
osl_statement_p stmt_source_ptr
Definition: dependence.h:169
struct osl_dependence * osl_dependence_p
Definition: dependence.h:174
osl_dependence_p osl_dependence_clone(osl_dependence_p)
Definition: dependence.c:524
int source_nb_local_dims_domain
Definition: dependence.h:153
struct osl_dependence * next
Definition: dependence.h:160
void osl_dependence_free(osl_dependence_p)
Definition: dependence.c:449
int osl_dependence_equal(osl_dependence_p, osl_dependence_p)
Definition: dependence.c:538
char * osl_dependence_sprint(osl_dependence_p)
Definition: dependence.c:238
osl_statement_p stmt_target_ptr
Definition: dependence.h:170
int target_nb_output_dims_domain
Definition: dependence.h:150
int target_nb_local_dims_access
Definition: dependence.h:156
void osl_dependence_print(FILE *, osl_dependence_p)
Definition: dependence.c:226
int osl_nb_dependences(osl_dependence_p)
Definition: dependence.c:624
int target_nb_local_dims_domain
Definition: dependence.h:155
osl_relation_p ref_source_access_ptr
Definition: dependence.h:166
osl_dependence_p osl_dependence_psread(char **, int)
Definition: dependence.c:371
int source_nb_output_dims_access
Definition: dependence.h:148
osl_dependence_p osl_dependence_malloc()
Definition: dependence.c:411
osl_interface_p osl_dependence_interface()
Definition: dependence.c:641
osl_dependence_p osl_dependence_sread(char **)
Definition: dependence.c:361
void osl_dependence_idump(FILE *, osl_dependence_p, int)
Definition: dependence.c:92
int source_nb_local_dims_access
Definition: dependence.h:154
osl_relation_p ref_target_access_ptr
Definition: dependence.h:167
void osl_dependence_dump(FILE *, osl_dependence_p)
Definition: dependence.c:217
void osl_dependence_add(osl_dependence_p *, osl_dependence_p *, osl_dependence_p)
Definition: dependence.c:599
osl_relation_p domain
Definition: dependence.h:143
int source_nb_output_dims_domain
Definition: dependence.h:147