projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
029514dda5614999ff7816aa2bdf734ee8d938bc
[libfirm]
/
matrix.c
1
#include "assert.h"
2
3
#include "pbqp_t.h"
4
#include "matrix.h"
5
6
matrix *matrix_copy(pbqp *pbqp, matrix *m)
7
{
8
int i;
9
int len;
10
matrix *copy = obstack_alloc(&pbqp->obstack, sizeof(*copy));
11
12
assert(copy);
13
14
len = m->rows * m->cols;
15
16
for (i = 0; i < len; ++i) {
17
copy->entries[i] = m->entries[i];
18
}
19
20
return copy;
21
}