update QEXT to new dynamic version
This commit is contained in:
12
mat.c
12
mat.c
@@ -1,11 +1,11 @@
|
||||
#include "mat.h"
|
||||
|
||||
mat_workspace *mat_workspace_init(int n)
|
||||
mat_workspace *mat_workspace_init(int n, TYPE t)
|
||||
{
|
||||
mat_workspace *ws = (mat_workspace*)malloc(sizeof(mat_workspace));
|
||||
mat_init(ws->tmp_mat, n);
|
||||
INIT(ws->tmp_num);
|
||||
INIT(ws->tmp_num2);
|
||||
mat_init(ws->tmp_mat, n, t);
|
||||
INIT(ws->tmp_num, t);
|
||||
INIT(ws->tmp_num2, t);
|
||||
return ws;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ void mat_workspace_clear(mat_workspace *ws)
|
||||
free(ws);
|
||||
}
|
||||
|
||||
void mat_init(mat m, int n)
|
||||
void mat_init(mat m, int n, TYPE t)
|
||||
{
|
||||
m->n = n;
|
||||
m->x = malloc(n*n*sizeof(NUMBER));
|
||||
LOOP(i,n) LOOP(j,n) INIT(m->x[i+j*n]);
|
||||
LOOP(i,n) LOOP(j,n) INIT(m->x[i+j*n], t);
|
||||
}
|
||||
|
||||
void mat_get(NUMBER out, mat m, int i, int j)
|
||||
|
||||
Reference in New Issue
Block a user