Checkpoint: about to rewrite/erase this approach, because CG-P-CG conversions are needed
This commit is contained in:
parent
6531273021
commit
37f8b0a30a
31
src/main.c
31
src/main.c
|
@ -39,20 +39,20 @@ int main(int argc, char *argv[])
|
|||
|
||||
_Bool *seen = calloc(row_count, sizeof(_Bool));
|
||||
|
||||
for (size_t base_row_i = 0; base_row_i < row_count - 1; base_row_i++)
|
||||
for (size_t base_row_i= 0; base_row_i < row_count - 1; base_row_i++)
|
||||
{
|
||||
if (seen[base_row_i])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
matrix_data_t *base_row = matrix.head + base_row_i * matrix.row_len;
|
||||
matrix_data_t base_l = base_row[matrix.row_len - 1];
|
||||
data_t *base_row = matrix.head + base_row_i * matrix.row_len;
|
||||
data_t base_l = base_row[matrix.row_len - 1];
|
||||
|
||||
for (size_t cmp_row_i = base_row_i + 1; cmp_row_i < row_count; cmp_row_i++)
|
||||
{
|
||||
matrix_data_t *cmp_row = matrix.head + cmp_row_i * matrix.row_len;
|
||||
matrix_data_t cmp_l = cmp_row[matrix.row_len - 1];
|
||||
data_t *cmp_row = matrix.head + cmp_row_i * matrix.row_len;
|
||||
data_t cmp_l = cmp_row[matrix.row_len - 1];
|
||||
|
||||
if (base_l != cmp_l)
|
||||
{
|
||||
|
@ -124,7 +124,28 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
if (!seen[i])
|
||||
{
|
||||
#if RELEASE
|
||||
PrintMatrixRow(&matrix, i);
|
||||
#else
|
||||
printf("%zu:\n ", i);
|
||||
data_t *row = matrix.head + i * matrix.row_len;
|
||||
for (size_t a_in_i = 0; a_in_i < a_in; a_in_i++)
|
||||
{
|
||||
for (size_t a_out_i = 0; a_out_i < a_out; a_out_i++)
|
||||
{
|
||||
for (size_t b_in_i = 0; b_in_i < b_in; b_in_i++)
|
||||
{
|
||||
for (size_t b_out_i = 0; b_out_i < b_out; b_out_i++)
|
||||
{
|
||||
size_t idx = b_out_i + b_out * (b_in_i + b_in * (a_out_i + a_out * a_in_i));
|
||||
printf("(%zu,%zu|%zu,%zu): %" PRImDATA ", ", a_out_i, b_out_i, a_in_i, b_in_i, row[idx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("L: %" PRImDATA, row[matrix.row_len - 1]);
|
||||
printf("\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue