First commit : 0.14.0 version (with roadmap in doc instead of
[cloog/uuh.git] / include / cloog / program.h
blob02a1c6c275d4de40d795ce8c45835c676b81ea8a
2 /**-------------------------------------------------------------------**
3 ** CLooG **
4 **-------------------------------------------------------------------**
5 ** program.h **
6 **-------------------------------------------------------------------**
7 ** First version: october 25th 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_PROGRAM_H
38 #define CLOOG_PROGRAM_H
39 #if defined(__cplusplus)
40 extern "C"
42 #endif
45 # define MAX_STRING 1024
46 # define MEGA 1000000 /* One million. */
49 /**
50 * CloogProgram structure:
51 * this structure contains all the informations of a program generated or to be
52 * generated.
54 struct cloogprogram
55 { /* Basic program description fields. */
56 char language ; /**< The language of the program. */
57 int nb_scattdims ; /**< Scattering dimension number. */
58 CloogDomain * context ; /**< The context of the program. */
59 CloogLoop * loop ; /**< The loops of the program. */
60 CloogNames * names ; /**< Iterators and parameters names. */
61 CloogBlockList * blocklist ; /**< The statement block list. */
63 /* Internal service fields, filled up by cloog_program_scatter function. */
64 int * scaldims ; /**< Boolean array saying whether a given
65 * scattering dimension is scalar or not.
67 } ;
68 typedef struct cloogprogram CloogProgram ;
71 /******************************************************************************
72 * Structure display function *
73 ******************************************************************************/
74 void cloog_program_print_structure(FILE *, CloogProgram *, int) ;
75 void cloog_program_print(FILE *, CloogProgram *) ;
76 void cloog_program_pprint(FILE *, CloogProgram *, CloogOptions *) ;
77 void cloog_program_dump_cloog(FILE *, CloogProgram *) ;
80 /******************************************************************************
81 * Memory deallocation function *
82 ******************************************************************************/
83 void cloog_program_free(CloogProgram *) ;
86 /******************************************************************************
87 * Reading function *
88 ******************************************************************************/
89 CloogProgram * cloog_program_read(FILE *, CloogOptions *) ;
92 /******************************************************************************
93 * Processing functions *
94 ******************************************************************************/
95 CloogProgram * cloog_program_malloc() ;
96 CloogProgram * cloog_program_generate(CloogProgram *, CloogOptions *) ;
97 void cloog_program_block(CloogProgram *, CloogDomainList *) ;
98 void cloog_program_extract_scalars(CloogProgram *program, CloogDomainList *) ;
99 void cloog_program_scatter(CloogProgram *, CloogDomainList *) ;
101 #if defined(__cplusplus)
103 #endif
104 #endif /* define _H */