2 /*+-----------------------------------------------------------------**
4 **-----------------------------------------------------------------**
6 **-----------------------------------------------------------------**
7 ** First version: 30/04/2008 **
8 **-----------------------------------------------------------------**
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 * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' *
30 * Copyright (C) 2008 University Paris-Sud 11 and INRIA *
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 *
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. *
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. *
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> *
61 *****************************************************************************/
64 /*+****************************************************************************
65 * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM scop.h.in BY configure *
66 ******************************************************************************/
74 # define OSL_RELEASE "@PACKAGE_VERSION@"
76 # include <osl/relation.h>
77 # include <osl/interface.h>
78 # include <osl/generic.h>
79 # include <osl/statement.h>
82 # if defined(__cplusplus)
89 * The scop_t structure stores a list of scops. Each node stores the useful
90 * information of a static control part of a program to process it within a
91 * polyhedral framework. Parameter information may be strings of characters
92 * (char *) when the type field is OSL_TYPE_STRING or a generic pointer
93 * to anything else (void *) when the type field is OSL_TYPE_GENERIC.
94 * The OpenScop library does not touch AT ALL generic information: printing,
95 * copy etc. must be done externally.
98 int version
; /**< Version of the data structure */
99 char * language
; /**< Target language (backend) */
100 osl_relation_p context
; /**< Constraints on the SCoP parameters */
101 osl_generic_p parameters
; /**< NULL-terminated array of parameters */
102 osl_statement_p statement
; /**< Statement list of the SCoP */
103 osl_interface_p registry
; /**< Registered extensions interfaces */
104 osl_generic_p extension
; /**< List of extensions */
105 void * usr
; /**< A user-defined field, not touched
106 AT ALL by the OpenScop Library */
107 struct osl_scop
* next
; /**< Next statement in the linked list */
109 typedef struct osl_scop osl_scop_t
;
110 typedef struct osl_scop
* osl_scop_p
;
113 /*+***************************************************************************
114 * Structure display function *
115 *****************************************************************************/
116 void osl_scop_idump(FILE *, osl_scop_p
, int);
117 void osl_scop_dump(FILE *, osl_scop_p
);
118 void osl_scop_print(FILE *, osl_scop_p
);
120 // SCoPLib Compatibility
121 void osl_scop_print_scoplib(FILE *, osl_scop_p
);
124 /*****************************************************************************
126 *****************************************************************************/
127 osl_scop_p
osl_scop_pread(FILE *, osl_interface_p
, int);
128 osl_scop_p
osl_scop_read(FILE *);
131 /*+***************************************************************************
132 * Memory allocation/deallocation function *
133 *****************************************************************************/
134 osl_scop_p
osl_scop_malloc();
135 void osl_scop_free(osl_scop_p
);
138 /*+***************************************************************************
139 * Processing functions *
140 *****************************************************************************/
141 void osl_scop_add(osl_scop_p
*, osl_scop_p
);
142 size_t osl_scop_number(osl_scop_p
);
143 osl_scop_p
osl_scop_clone(osl_scop_p
);
144 osl_scop_p
osl_scop_remove_unions(osl_scop_p
);
145 int osl_scop_equal(osl_scop_p
, osl_scop_p
);
146 int osl_scop_integrity_check(osl_scop_p
);
147 int osl_scop_check_compatible_scoplib(osl_scop_p
);
148 int osl_scop_get_nb_parameters(osl_scop_p
);
149 void osl_scop_register_extension(osl_scop_p
, osl_interface_p
);
150 void osl_scop_get_attributes(osl_scop_p
,
151 int *, int *, int *, int *, int *);
152 void osl_scop_normalize_scattering(osl_scop_p
);
154 osl_names_p
osl_scop_names(osl_scop_p scop
);
156 # if defined(__cplusplus)
160 #endif /* define OSL_SCOP_H */