projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrote categorical value-handling
[pspp]
/
src
/
matrix-data.c
diff --git
a/src/matrix-data.c
b/src/matrix-data.c
index db6189d13d0f145b0d526a4bbc7589c2e3d27ca8..ee43d82f2ba2df94bc8cc94b9cd4119e5d8213ad 100644
(file)
--- a/
src/matrix-data.c
+++ b/
src/matrix-data.c
@@
-1143,7
+1143,7
@@
matrix_data_read_without_rowtype (struct case_source *source,
{
int *cp;
{
int *cp;
- nr->data = pool_
alloc (mx->container, (PROX + 1) *
sizeof *nr->data);
+ nr->data = pool_
nalloc (mx->container, PROX + 1,
sizeof *nr->data);
{
int i;
{
int i;
@@
-1166,12
+1166,12
@@
matrix_data_read_without_rowtype (struct case_source *source,
int n_vectors = per_factor ? mx->cells : 1;
int i;
int n_vectors = per_factor ? mx->cells : 1;
int i;
- nr->data[*cp] = pool_alloc (mx->container,
-
n_vectors *
sizeof **nr->data);
+ nr->data[*cp] = pool_
n
alloc (mx->container,
+
n_vectors,
sizeof **nr->data);
for (i = 0; i < n_vectors; i++)
for (i = 0; i < n_vectors; i++)
- nr->data[*cp][i] = pool_alloc (mx->container,
-
n_entries *
sizeof ***nr->data);
+ nr->data[*cp][i] = pool_
n
alloc (mx->container,
+
n_entries,
sizeof ***nr->data);
}
}
}
}
}
}
@@
-1836,8
+1836,8
@@
cache_miss:
{
struct factor_data *new = pool_alloc (mx->container, sizeof *new);
{
struct factor_data *new = pool_alloc (mx->container, sizeof *new);
- new->factors = pool_alloc (mx->container,
-
sizeof *new->factors * mx->n_
factors);
+ new->factors = pool_
n
alloc (mx->container,
+
mx->n_factors, sizeof *new->
factors);
{
size_t i;
{
size_t i;
@@
-1888,8
+1888,8
@@
wr_read_indeps (struct wr_aux_data *wr)
if (type == 1)
n_items *= mx->n_continuous;
if (type == 1)
n_items *= mx->n_continuous;
- c->data[wr->content] = pool_alloc (mx->container,
-
sizeof **c->data * n_items
);
+ c->data[wr->content] = pool_
n
alloc (mx->container,
+
n_items, sizeof **c->data
);
}
cp = &c->data[wr->content][n_rows * mx->n_continuous];
}
cp = &c->data[wr->content][n_rows * mx->n_continuous];