OSDN Git Service

Add Fariborz to my last change.
[pf3gnuchains/gcc-fork.git] / gcc / lambda.h
1 /* Lambda matrix interface.
2    Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3    Contributed by Daniel Berlin <dberlin@dberlin.org>
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21  
22 #ifndef LAMBDA_H
23 #define LAMBDA_H
24
25 typedef int *lambda_vector;
26
27 /* Allocate a new vector of given SIZE.  */
28
29 static inline lambda_vector
30 lambda_vector_new (int size)
31 {
32   return ggc_alloc_cleared (size * sizeof(int));
33 }
34
35 /* Clear out vector VEC1 of length SIZE.  */
36
37 static inline void
38 lambda_vector_clear (lambda_vector vec1, int size)
39 {
40   memset (vec1, 0, size * sizeof (int));
41 }
42
43 /* Print out a vector VEC of length N to OUTFILE.  */
44
45 static inline void
46 print_lambda_vector (FILE * outfile, lambda_vector vector, int n)
47 {
48   int i;
49
50   for (i = 0; i < n; i++)
51     fprintf (outfile, "%3d ", vector[i]);
52   fprintf (outfile, "\n");
53 }
54
55
56 #endif /* LAMBDA_H  */
57