First commit : 0.14.0 version (with roadmap in doc instead of
[cloog.git] / include / cloog / loop.h
blob2e4b45b6ff4f10871461684a74221ab38d35d7f3
2 /**-------------------------------------------------------------------**
3 ** CLooG **
4 **-------------------------------------------------------------------**
5 ** loop.h **
6 **-------------------------------------------------------------------**
7 ** First version: october 26th 2001 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
14 * *
15 * Copyright (C) 2001-2005 Cedric Bastoul *
16 * *
17 * This is free software; you can redistribute it and/or modify it under the *
18 * terms of the GNU General Public License as published by the Free Software *
19 * Foundation; either version 2 of the License, or (at your option) any later *
20 * version. *
21 * *
22 * This software is distributed in the hope that it will be useful, but *
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
25 * for more details. *
26 * *
27 * You should have received a copy of the GNU General Public License along *
28 * with software; if not, write to the Free Software Foundation, Inc., *
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
30 * *
31 * CLooG, the Chunky Loop Generator *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
33 * *
34 ******************************************************************************/
37 #ifndef CLOOG_LOOP_H
38 #define CLOOG_LOOP_H
39 #if defined(__cplusplus)
40 extern "C"
42 #endif
44 /**
45 * CloogLoop structure:
46 * this structure contains all the informations of a loop generated or to be
47 * generated.
48 * - if the loop has not been processed yet (it is not a result of a call to
49 * cloog_loop_generate), the domain is the whole iteration domain of a given
50 * block, the stride is 1 (i.e. there is no stride), block is necessarily not
51 * NULL and inner is NULL.
52 * - if the loop comes as a result of a cloog_loop_generate call, the domain
53 * describes the constraints (guards and loop bounds) for only one dimension
54 * (the last one: outer dimensions being considered as parameters), the stride
55 * may differ from one (this means that on the considered dimension, a step of
56 * 'stride' must be considered between integral point, the first integral
57 * point to be considered being the lower bound of the loop), inner may differ
58 * from NULL, meaning that there are further dimensions and nesting levels in
59 * the loop.
61 struct cloogloop
62 { CloogDomain * domain ; /**< The iteration domain. */
63 Value stride ; /**< The stride for the corresponding iterator
64 * (filled only after loop generation).
66 CloogBlock * block ; /**< The included statement block, NULL if none.*/
67 struct cloogloop * inner ; /**< Loops at the next level. */
68 struct cloogloop * next ; /**< Next loop at the same level. */
69 } ;
70 typedef struct cloogloop CloogLoop ;
73 /******************************************************************************
74 * Structure display function *
75 ******************************************************************************/
76 void cloog_loop_print_structure(FILE *, CloogLoop *, int) ;
77 void cloog_loop_print(FILE *, CloogLoop *) ;
80 /******************************************************************************
81 * Memory deallocation function *
82 ******************************************************************************/
83 void cloog_loop_free(CloogLoop *) ;
86 /******************************************************************************
87 * Reading functions *
88 ******************************************************************************/
89 CloogLoop * cloog_loop_read(FILE *, int, int) ;
92 /******************************************************************************
93 * Processing functions *
94 ******************************************************************************/
95 CloogLoop * cloog_loop_malloc() ;
96 CloogLoop * cloog_loop_generate(CloogLoop *, CloogDomain *, int, int,
97 int *, int, int, CloogOptions *) ;
98 CloogLoop * cloog_loop_simplify(CloogLoop *, CloogDomain *, int, int) ;
99 CloogLoop * cloog_loop_fast_simplify(CloogLoop *, CloogDomain *, int, int) ;
100 CloogLoop * cloog_loop_clean(CloogLoop *) ;
101 void cloog_loop_scatter(CloogLoop *, CloogDomain *) ;
102 void cloog_loop_strides(CloogLoop *, int) ;
103 void cloog_loop_normalize(CloogLoop * loop, int) ;
106 #if defined(__cplusplus)
108 #endif
109 #endif /* define _H */