1 /* Lambda matrix interface.
2 Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin <dberlin@dberlin.org>
5 This file is part of GCC.
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
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
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
25 typedef int *lambda_vector
;
27 /* Allocate a new vector of given SIZE. */
29 static inline lambda_vector
30 lambda_vector_new (int size
)
32 return ggc_alloc_cleared (size
* sizeof(int));
35 /* Clear out vector VEC1 of length SIZE. */
38 lambda_vector_clear (lambda_vector vec1
, int size
)
40 memset (vec1
, 0, size
* sizeof (int));
43 /* Print out a vector VEC of length N to OUTFILE. */
46 print_lambda_vector (FILE * outfile
, lambda_vector vector
, int n
)
50 for (i
= 0; i
< n
; i
++)
51 fprintf (outfile
, "%3d ", vector
[i
]);
52 fprintf (outfile
, "\n");