2 /**-------------------------------------------------------------------**
4 **-------------------------------------------------------------------**
6 **-------------------------------------------------------------------**
7 ** First version: october 25th 2001 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
15 * Copyright (C) 2001-2005 Cedric Bastoul *
17 * This library is free software; you can redistribute it and/or *
18 * modify it under the terms of the GNU Lesser General Public *
19 * License as published by the Free Software Foundation; either *
20 * version 2.1 of the License, or (at your option) any later version. *
22 * This library is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
25 * Lesser General Public License for more details. *
27 * You should have received a copy of the GNU Lesser General Public *
28 * License along with this library; if not, write to the Free Software *
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
30 * Boston, MA 02110-1301 USA *
32 * CLooG, the Chunky Loop Generator *
33 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
35 ******************************************************************************/
38 #ifndef CLOOG_PROGRAM_H
39 #define CLOOG_PROGRAM_H
40 #if defined(__cplusplus)
46 # define MAX_STRING 1024
47 # define MEGA 1000000 /* One million. */
51 * CloogProgram structure:
52 * this structure contains all the informations of a program generated or to be
56 { /* Basic program description fields. */
57 char language
; /**< The language of the program. */
58 int nb_scattdims
; /**< Scattering dimension number. */
59 CloogDomain
* context
; /**< The context of the program. */
60 CloogLoop
* loop
; /**< The loops of the program. */
61 CloogNames
* names
; /**< Iterators and parameters names. */
62 CloogBlockList
* blocklist
; /**< The statement block list. */
64 /* Internal service fields, filled up by cloog_program_scatter function. */
65 int * scaldims
; /**< Boolean array saying whether a given
66 * scattering dimension is scalar or not.
68 /* Library user reserved field. */
69 void * usr
; /**< User field, for library user convenience.
70 * This pointer is not freed when the
71 * CloogProgram structure is freed.
74 typedef struct cloogprogram CloogProgram
;
77 /******************************************************************************
78 * Structure display function *
79 ******************************************************************************/
80 void cloog_program_print_structure(FILE *, CloogProgram
*, int) ;
81 void cloog_program_print(FILE *, CloogProgram
*) ;
82 void cloog_program_pprint(FILE *, CloogProgram
*, CloogOptions
*) ;
83 void cloog_program_dump_cloog(FILE *, CloogProgram
*, CloogScatteringList
*);
86 /******************************************************************************
87 * Memory deallocation function *
88 ******************************************************************************/
89 void cloog_program_free(CloogProgram
*) ;
92 /******************************************************************************
94 ******************************************************************************/
95 CloogProgram
* cloog_program_read(FILE *, CloogOptions
*) ;
98 /******************************************************************************
99 * Processing functions *
100 ******************************************************************************/
101 CloogProgram
* cloog_program_malloc(void);
102 CloogProgram
* cloog_program_alloc(CloogDomain
*context
, CloogUnionDomain
*ud
,
103 CloogOptions
*options
);
104 CloogProgram
* cloog_program_generate(CloogProgram
*, CloogOptions
*) ;
105 void cloog_program_block(CloogProgram
*program
,
106 CloogScatteringList
*scattering
, CloogOptions
*options
);
107 void cloog_program_extract_scalars(CloogProgram
*program
,
108 CloogScatteringList
*scattering
, CloogOptions
*options
);
109 void cloog_program_scatter(CloogProgram
*program
,
110 CloogScatteringList
*scattering
, CloogOptions
*options
);
112 #if defined(__cplusplus)
115 #endif /* define _H */