Skip to content

Commit 4e25da7

Browse files
committed
clean up
1 parent b985028 commit 4e25da7

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/bivariate/left_matmul.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ expr *new_left_matmul(expr *param_node, expr *child, const CSR_Matrix *A)
200200
node->left = child;
201201
expr_retain(child);
202202

203-
/* Store small A (NOT block-diagonal) — block functions handle the rest */
203+
/* Store small A (NOT block-diagonal) — block functions handle the rest
204+
Allocate workspace. iwork is used for converting J_child csr to csc
205+
(requring size node->n_vars). csc_to_csr_workspace is used for
206+
converting J_CSC to CSR (requring node->size) */
204207
node->iwork = (int *) malloc(node->n_vars * sizeof(int));
205208
lin_node->AT_iwork = (int *) malloc(A->n * sizeof(int));
206209
lin_node->csc_to_csr_workspace = (int *) malloc(node->size * sizeof(int));

src/bivariate/vector_mult.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
static void forward(expr *node, const double *u)
2828
{
2929
expr *child = node->left;
30-
// vector_mult_expr *vn = (vector_mult_expr *) node;
31-
// const double *a = vn->param_source->value;
32-
3330
const double *a = ((vector_mult_expr *) node)->param_source->value;
3431

3532
/* child's forward pass */
@@ -58,9 +55,6 @@ static void jacobian_init(expr *node)
5855
static void eval_jacobian(expr *node)
5956
{
6057
expr *x = node->left;
61-
// vector_mult_expr *vn = (vector_mult_expr *) node;
62-
// const double *a = vn->param_source->value;
63-
6458
const double *a = ((vector_mult_expr *) node)->param_source->value;
6559

6660
/* evaluate x */
@@ -94,9 +88,6 @@ static void wsum_hess_init(expr *node)
9488
static void eval_wsum_hess(expr *node, const double *w)
9589
{
9690
expr *x = node->left;
97-
// vector_mult_expr *vn = (vector_mult_expr *) node;
98-
// const double *a = vn->param_source->value;
99-
10091
const double *a = ((vector_mult_expr *) node)->param_source->value;
10192

10293
/* scale weights w by a */

0 commit comments

Comments
 (0)