Get rid of the warning about ignoring the return value of fgets
[cloog/uuh.git] / include / cloog / program.h
blob530d21f2e0959a7b18824cd3f7399351b36a8461
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 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. *
21 * *
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. *
26 * *
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 *
31 * *
32 * CLooG, the Chunky Loop Generator *
33 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 * *
35 ******************************************************************************/
38 #ifndef CLOOG_PROGRAM_H
39 #define CLOOG_PROGRAM_H
40 #if defined(__cplusplus)
41 extern "C"
43 #endif
46 # define MAX_STRING 1024
47 # define MEGA 1000000 /* One million. */
50 /**
51 * CloogProgram structure:
52 * this structure contains all the informations of a program generated or to be
53 * generated.
55 struct cloogprogram
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.
73 } ;
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 /******************************************************************************
93 * Reading function *
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)
114 #endif
115 #endif /* define _H */