Skip to content

Commit 4813f42

Browse files
committed
revert
1 parent feb8ad7 commit 4813f42

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/utils/sparse_matrix.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,13 @@ Matrix *new_sparse_matrix(const CSR_Matrix *A)
6363
Matrix *sparse_matrix_trans(const Sparse_Matrix *self, int *iwork)
6464
{
6565
CSR_Matrix *AT = transpose(self->csr, iwork);
66-
return new_sparse_matrix(AT);
66+
Sparse_Matrix *sm = (Sparse_Matrix *) calloc(1, sizeof(Sparse_Matrix));
67+
sm->base.m = AT->m;
68+
sm->base.n = AT->n;
69+
sm->base.block_left_mult_vec = sparse_block_left_mult_vec;
70+
sm->base.block_left_mult_sparsity = sparse_block_left_mult_sparsity;
71+
sm->base.block_left_mult_values = sparse_block_left_mult_values;
72+
sm->base.free_fn = sparse_free;
73+
sm->csr = AT;
74+
return &sm->base;
6775
}

0 commit comments

Comments
 (0)