bearch: Dump the output requirement and the assigned register in the same line for...
[libfirm] / ir / kaps / vector.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   PBQP vector.
23  * @date    02.10.2008
24  * @author  Sebastian Buchwald
25  */
26 #ifndef KAPS_VECTOR_H
27 #define KAPS_VECTOR_H
28
29 #include "vector_t.h"
30
31 num pbqp_add(num x, num y);
32
33 vector_t *vector_alloc(pbqp_t *pbqp, unsigned length);
34
35 /* Copy the given vector. */
36 vector_t *vector_copy(pbqp_t *pbqp, vector_t *v);
37
38 /* sum += summand */
39 void vector_add(vector_t *sum, vector_t *summand);
40
41 void vector_set(vector_t *vec, unsigned index, num value);
42
43 #if KAPS_ENABLE_VECTOR_NAMES
44 void vector_set_description(vector_t *vec, unsigned index, const char *name);
45 #endif
46
47 void vector_add_value(vector_t *vec, num value);
48
49 void vector_add_matrix_col(vector_t *vec, pbqp_matrix_t *mat, unsigned col_index);
50 void vector_add_matrix_row(vector_t *vec, pbqp_matrix_t *mat, unsigned row_index);
51
52 num vector_get_min(vector_t *vec);
53 unsigned vector_get_min_index(vector_t *vec);
54
55 #endif /* KAPS_VECTOR_H */