misc. corrections

This commit is contained in:
Miguel M 2023-04-26 15:48:11 +01:00
parent c5f5a5f1ff
commit f299b689f2
2 changed files with 2 additions and 5 deletions

View File

@ -30,7 +30,7 @@ int main(int argc, char *argv[])
size_t a_in = A_INPUTS;
size_t b_in = B_INPUTS;
size_t row_len = ((a_out-1)*(b_out-1)*a_in*b_in + (a_out-1)*a_in +
(b_out-1)*b_in);
(b_out-1)*b_in) + 1; // +1 accounts for the L column.
matrix_t matrix = ParseMatrix(row_len);
size_t row_count = matrix.entries_len / row_len;
for (size_t row = 0; row < row_count; row++) {

View File

@ -76,10 +76,7 @@ matrix_bufs_t increase_input_buffers(matrix_bufs_t bufs)
}
// Compacts the allocated memory to fit exactly the number of elements.
//
// As reallocation will happen, the updated pointers and capacity are returned
// in an updated parameters object.
matrix_bufs_t compact_buffers(matrix_t *matrix) {
void compact_buffers(matrix_t *matrix) {
matrix->data_head = realloc(matrix->data_head, matrix->data_len * sizeof(matrix_data_t));
matrix->entries_head = realloc(matrix->entries_head, matrix->entries_len * sizeof(matrix_data_t *));
if ((matrix->data_head == NULL) || (matrix->entries_head == NULL))