int start_index_in = in.stat_head->ds_cnt * j;
int start_index_out = out.stat_head->ds_cnt * out.stat_head->rra_cnt;
+ out.rra_def = copy_over_realloc(out.rra_def, out.stat_head->rra_cnt,
+ in.rra_def, j,
+ sizeof(rra_def_t));
+ if (out.rra_def == NULL) goto done;
+
+ // adapt row count:
+ out.rra_def[out.stat_head->rra_cnt].row_cnt = final_row_count;
+
+ out.rra_ptr = copy_over_realloc(out.rra_ptr, out.stat_head->rra_cnt,
+ &rra_0_ptr, 0,
+ sizeof(rra_ptr_t));
+ if (out.rra_ptr == NULL) goto done;
+
int ii;
for (i = ii = 0 ; i < ops_cnt ; i++) {
switch (ops[i]) {
break;
}
case 'a': {
- memcpy(out.cdp_prep + start_index_out + ii,
+ cdp_prep_t *cdp_prep = out.cdp_prep + start_index_out + ii;
+ memcpy(cdp_prep,
&empty_cdp_prep, sizeof(cdp_prep_t));
+
+ init_cdp(&out,
+ out.rra_def + out.stat_head->rra_cnt,
+ cdp_prep);
ii++;
break;
}
}
}
- out.rra_def = copy_over_realloc(out.rra_def, out.stat_head->rra_cnt,
- in.rra_def, j,
- sizeof(rra_def_t));
- if (out.rra_def == NULL) goto done;
-
- // adapt row count:
- out.rra_def[out.stat_head->rra_cnt].row_cnt = final_row_count;
-
- out.rra_ptr = copy_over_realloc(out.rra_ptr, out.stat_head->rra_cnt,
- &rra_0_ptr, 0,
- sizeof(rra_ptr_t));
- if (out.rra_ptr == NULL) goto done;
-
total_out_rra_rows += out.rra_def[out.stat_head->rra_cnt].row_cnt;
out.stat_head->rra_cnt++;
char *all_data = NULL;
-
/* prepare space to read data in */
all_data = realloc(all_data,
total_in_rra_rows * in.stat_head->ds_cnt