{
assert(m0->n == m1->n);
assert(m->n == m0->n);
-
+#if 1
if (m->n <= n_min)
return mat_mul(m, m0, m1);
-
+#endif
if (n_min < 16)
- printf("%s(), n_min: %d\n", __func__, n_min);
+ printf("%s(), m->n: %d, n_min: %d\n", __func__, m->n, n_min);
int n = m->n / 2;
- mat_t* a = mat_alloc(0, 0, n, m0->b);
- mat_t* b = mat_alloc(0, n, n, m0->b);
- mat_t* c = mat_alloc(n, 0, n, m0->b);
- mat_t* d = mat_alloc(n, n, n, m0->b);
+ mat_t* a = mat_alloc(m0->i, m0->j, n, m0->b);
+ mat_t* b = mat_alloc(m0->i, m0->j + n, n, m0->b);
+ mat_t* c = mat_alloc(m0->i + n, m0->j, n, m0->b);
+ mat_t* d = mat_alloc(m0->i + n, m0->j + n, n, m0->b);
- mat_t* e = mat_alloc(0, 0, n, m1->b);
- mat_t* f = mat_alloc(0, n, n, m1->b);
- mat_t* g = mat_alloc(n, 0, n, m1->b);
- mat_t* h = mat_alloc(n, n, n, m1->b);
+ mat_t* e = mat_alloc(m1->i, m1->j, n, m1->b);
+ mat_t* f = mat_alloc(m1->i, m1->j + n, n, m1->b);
+ mat_t* g = mat_alloc(m1->i + n, m1->j, n, m1->b);
+ mat_t* h = mat_alloc(m1->i + n, m1->j + n, n, m1->b);
- mat_t* r = mat_alloc(0, 0, n, m->b);
- mat_t* s = mat_alloc(0, n, n, m->b);
- mat_t* t = mat_alloc(n, 0, n, m->b);
- mat_t* u = mat_alloc(n, n, n, m->b);
+ mat_t* r = mat_alloc(m->i, m->j, n, m->b);
+ mat_t* s = mat_alloc(m->i, m->j + n, n, m->b);
+ mat_t* t = mat_alloc(m->i + n, m->j, n, m->b);
+ mat_t* u = mat_alloc(m->i + n, m->j + n, n, m->b);
mat_t* p1 = mat_alloc(0, 0, n, NULL);
mat_t* p2 = mat_alloc(0, 0, n, NULL);