1 2 /**-------------------------------------------------------------------** 3 ** CLooG ** 4 **-------------------------------------------------------------------** 5 ** names.h ** 6 **-------------------------------------------------------------------** 7 ** First version: august 1st 2002 ** 8 **-------------------------------------------------------------------**/ 9 10 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 (at) inria.fr * 34 * * 35 ******************************************************************************/ 36 37 38 #ifndef CLOOG_NAMES_H 39 #define CLOOG_NAMES_H 40 #if defined(__cplusplus) 41 extern "C" 42 { 43 #endif 44 45 46 # define MAX_NAME 50 47 # define FIRST_PARAMETER 'M' 48 # define FIRST_ITERATOR 'i' 49 50 51 /** 52 * CloogNames structure: 53 * this structure contains all the informations about parameter and iterator 54 * names (as strings). 55 */ 56 struct cloognames 57 { int nb_scalars ; /**< Scalar dimension number. */ 58 int nb_scattering ; /**< Scattering iterator number. */ 59 int nb_iterators ; /**< Iterator number. */ 60 int nb_parameters ; /**< Parameter number. */ 61 char ** scalars ; /**< The scalar names (an array of strings). */ 62 char ** scattering ; /**< The scattering names (an array of strings). */ 63 char ** iterators ; /**< The iterator names (an array of strings). */ 64 char ** parameters ; /**< The parameter names (an array of strings). */ 65 int references; /**< Number of references to this structure. */ 66 } ; 67 typedef struct cloognames CloogNames ; 68 69 70 /****************************************************************************** 71 * Structure display function * 72 ******************************************************************************/ 73 void cloog_names_print_structure(FILE *, CloogNames *, int) ; 74 void cloog_names_print(FILE *, CloogNames *) ; 75 76 77 /****************************************************************************** 78 * Memory deallocation function * 79 ******************************************************************************/ 80 void cloog_names_free(CloogNames *) ; 81 82 83 /****************************************************************************** 84 * Reading functions * 85 ******************************************************************************/ 86 char ** cloog_names_read_strings(FILE *file, int nb_items); 87 88 89 /****************************************************************************** 90 * Processing functions * 91 ******************************************************************************/ 92 CloogNames * cloog_names_malloc(void); 93 CloogNames * cloog_names_copy(CloogNames *names); 94 CloogNames * cloog_names_alloc(void); 95 char ** cloog_names_generate_items(int, char *, char) ; 96 CloogNames * cloog_names_generate(int, int, int, int, char, char, char, char) ; 97 void cloog_names_scalarize(CloogNames *, int, int *) ; 98 const char * cloog_names_name_at_level(CloogNames *names, int level); 99 100 #if defined(__cplusplus) 101 } 102 #endif 103 #endif /* define _H */ 104