From 5a7f9b568625847d44c57b92030437fbfa94bd4f Mon Sep 17 00:00:00 2001 From: dance858 Date: Fri, 27 Mar 2026 05:44:18 -0700 Subject: [PATCH 1/4] move affine atoms from bivariate to affine --- include/affine.h | 25 ++++++++++++- include/bivariate.h | 35 ++++--------------- include/bivariate_full_dom.h | 11 ++++++ include/bivariate_restricted_dom.h | 11 ++++++ src/{bivariate => affine}/const_scalar_mult.c | 2 +- src/{bivariate => affine}/const_vector_mult.c | 2 +- src/affine/diag_vec.c | 2 +- src/{bivariate => affine}/left_matmul.c | 2 +- src/{bivariate => affine}/right_matmul.c | 2 +- .../matmul.c | 2 +- .../multiply.c | 2 +- .../quad_over_lin.c | 2 +- .../rel_entr.c | 2 +- .../rel_entr_scalar_vector.c | 2 +- .../rel_entr_vector_scalar.c | 2 +- 15 files changed, 63 insertions(+), 41 deletions(-) create mode 100644 include/bivariate_full_dom.h create mode 100644 include/bivariate_restricted_dom.h rename src/{bivariate => affine}/const_scalar_mult.c (99%) rename src/{bivariate => affine}/const_vector_mult.c (99%) rename src/{bivariate => affine}/left_matmul.c (99%) rename src/{bivariate => affine}/right_matmul.c (98%) rename src/{bivariate => bivariate_full_dom}/matmul.c (99%) rename src/{bivariate => bivariate_full_dom}/multiply.c (99%) rename src/{bivariate => bivariate_restricted_dom}/quad_over_lin.c (99%) rename src/{bivariate => bivariate_restricted_dom}/rel_entr.c (99%) rename src/{bivariate => bivariate_restricted_dom}/rel_entr_scalar_vector.c (99%) rename src/{bivariate => bivariate_restricted_dom}/rel_entr_vector_scalar.c (99%) diff --git a/include/affine.h b/include/affine.h index eccd5fbb..473738ef 100644 --- a/include/affine.h +++ b/include/affine.h @@ -41,6 +41,29 @@ expr *new_reshape(expr *child, int d1, int d2); expr *new_broadcast(expr *child, int target_d1, int target_d2); expr *new_diag_vec(expr *child); expr *new_transpose(expr *child); -expr *new_diag_vec(expr *child); + +/* Left matrix multiplication: A @ f(x) where A is a constant sparse + * matrix */ +expr *new_left_matmul(expr *u, const CSR_Matrix *A); + +/* Left matrix multiplication: A @ f(x) where A is a constant dense + * matrix (row-major, m x n). Uses CBLAS for efficient computation. */ +expr *new_left_matmul_dense(expr *u, int m, int n, + const double *data); + +/* Right matrix multiplication: f(x) @ A where A is a constant + * matrix */ +expr *new_right_matmul(expr *u, const CSR_Matrix *A); + +expr *new_right_matmul_dense(expr *u, int m, int n, + const double *data); + +/* Constant scalar multiplication: a * f(x) where a is a constant + * double */ +expr *new_const_scalar_mult(double a, expr *child); + +/* Constant vector elementwise multiplication: a . f(x) where a is + * constant */ +expr *new_const_vector_mult(const double *a, expr *child); #endif /* AFFINE_H */ diff --git a/include/bivariate.h b/include/bivariate.h index 7260f33b..977ac2a8 100644 --- a/include/bivariate.h +++ b/include/bivariate.h @@ -18,34 +18,11 @@ #ifndef BIVARIATE_H #define BIVARIATE_H -#include "expr.h" - -expr *new_elementwise_mult(expr *left, expr *right); -expr *new_rel_entr_vector_args(expr *left, expr *right); -expr *new_quad_over_lin(expr *left, expr *right); - -expr *new_rel_entr_first_arg_scalar(expr *left, expr *right); -expr *new_rel_entr_second_arg_scalar(expr *left, expr *right); - -/* Matrix multiplication: Z = X @ Y */ -expr *new_matmul(expr *x, expr *y); - -/* Left matrix multiplication: A @ f(x) where A is a constant sparse matrix */ -expr *new_left_matmul(expr *u, const CSR_Matrix *A); - -/* Left matrix multiplication: A @ f(x) where A is a constant dense matrix - * (row-major, m x n). Uses CBLAS for efficient computation. */ -expr *new_left_matmul_dense(expr *u, int m, int n, const double *data); - -/* Right matrix multiplication: f(x) @ A where A is a constant matrix */ -expr *new_right_matmul(expr *u, const CSR_Matrix *A); - -expr *new_right_matmul_dense(expr *u, int m, int n, const double *data); - -/* Constant scalar multiplication: a * f(x) where a is a constant double */ -expr *new_const_scalar_mult(double a, expr *child); - -/* Constant vector elementwise multiplication: a ∘ f(x) where a is constant */ -expr *new_const_vector_mult(const double *a, expr *child); +/* Compatibility header — includes all bivariate-related declarations. + * Prefer including the specific header directly: + * affine.h, bivariate_full_dom.h, bivariate_restricted_dom.h */ +#include "affine.h" +#include "bivariate_full_dom.h" +#include "bivariate_restricted_dom.h" #endif /* BIVARIATE_H */ diff --git a/include/bivariate_full_dom.h b/include/bivariate_full_dom.h new file mode 100644 index 00000000..dfaf2c03 --- /dev/null +++ b/include/bivariate_full_dom.h @@ -0,0 +1,11 @@ +#ifndef BIVARIATE_FULL_DOM_H +#define BIVARIATE_FULL_DOM_H + +#include "expr.h" + +expr *new_elementwise_mult(expr *left, expr *right); + +/* Matrix multiplication: Z = X @ Y */ +expr *new_matmul(expr *x, expr *y); + +#endif /* BIVARIATE_FULL_DOM_H */ diff --git a/include/bivariate_restricted_dom.h b/include/bivariate_restricted_dom.h new file mode 100644 index 00000000..66c933e3 --- /dev/null +++ b/include/bivariate_restricted_dom.h @@ -0,0 +1,11 @@ +#ifndef BIVARIATE_RESTRICTED_DOM_H +#define BIVARIATE_RESTRICTED_DOM_H + +#include "expr.h" + +expr *new_quad_over_lin(expr *left, expr *right); +expr *new_rel_entr_vector_args(expr *left, expr *right); +expr *new_rel_entr_first_arg_scalar(expr *left, expr *right); +expr *new_rel_entr_second_arg_scalar(expr *left, expr *right); + +#endif /* BIVARIATE_RESTRICTED_DOM_H */ diff --git a/src/bivariate/const_scalar_mult.c b/src/affine/const_scalar_mult.c similarity index 99% rename from src/bivariate/const_scalar_mult.c rename to src/affine/const_scalar_mult.c index 82c2ae7e..47777298 100644 --- a/src/bivariate/const_scalar_mult.c +++ b/src/affine/const_scalar_mult.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "affine.h" #include "subexpr.h" #include #include diff --git a/src/bivariate/const_vector_mult.c b/src/affine/const_vector_mult.c similarity index 99% rename from src/bivariate/const_vector_mult.c rename to src/affine/const_vector_mult.c index 6db7da83..3e3f01f0 100644 --- a/src/bivariate/const_vector_mult.c +++ b/src/affine/const_vector_mult.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "affine.h" #include "subexpr.h" #include #include diff --git a/src/affine/diag_vec.c b/src/affine/diag_vec.c index a804af55..53d2aec8 100644 --- a/src/affine/diag_vec.c +++ b/src/affine/diag_vec.c @@ -34,7 +34,7 @@ static void forward(expr *node, const double *u) /* child's forward pass */ x->forward(x, u); - /* zero-initialize output */ + /* zero-initialize output, TODO: do we need to do this? */ memset(node->value, 0, node->size * sizeof(double)); /* place input elements on the diagonal */ diff --git a/src/bivariate/left_matmul.c b/src/affine/left_matmul.c similarity index 99% rename from src/bivariate/left_matmul.c rename to src/affine/left_matmul.c index 843c5526..20f5ce8e 100644 --- a/src/bivariate/left_matmul.c +++ b/src/affine/left_matmul.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "affine.h" #include "subexpr.h" #include "utils/matrix.h" #include diff --git a/src/bivariate/right_matmul.c b/src/affine/right_matmul.c similarity index 98% rename from src/bivariate/right_matmul.c rename to src/affine/right_matmul.c index 1ebff1f7..f3740a9f 100644 --- a/src/bivariate/right_matmul.c +++ b/src/affine/right_matmul.c @@ -16,7 +16,7 @@ * limitations under the License. */ #include "affine.h" -#include "bivariate.h" + #include "utils/CSR_Matrix.h" #include diff --git a/src/bivariate/matmul.c b/src/bivariate_full_dom/matmul.c similarity index 99% rename from src/bivariate/matmul.c rename to src/bivariate_full_dom/matmul.c index 46a4bdf1..2e408d41 100644 --- a/src/bivariate/matmul.c +++ b/src/bivariate_full_dom/matmul.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "subexpr.h" #include "utils/mini_numpy.h" #include diff --git a/src/bivariate/multiply.c b/src/bivariate_full_dom/multiply.c similarity index 99% rename from src/bivariate/multiply.c rename to src/bivariate_full_dom/multiply.c index 36585e7f..3ed9990b 100644 --- a/src/bivariate/multiply.c +++ b/src/bivariate_full_dom/multiply.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "subexpr.h" #include "utils/CSR_sum.h" #include diff --git a/src/bivariate/quad_over_lin.c b/src/bivariate_restricted_dom/quad_over_lin.c similarity index 99% rename from src/bivariate/quad_over_lin.c rename to src/bivariate_restricted_dom/quad_over_lin.c index c1b38804..69868208 100644 --- a/src/bivariate/quad_over_lin.c +++ b/src/bivariate_restricted_dom/quad_over_lin.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "subexpr.h" #include "utils/CSC_Matrix.h" #include diff --git a/src/bivariate/rel_entr.c b/src/bivariate_restricted_dom/rel_entr.c similarity index 99% rename from src/bivariate/rel_entr.c rename to src/bivariate_restricted_dom/rel_entr.c index 733e436a..4a3c771e 100644 --- a/src/bivariate/rel_entr.c +++ b/src/bivariate_restricted_dom/rel_entr.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include #include #include diff --git a/src/bivariate/rel_entr_scalar_vector.c b/src/bivariate_restricted_dom/rel_entr_scalar_vector.c similarity index 99% rename from src/bivariate/rel_entr_scalar_vector.c rename to src/bivariate_restricted_dom/rel_entr_scalar_vector.c index fda332a0..36da26ee 100644 --- a/src/bivariate/rel_entr_scalar_vector.c +++ b/src/bivariate_restricted_dom/rel_entr_scalar_vector.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include #include #include diff --git a/src/bivariate/rel_entr_vector_scalar.c b/src/bivariate_restricted_dom/rel_entr_vector_scalar.c similarity index 99% rename from src/bivariate/rel_entr_vector_scalar.c rename to src/bivariate_restricted_dom/rel_entr_vector_scalar.c index e042996a..dfe31b2e 100644 --- a/src/bivariate/rel_entr_vector_scalar.c +++ b/src/bivariate_restricted_dom/rel_entr_vector_scalar.c @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include #include #include From f8f3ad720afd986930c27f924134c5a39f29f5e9 Mon Sep 17 00:00:00 2001 From: dance858 Date: Fri, 27 Mar 2026 05:44:51 -0700 Subject: [PATCH 2/4] run formatter --- include/affine.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/affine.h b/include/affine.h index 473738ef..379c1cc0 100644 --- a/include/affine.h +++ b/include/affine.h @@ -48,15 +48,13 @@ expr *new_left_matmul(expr *u, const CSR_Matrix *A); /* Left matrix multiplication: A @ f(x) where A is a constant dense * matrix (row-major, m x n). Uses CBLAS for efficient computation. */ -expr *new_left_matmul_dense(expr *u, int m, int n, - const double *data); +expr *new_left_matmul_dense(expr *u, int m, int n, const double *data); /* Right matrix multiplication: f(x) @ A where A is a constant * matrix */ expr *new_right_matmul(expr *u, const CSR_Matrix *A); -expr *new_right_matmul_dense(expr *u, int m, int n, - const double *data); +expr *new_right_matmul_dense(expr *u, int m, int n, const double *data); /* Constant scalar multiplication: a * f(x) where a is a constant * double */ From eddb2cc791d57ac22516a8437df86fd4325b0221 Mon Sep 17 00:00:00 2001 From: dance858 Date: Fri, 27 Mar 2026 07:31:44 -0700 Subject: [PATCH 3/4] split tests up into folders --- src/bivariate_full_dom/multiply.c | 1 + tests/all_tests.c | 126 +++++++++--------- .../{ => affine}/test_left_matmul_dense.h | 2 +- .../{ => bivariate_full_dom}/test_matmul.h | 2 +- .../test_exp.h | 0 .../test_normal_cdf.h | 0 .../test_log.h | 0 .../{ => other}/test_prod_axis_one.h | 0 .../{ => other}/test_prod_axis_zero.h | 0 .../{ => affine}/test_broadcast.h | 0 .../{ => affine}/test_const_scalar_mult.h | 2 +- .../{ => affine}/test_const_vector_mult.h | 2 +- .../jacobian_tests/{ => affine}/test_hstack.h | 0 .../jacobian_tests/{ => affine}/test_index.h | 0 .../{ => affine}/test_left_matmul.h | 2 +- tests/jacobian_tests/{ => affine}/test_neg.h | 0 .../{ => affine}/test_promote.h | 0 .../{ => affine}/test_right_matmul.h | 2 +- tests/jacobian_tests/{ => affine}/test_sum.h | 2 +- .../jacobian_tests/{ => affine}/test_trace.h | 0 .../{ => affine}/test_transpose.h | 0 .../jacobian_tests/{ => affine}/test_vstack.h | 0 .../test_elementwise_mult.h | 2 +- .../{ => bivariate_full_dom}/test_matmul.h | 2 +- .../test_quad_over_lin.h | 2 +- .../test_rel_entr.h | 2 +- .../test_rel_entr_scalar_vector.h | 2 +- .../test_rel_entr_vector_scalar.h | 2 +- .../test_chain_rule_jacobian.h | 2 +- .../{ => composite}/test_composite_exp.h | 0 .../test_log.h | 0 tests/jacobian_tests/{ => other}/test_prod.h | 0 .../{ => other}/test_prod_axis_one.h | 0 .../{ => other}/test_prod_axis_zero.h | 0 .../{ => other}/test_quad_form.h | 1 - tests/profiling/profile_left_matmul.h | 2 +- tests/wsum_hess/{ => affine}/test_broadcast.h | 0 .../{ => affine}/test_const_scalar_mult.h | 2 +- .../{ => affine}/test_const_vector_mult.h | 2 +- tests/wsum_hess/{ => affine}/test_hstack.h | 0 tests/wsum_hess/{ => affine}/test_index.h | 0 .../wsum_hess/{ => affine}/test_left_matmul.h | 2 +- .../{ => affine}/test_right_matmul.h | 2 +- tests/wsum_hess/{ => affine}/test_sum.h | 0 tests/wsum_hess/{ => affine}/test_trace.h | 0 tests/wsum_hess/{ => affine}/test_transpose.h | 0 tests/wsum_hess/{ => affine}/test_vstack.h | 0 .../{ => bivariate_full_dom}/test_matmul.h | 2 +- .../{ => bivariate_full_dom}/test_multiply.h | 2 +- .../test_quad_over_lin.h | 2 +- .../test_rel_entr.h | 2 +- .../test_rel_entr_scalar_vector.h | 2 +- .../test_rel_entr_vector_scalar.h | 2 +- .../test_chain_rule_wsum_hess.h | 2 +- .../test_exp.h | 0 .../test_hyperbolic.h | 0 .../test_logistic.h | 0 .../test_power.h | 0 .../test_trig.h | 0 .../test_xexp.h | 0 .../test_entr.h | 0 .../test_log.h | 0 tests/wsum_hess/{ => other}/test_prod.h | 0 .../{ => other}/test_prod_axis_one.h | 0 .../{ => other}/test_prod_axis_zero.h | 0 tests/wsum_hess/{ => other}/test_quad_form.h | 0 66 files changed, 90 insertions(+), 90 deletions(-) rename tests/forward_pass/{ => affine}/test_left_matmul_dense.h (98%) rename tests/forward_pass/{ => bivariate_full_dom}/test_matmul.h (98%) rename tests/forward_pass/{elementwise => elementwise_full_dom}/test_exp.h (100%) rename tests/forward_pass/{elementwise => elementwise_full_dom}/test_normal_cdf.h (100%) rename tests/forward_pass/{elementwise => elementwise_restricted_dom}/test_log.h (100%) rename tests/forward_pass/{ => other}/test_prod_axis_one.h (100%) rename tests/forward_pass/{ => other}/test_prod_axis_zero.h (100%) rename tests/jacobian_tests/{ => affine}/test_broadcast.h (100%) rename tests/jacobian_tests/{ => affine}/test_const_scalar_mult.h (99%) rename tests/jacobian_tests/{ => affine}/test_const_vector_mult.h (99%) rename tests/jacobian_tests/{ => affine}/test_hstack.h (100%) rename tests/jacobian_tests/{ => affine}/test_index.h (100%) rename tests/jacobian_tests/{ => affine}/test_left_matmul.h (99%) rename tests/jacobian_tests/{ => affine}/test_neg.h (100%) rename tests/jacobian_tests/{ => affine}/test_promote.h (100%) rename tests/jacobian_tests/{ => affine}/test_right_matmul.h (99%) rename tests/jacobian_tests/{ => affine}/test_sum.h (99%) rename tests/jacobian_tests/{ => affine}/test_trace.h (100%) rename tests/jacobian_tests/{ => affine}/test_transpose.h (100%) rename tests/jacobian_tests/{ => affine}/test_vstack.h (100%) rename tests/jacobian_tests/{ => bivariate_full_dom}/test_elementwise_mult.h (99%) rename tests/jacobian_tests/{ => bivariate_full_dom}/test_matmul.h (99%) rename tests/jacobian_tests/{ => bivariate_restricted_dom}/test_quad_over_lin.h (99%) rename tests/jacobian_tests/{ => bivariate_restricted_dom}/test_rel_entr.h (98%) rename tests/jacobian_tests/{ => bivariate_restricted_dom}/test_rel_entr_scalar_vector.h (96%) rename tests/jacobian_tests/{ => bivariate_restricted_dom}/test_rel_entr_vector_scalar.h (96%) rename tests/jacobian_tests/{ => composite}/test_chain_rule_jacobian.h (97%) rename tests/jacobian_tests/{ => composite}/test_composite_exp.h (100%) rename tests/jacobian_tests/{ => elementwise_restricted_dom}/test_log.h (100%) rename tests/jacobian_tests/{ => other}/test_prod.h (100%) rename tests/jacobian_tests/{ => other}/test_prod_axis_one.h (100%) rename tests/jacobian_tests/{ => other}/test_prod_axis_zero.h (100%) rename tests/jacobian_tests/{ => other}/test_quad_form.h (99%) rename tests/wsum_hess/{ => affine}/test_broadcast.h (100%) rename tests/wsum_hess/{ => affine}/test_const_scalar_mult.h (99%) rename tests/wsum_hess/{ => affine}/test_const_vector_mult.h (99%) rename tests/wsum_hess/{ => affine}/test_hstack.h (100%) rename tests/wsum_hess/{ => affine}/test_index.h (100%) rename tests/wsum_hess/{ => affine}/test_left_matmul.h (99%) rename tests/wsum_hess/{ => affine}/test_right_matmul.h (99%) rename tests/wsum_hess/{ => affine}/test_sum.h (100%) rename tests/wsum_hess/{ => affine}/test_trace.h (100%) rename tests/wsum_hess/{ => affine}/test_transpose.h (100%) rename tests/wsum_hess/{ => affine}/test_vstack.h (100%) rename tests/wsum_hess/{ => bivariate_full_dom}/test_matmul.h (99%) rename tests/wsum_hess/{ => bivariate_full_dom}/test_multiply.h (99%) rename tests/wsum_hess/{ => bivariate_restricted_dom}/test_quad_over_lin.h (98%) rename tests/wsum_hess/{ => bivariate_restricted_dom}/test_rel_entr.h (98%) rename tests/wsum_hess/{ => bivariate_restricted_dom}/test_rel_entr_scalar_vector.h (96%) rename tests/wsum_hess/{ => bivariate_restricted_dom}/test_rel_entr_vector_scalar.h (96%) rename tests/wsum_hess/{ => composite}/test_chain_rule_wsum_hess.h (99%) rename tests/wsum_hess/{elementwise => elementwise_full_dom}/test_exp.h (100%) rename tests/wsum_hess/{elementwise => elementwise_full_dom}/test_hyperbolic.h (100%) rename tests/wsum_hess/{elementwise => elementwise_full_dom}/test_logistic.h (100%) rename tests/wsum_hess/{elementwise => elementwise_full_dom}/test_power.h (100%) rename tests/wsum_hess/{elementwise => elementwise_full_dom}/test_trig.h (100%) rename tests/wsum_hess/{elementwise => elementwise_full_dom}/test_xexp.h (100%) rename tests/wsum_hess/{elementwise => elementwise_restricted_dom}/test_entr.h (100%) rename tests/wsum_hess/{elementwise => elementwise_restricted_dom}/test_log.h (100%) rename tests/wsum_hess/{ => other}/test_prod.h (100%) rename tests/wsum_hess/{ => other}/test_prod_axis_one.h (100%) rename tests/wsum_hess/{ => other}/test_prod_axis_zero.h (100%) rename tests/wsum_hess/{ => other}/test_quad_form.h (100%) diff --git a/src/bivariate_full_dom/multiply.c b/src/bivariate_full_dom/multiply.c index 3ed9990b..9d31c737 100644 --- a/src/bivariate_full_dom/multiply.c +++ b/src/bivariate_full_dom/multiply.c @@ -76,6 +76,7 @@ static void wsum_hess_init(expr *node) /* both x and y are variables*/ if (x->var_id != NOT_A_VARIABLE) { + assert(y->var_id != NOT_A_VARIABLE); node->wsum_hess = new_csr_matrix(node->n_vars, node->n_vars, 2 * node->size); int i, var1_id, var2_id; diff --git a/tests/all_tests.c b/tests/all_tests.c index c8107176..dc1f5c43 100644 --- a/tests/all_tests.c +++ b/tests/all_tests.c @@ -7,46 +7,46 @@ #include "forward_pass/affine/test_add.h" #include "forward_pass/affine/test_broadcast.h" #include "forward_pass/affine/test_hstack.h" +#include "forward_pass/affine/test_left_matmul_dense.h" #include "forward_pass/affine/test_linear_op.h" #include "forward_pass/affine/test_neg.h" #include "forward_pass/affine/test_promote.h" #include "forward_pass/affine/test_sum.h" #include "forward_pass/affine/test_variable_constant.h" #include "forward_pass/affine/test_vstack.h" +#include "forward_pass/bivariate_full_dom/test_matmul.h" #include "forward_pass/composite/test_composite.h" -#include "forward_pass/elementwise/test_exp.h" -#include "forward_pass/elementwise/test_log.h" -#include "forward_pass/elementwise/test_normal_cdf.h" -#include "forward_pass/test_left_matmul_dense.h" -#include "forward_pass/test_matmul.h" -#include "forward_pass/test_prod_axis_one.h" -#include "forward_pass/test_prod_axis_zero.h" -#include "jacobian_tests/test_broadcast.h" -#include "jacobian_tests/test_chain_rule_jacobian.h" -#include "jacobian_tests/test_composite_exp.h" -#include "jacobian_tests/test_const_scalar_mult.h" -#include "jacobian_tests/test_const_vector_mult.h" -#include "jacobian_tests/test_elementwise_mult.h" -#include "jacobian_tests/test_hstack.h" -#include "jacobian_tests/test_index.h" -#include "jacobian_tests/test_left_matmul.h" -#include "jacobian_tests/test_log.h" -#include "jacobian_tests/test_matmul.h" -#include "jacobian_tests/test_neg.h" -#include "jacobian_tests/test_prod.h" -#include "jacobian_tests/test_prod_axis_one.h" -#include "jacobian_tests/test_prod_axis_zero.h" -#include "jacobian_tests/test_promote.h" -#include "jacobian_tests/test_quad_form.h" -#include "jacobian_tests/test_quad_over_lin.h" -#include "jacobian_tests/test_rel_entr.h" -#include "jacobian_tests/test_rel_entr_scalar_vector.h" -#include "jacobian_tests/test_rel_entr_vector_scalar.h" -#include "jacobian_tests/test_right_matmul.h" -#include "jacobian_tests/test_sum.h" -#include "jacobian_tests/test_trace.h" -#include "jacobian_tests/test_transpose.h" -#include "jacobian_tests/test_vstack.h" +#include "forward_pass/elementwise_full_dom/test_exp.h" +#include "forward_pass/elementwise_full_dom/test_normal_cdf.h" +#include "forward_pass/elementwise_restricted_dom/test_log.h" +#include "forward_pass/other/test_prod_axis_one.h" +#include "forward_pass/other/test_prod_axis_zero.h" +#include "jacobian_tests/affine/test_broadcast.h" +#include "jacobian_tests/affine/test_const_scalar_mult.h" +#include "jacobian_tests/affine/test_const_vector_mult.h" +#include "jacobian_tests/affine/test_hstack.h" +#include "jacobian_tests/affine/test_index.h" +#include "jacobian_tests/affine/test_left_matmul.h" +#include "jacobian_tests/affine/test_neg.h" +#include "jacobian_tests/affine/test_promote.h" +#include "jacobian_tests/affine/test_right_matmul.h" +#include "jacobian_tests/affine/test_sum.h" +#include "jacobian_tests/affine/test_trace.h" +#include "jacobian_tests/affine/test_transpose.h" +#include "jacobian_tests/affine/test_vstack.h" +#include "jacobian_tests/bivariate_full_dom/test_elementwise_mult.h" +#include "jacobian_tests/bivariate_full_dom/test_matmul.h" +#include "jacobian_tests/bivariate_restricted_dom/test_quad_over_lin.h" +#include "jacobian_tests/bivariate_restricted_dom/test_rel_entr.h" +#include "jacobian_tests/bivariate_restricted_dom/test_rel_entr_scalar_vector.h" +#include "jacobian_tests/bivariate_restricted_dom/test_rel_entr_vector_scalar.h" +#include "jacobian_tests/composite/test_chain_rule_jacobian.h" +#include "jacobian_tests/composite/test_composite_exp.h" +#include "jacobian_tests/elementwise_restricted_dom/test_log.h" +#include "jacobian_tests/other/test_prod.h" +#include "jacobian_tests/other/test_prod_axis_one.h" +#include "jacobian_tests/other/test_prod_axis_zero.h" +#include "jacobian_tests/other/test_quad_form.h" #include "numerical_diff/test_numerical_diff.h" #include "problem/test_problem.h" #include "utils/test_cblas.h" @@ -56,36 +56,36 @@ #include "utils/test_csr_matrix.h" #include "utils/test_linalg_sparse_matmuls.h" #include "utils/test_matrix.h" -#include "wsum_hess/elementwise/test_entr.h" -#include "wsum_hess/elementwise/test_exp.h" -#include "wsum_hess/elementwise/test_hyperbolic.h" -#include "wsum_hess/elementwise/test_log.h" -#include "wsum_hess/elementwise/test_logistic.h" -#include "wsum_hess/elementwise/test_power.h" -#include "wsum_hess/elementwise/test_trig.h" -#include "wsum_hess/elementwise/test_xexp.h" -#include "wsum_hess/test_broadcast.h" -#include "wsum_hess/test_chain_rule_wsum_hess.h" -#include "wsum_hess/test_const_scalar_mult.h" -#include "wsum_hess/test_const_vector_mult.h" -#include "wsum_hess/test_hstack.h" -#include "wsum_hess/test_index.h" -#include "wsum_hess/test_left_matmul.h" -#include "wsum_hess/test_matmul.h" -#include "wsum_hess/test_multiply.h" -#include "wsum_hess/test_prod.h" -#include "wsum_hess/test_prod_axis_one.h" -#include "wsum_hess/test_prod_axis_zero.h" -#include "wsum_hess/test_quad_form.h" -#include "wsum_hess/test_quad_over_lin.h" -#include "wsum_hess/test_rel_entr.h" -#include "wsum_hess/test_rel_entr_scalar_vector.h" -#include "wsum_hess/test_rel_entr_vector_scalar.h" -#include "wsum_hess/test_right_matmul.h" -#include "wsum_hess/test_sum.h" -#include "wsum_hess/test_trace.h" -#include "wsum_hess/test_transpose.h" -#include "wsum_hess/test_vstack.h" +#include "wsum_hess/affine/test_broadcast.h" +#include "wsum_hess/affine/test_const_scalar_mult.h" +#include "wsum_hess/affine/test_const_vector_mult.h" +#include "wsum_hess/affine/test_hstack.h" +#include "wsum_hess/affine/test_index.h" +#include "wsum_hess/affine/test_left_matmul.h" +#include "wsum_hess/affine/test_right_matmul.h" +#include "wsum_hess/affine/test_sum.h" +#include "wsum_hess/affine/test_trace.h" +#include "wsum_hess/affine/test_transpose.h" +#include "wsum_hess/affine/test_vstack.h" +#include "wsum_hess/bivariate_full_dom/test_matmul.h" +#include "wsum_hess/bivariate_full_dom/test_multiply.h" +#include "wsum_hess/bivariate_restricted_dom/test_quad_over_lin.h" +#include "wsum_hess/bivariate_restricted_dom/test_rel_entr.h" +#include "wsum_hess/bivariate_restricted_dom/test_rel_entr_scalar_vector.h" +#include "wsum_hess/bivariate_restricted_dom/test_rel_entr_vector_scalar.h" +#include "wsum_hess/composite/test_chain_rule_wsum_hess.h" +#include "wsum_hess/elementwise_full_dom/test_exp.h" +#include "wsum_hess/elementwise_full_dom/test_hyperbolic.h" +#include "wsum_hess/elementwise_full_dom/test_logistic.h" +#include "wsum_hess/elementwise_full_dom/test_power.h" +#include "wsum_hess/elementwise_full_dom/test_trig.h" +#include "wsum_hess/elementwise_full_dom/test_xexp.h" +#include "wsum_hess/elementwise_restricted_dom/test_entr.h" +#include "wsum_hess/elementwise_restricted_dom/test_log.h" +#include "wsum_hess/other/test_prod.h" +#include "wsum_hess/other/test_prod_axis_one.h" +#include "wsum_hess/other/test_prod_axis_zero.h" +#include "wsum_hess/other/test_quad_form.h" #endif /* PROFILE_ONLY */ #ifdef PROFILE_ONLY diff --git a/tests/forward_pass/test_left_matmul_dense.h b/tests/forward_pass/affine/test_left_matmul_dense.h similarity index 98% rename from tests/forward_pass/test_left_matmul_dense.h rename to tests/forward_pass/affine/test_left_matmul_dense.h index a953806c..5cd9c75d 100644 --- a/tests/forward_pass/test_left_matmul_dense.h +++ b/tests/forward_pass/affine/test_left_matmul_dense.h @@ -1,7 +1,7 @@ #include #include -#include "bivariate.h" +#include "affine.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/forward_pass/test_matmul.h b/tests/forward_pass/bivariate_full_dom/test_matmul.h similarity index 98% rename from tests/forward_pass/test_matmul.h rename to tests/forward_pass/bivariate_full_dom/test_matmul.h index be53542f..af181e4f 100644 --- a/tests/forward_pass/test_matmul.h +++ b/tests/forward_pass/bivariate_full_dom/test_matmul.h @@ -2,7 +2,7 @@ #include #include -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/forward_pass/elementwise/test_exp.h b/tests/forward_pass/elementwise_full_dom/test_exp.h similarity index 100% rename from tests/forward_pass/elementwise/test_exp.h rename to tests/forward_pass/elementwise_full_dom/test_exp.h diff --git a/tests/forward_pass/elementwise/test_normal_cdf.h b/tests/forward_pass/elementwise_full_dom/test_normal_cdf.h similarity index 100% rename from tests/forward_pass/elementwise/test_normal_cdf.h rename to tests/forward_pass/elementwise_full_dom/test_normal_cdf.h diff --git a/tests/forward_pass/elementwise/test_log.h b/tests/forward_pass/elementwise_restricted_dom/test_log.h similarity index 100% rename from tests/forward_pass/elementwise/test_log.h rename to tests/forward_pass/elementwise_restricted_dom/test_log.h diff --git a/tests/forward_pass/test_prod_axis_one.h b/tests/forward_pass/other/test_prod_axis_one.h similarity index 100% rename from tests/forward_pass/test_prod_axis_one.h rename to tests/forward_pass/other/test_prod_axis_one.h diff --git a/tests/forward_pass/test_prod_axis_zero.h b/tests/forward_pass/other/test_prod_axis_zero.h similarity index 100% rename from tests/forward_pass/test_prod_axis_zero.h rename to tests/forward_pass/other/test_prod_axis_zero.h diff --git a/tests/jacobian_tests/test_broadcast.h b/tests/jacobian_tests/affine/test_broadcast.h similarity index 100% rename from tests/jacobian_tests/test_broadcast.h rename to tests/jacobian_tests/affine/test_broadcast.h diff --git a/tests/jacobian_tests/test_const_scalar_mult.h b/tests/jacobian_tests/affine/test_const_scalar_mult.h similarity index 99% rename from tests/jacobian_tests/test_const_scalar_mult.h rename to tests/jacobian_tests/affine/test_const_scalar_mult.h index 635bd80b..879e9e36 100644 --- a/tests/jacobian_tests/test_const_scalar_mult.h +++ b/tests/jacobian_tests/affine/test_const_scalar_mult.h @@ -1,6 +1,6 @@ #include -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/jacobian_tests/test_const_vector_mult.h b/tests/jacobian_tests/affine/test_const_vector_mult.h similarity index 99% rename from tests/jacobian_tests/test_const_vector_mult.h rename to tests/jacobian_tests/affine/test_const_vector_mult.h index c39ca876..9b00dca2 100644 --- a/tests/jacobian_tests/test_const_vector_mult.h +++ b/tests/jacobian_tests/affine/test_const_vector_mult.h @@ -1,6 +1,6 @@ #include -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/jacobian_tests/test_hstack.h b/tests/jacobian_tests/affine/test_hstack.h similarity index 100% rename from tests/jacobian_tests/test_hstack.h rename to tests/jacobian_tests/affine/test_hstack.h diff --git a/tests/jacobian_tests/test_index.h b/tests/jacobian_tests/affine/test_index.h similarity index 100% rename from tests/jacobian_tests/test_index.h rename to tests/jacobian_tests/affine/test_index.h diff --git a/tests/jacobian_tests/test_left_matmul.h b/tests/jacobian_tests/affine/test_left_matmul.h similarity index 99% rename from tests/jacobian_tests/test_left_matmul.h rename to tests/jacobian_tests/affine/test_left_matmul.h index 93a74da7..5accf1ba 100644 --- a/tests/jacobian_tests/test_left_matmul.h +++ b/tests/jacobian_tests/affine/test_left_matmul.h @@ -1,7 +1,7 @@ #include #include -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/jacobian_tests/test_neg.h b/tests/jacobian_tests/affine/test_neg.h similarity index 100% rename from tests/jacobian_tests/test_neg.h rename to tests/jacobian_tests/affine/test_neg.h diff --git a/tests/jacobian_tests/test_promote.h b/tests/jacobian_tests/affine/test_promote.h similarity index 100% rename from tests/jacobian_tests/test_promote.h rename to tests/jacobian_tests/affine/test_promote.h diff --git a/tests/jacobian_tests/test_right_matmul.h b/tests/jacobian_tests/affine/test_right_matmul.h similarity index 99% rename from tests/jacobian_tests/test_right_matmul.h rename to tests/jacobian_tests/affine/test_right_matmul.h index f86300fd..f8fc571f 100644 --- a/tests/jacobian_tests/test_right_matmul.h +++ b/tests/jacobian_tests/affine/test_right_matmul.h @@ -2,7 +2,7 @@ #include #include "affine.h" -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/jacobian_tests/test_sum.h b/tests/jacobian_tests/affine/test_sum.h similarity index 99% rename from tests/jacobian_tests/test_sum.h rename to tests/jacobian_tests/affine/test_sum.h index 8ef94e13..90a289c8 100644 --- a/tests/jacobian_tests/test_sum.h +++ b/tests/jacobian_tests/affine/test_sum.h @@ -1,7 +1,7 @@ #include #include "affine.h" -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/jacobian_tests/test_trace.h b/tests/jacobian_tests/affine/test_trace.h similarity index 100% rename from tests/jacobian_tests/test_trace.h rename to tests/jacobian_tests/affine/test_trace.h diff --git a/tests/jacobian_tests/test_transpose.h b/tests/jacobian_tests/affine/test_transpose.h similarity index 100% rename from tests/jacobian_tests/test_transpose.h rename to tests/jacobian_tests/affine/test_transpose.h diff --git a/tests/jacobian_tests/test_vstack.h b/tests/jacobian_tests/affine/test_vstack.h similarity index 100% rename from tests/jacobian_tests/test_vstack.h rename to tests/jacobian_tests/affine/test_vstack.h diff --git a/tests/jacobian_tests/test_elementwise_mult.h b/tests/jacobian_tests/bivariate_full_dom/test_elementwise_mult.h similarity index 99% rename from tests/jacobian_tests/test_elementwise_mult.h rename to tests/jacobian_tests/bivariate_full_dom/test_elementwise_mult.h index bad278b5..631b99c7 100644 --- a/tests/jacobian_tests/test_elementwise_mult.h +++ b/tests/jacobian_tests/bivariate_full_dom/test_elementwise_mult.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/jacobian_tests/test_matmul.h b/tests/jacobian_tests/bivariate_full_dom/test_matmul.h similarity index 99% rename from tests/jacobian_tests/test_matmul.h rename to tests/jacobian_tests/bivariate_full_dom/test_matmul.h index 8d673cc0..ff0b8ca9 100644 --- a/tests/jacobian_tests/test_matmul.h +++ b/tests/jacobian_tests/bivariate_full_dom/test_matmul.h @@ -1,4 +1,4 @@ -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/jacobian_tests/test_quad_over_lin.h b/tests/jacobian_tests/bivariate_restricted_dom/test_quad_over_lin.h similarity index 99% rename from tests/jacobian_tests/test_quad_over_lin.h rename to tests/jacobian_tests/bivariate_restricted_dom/test_quad_over_lin.h index 6e93bafc..c50ee500 100644 --- a/tests/jacobian_tests/test_quad_over_lin.h +++ b/tests/jacobian_tests/bivariate_restricted_dom/test_quad_over_lin.h @@ -1,6 +1,6 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/jacobian_tests/test_rel_entr.h b/tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr.h similarity index 98% rename from tests/jacobian_tests/test_rel_entr.h rename to tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr.h index 1c908716..f11954c8 100644 --- a/tests/jacobian_tests/test_rel_entr.h +++ b/tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/jacobian_tests/test_rel_entr_scalar_vector.h b/tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr_scalar_vector.h similarity index 96% rename from tests/jacobian_tests/test_rel_entr_scalar_vector.h rename to tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr_scalar_vector.h index 0009fb5f..fd74fc17 100644 --- a/tests/jacobian_tests/test_rel_entr_scalar_vector.h +++ b/tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr_scalar_vector.h @@ -1,4 +1,4 @@ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/jacobian_tests/test_rel_entr_vector_scalar.h b/tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr_vector_scalar.h similarity index 96% rename from tests/jacobian_tests/test_rel_entr_vector_scalar.h rename to tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr_vector_scalar.h index aeef25e9..871208c1 100644 --- a/tests/jacobian_tests/test_rel_entr_vector_scalar.h +++ b/tests/jacobian_tests/bivariate_restricted_dom/test_rel_entr_vector_scalar.h @@ -1,4 +1,4 @@ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/jacobian_tests/test_chain_rule_jacobian.h b/tests/jacobian_tests/composite/test_chain_rule_jacobian.h similarity index 97% rename from tests/jacobian_tests/test_chain_rule_jacobian.h rename to tests/jacobian_tests/composite/test_chain_rule_jacobian.h index d8972c60..d0348421 100644 --- a/tests/jacobian_tests/test_chain_rule_jacobian.h +++ b/tests/jacobian_tests/composite/test_chain_rule_jacobian.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "elementwise_full_dom.h" #include "minunit.h" #include "numerical_diff.h" diff --git a/tests/jacobian_tests/test_composite_exp.h b/tests/jacobian_tests/composite/test_composite_exp.h similarity index 100% rename from tests/jacobian_tests/test_composite_exp.h rename to tests/jacobian_tests/composite/test_composite_exp.h diff --git a/tests/jacobian_tests/test_log.h b/tests/jacobian_tests/elementwise_restricted_dom/test_log.h similarity index 100% rename from tests/jacobian_tests/test_log.h rename to tests/jacobian_tests/elementwise_restricted_dom/test_log.h diff --git a/tests/jacobian_tests/test_prod.h b/tests/jacobian_tests/other/test_prod.h similarity index 100% rename from tests/jacobian_tests/test_prod.h rename to tests/jacobian_tests/other/test_prod.h diff --git a/tests/jacobian_tests/test_prod_axis_one.h b/tests/jacobian_tests/other/test_prod_axis_one.h similarity index 100% rename from tests/jacobian_tests/test_prod_axis_one.h rename to tests/jacobian_tests/other/test_prod_axis_one.h diff --git a/tests/jacobian_tests/test_prod_axis_zero.h b/tests/jacobian_tests/other/test_prod_axis_zero.h similarity index 100% rename from tests/jacobian_tests/test_prod_axis_zero.h rename to tests/jacobian_tests/other/test_prod_axis_zero.h diff --git a/tests/jacobian_tests/test_quad_form.h b/tests/jacobian_tests/other/test_quad_form.h similarity index 99% rename from tests/jacobian_tests/test_quad_form.h rename to tests/jacobian_tests/other/test_quad_form.h index 4012c58f..8f0e9d4a 100644 --- a/tests/jacobian_tests/test_quad_form.h +++ b/tests/jacobian_tests/other/test_quad_form.h @@ -1,6 +1,5 @@ #include "affine.h" -#include "bivariate.h" #include "expr.h" #include "minunit.h" #include "other.h" diff --git a/tests/profiling/profile_left_matmul.h b/tests/profiling/profile_left_matmul.h index d52860f0..554b5ae3 100644 --- a/tests/profiling/profile_left_matmul.h +++ b/tests/profiling/profile_left_matmul.h @@ -4,7 +4,7 @@ #include #include "affine.h" -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/wsum_hess/test_broadcast.h b/tests/wsum_hess/affine/test_broadcast.h similarity index 100% rename from tests/wsum_hess/test_broadcast.h rename to tests/wsum_hess/affine/test_broadcast.h diff --git a/tests/wsum_hess/test_const_scalar_mult.h b/tests/wsum_hess/affine/test_const_scalar_mult.h similarity index 99% rename from tests/wsum_hess/test_const_scalar_mult.h rename to tests/wsum_hess/affine/test_const_scalar_mult.h index a1015030..3a110583 100644 --- a/tests/wsum_hess/test_const_scalar_mult.h +++ b/tests/wsum_hess/affine/test_const_scalar_mult.h @@ -1,7 +1,7 @@ #include #include -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/wsum_hess/test_const_vector_mult.h b/tests/wsum_hess/affine/test_const_vector_mult.h similarity index 99% rename from tests/wsum_hess/test_const_vector_mult.h rename to tests/wsum_hess/affine/test_const_vector_mult.h index 481ce2c4..9d389853 100644 --- a/tests/wsum_hess/test_const_vector_mult.h +++ b/tests/wsum_hess/affine/test_const_vector_mult.h @@ -1,7 +1,7 @@ #include #include -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/wsum_hess/test_hstack.h b/tests/wsum_hess/affine/test_hstack.h similarity index 100% rename from tests/wsum_hess/test_hstack.h rename to tests/wsum_hess/affine/test_hstack.h diff --git a/tests/wsum_hess/test_index.h b/tests/wsum_hess/affine/test_index.h similarity index 100% rename from tests/wsum_hess/test_index.h rename to tests/wsum_hess/affine/test_index.h diff --git a/tests/wsum_hess/test_left_matmul.h b/tests/wsum_hess/affine/test_left_matmul.h similarity index 99% rename from tests/wsum_hess/test_left_matmul.h rename to tests/wsum_hess/affine/test_left_matmul.h index a0de9e92..8a26da0e 100644 --- a/tests/wsum_hess/test_left_matmul.h +++ b/tests/wsum_hess/affine/test_left_matmul.h @@ -4,7 +4,7 @@ #include #include "affine.h" -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/wsum_hess/test_right_matmul.h b/tests/wsum_hess/affine/test_right_matmul.h similarity index 99% rename from tests/wsum_hess/test_right_matmul.h rename to tests/wsum_hess/affine/test_right_matmul.h index 414e9662..2848dd33 100644 --- a/tests/wsum_hess/test_right_matmul.h +++ b/tests/wsum_hess/affine/test_right_matmul.h @@ -4,7 +4,7 @@ #include #include "affine.h" -#include "bivariate.h" +#include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" #include "expr.h" diff --git a/tests/wsum_hess/test_sum.h b/tests/wsum_hess/affine/test_sum.h similarity index 100% rename from tests/wsum_hess/test_sum.h rename to tests/wsum_hess/affine/test_sum.h diff --git a/tests/wsum_hess/test_trace.h b/tests/wsum_hess/affine/test_trace.h similarity index 100% rename from tests/wsum_hess/test_trace.h rename to tests/wsum_hess/affine/test_trace.h diff --git a/tests/wsum_hess/test_transpose.h b/tests/wsum_hess/affine/test_transpose.h similarity index 100% rename from tests/wsum_hess/test_transpose.h rename to tests/wsum_hess/affine/test_transpose.h diff --git a/tests/wsum_hess/test_vstack.h b/tests/wsum_hess/affine/test_vstack.h similarity index 100% rename from tests/wsum_hess/test_vstack.h rename to tests/wsum_hess/affine/test_vstack.h diff --git a/tests/wsum_hess/test_matmul.h b/tests/wsum_hess/bivariate_full_dom/test_matmul.h similarity index 99% rename from tests/wsum_hess/test_matmul.h rename to tests/wsum_hess/bivariate_full_dom/test_matmul.h index 796f3b28..d23cb953 100644 --- a/tests/wsum_hess/test_matmul.h +++ b/tests/wsum_hess/bivariate_full_dom/test_matmul.h @@ -1,4 +1,4 @@ -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/wsum_hess/test_multiply.h b/tests/wsum_hess/bivariate_full_dom/test_multiply.h similarity index 99% rename from tests/wsum_hess/test_multiply.h rename to tests/wsum_hess/bivariate_full_dom/test_multiply.h index 7f427bdc..6aae97b4 100644 --- a/tests/wsum_hess/test_multiply.h +++ b/tests/wsum_hess/bivariate_full_dom/test_multiply.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/wsum_hess/test_quad_over_lin.h b/tests/wsum_hess/bivariate_restricted_dom/test_quad_over_lin.h similarity index 98% rename from tests/wsum_hess/test_quad_over_lin.h rename to tests/wsum_hess/bivariate_restricted_dom/test_quad_over_lin.h index f8936595..e28a0a2d 100644 --- a/tests/wsum_hess/test_quad_over_lin.h +++ b/tests/wsum_hess/bivariate_restricted_dom/test_quad_over_lin.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/wsum_hess/test_rel_entr.h b/tests/wsum_hess/bivariate_restricted_dom/test_rel_entr.h similarity index 98% rename from tests/wsum_hess/test_rel_entr.h rename to tests/wsum_hess/bivariate_restricted_dom/test_rel_entr.h index ec69385a..4c7efeed 100644 --- a/tests/wsum_hess/test_rel_entr.h +++ b/tests/wsum_hess/bivariate_restricted_dom/test_rel_entr.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/wsum_hess/test_rel_entr_scalar_vector.h b/tests/wsum_hess/bivariate_restricted_dom/test_rel_entr_scalar_vector.h similarity index 96% rename from tests/wsum_hess/test_rel_entr_scalar_vector.h rename to tests/wsum_hess/bivariate_restricted_dom/test_rel_entr_scalar_vector.h index 78d2d223..edf79bb0 100644 --- a/tests/wsum_hess/test_rel_entr_scalar_vector.h +++ b/tests/wsum_hess/bivariate_restricted_dom/test_rel_entr_scalar_vector.h @@ -1,4 +1,4 @@ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/wsum_hess/test_rel_entr_vector_scalar.h b/tests/wsum_hess/bivariate_restricted_dom/test_rel_entr_vector_scalar.h similarity index 96% rename from tests/wsum_hess/test_rel_entr_vector_scalar.h rename to tests/wsum_hess/bivariate_restricted_dom/test_rel_entr_vector_scalar.h index 3ce1553c..b0583889 100644 --- a/tests/wsum_hess/test_rel_entr_vector_scalar.h +++ b/tests/wsum_hess/bivariate_restricted_dom/test_rel_entr_vector_scalar.h @@ -1,4 +1,4 @@ -#include "bivariate.h" +#include "bivariate_restricted_dom.h" #include "expr.h" #include "minunit.h" #include "test_helpers.h" diff --git a/tests/wsum_hess/test_chain_rule_wsum_hess.h b/tests/wsum_hess/composite/test_chain_rule_wsum_hess.h similarity index 99% rename from tests/wsum_hess/test_chain_rule_wsum_hess.h rename to tests/wsum_hess/composite/test_chain_rule_wsum_hess.h index 8e0610e9..475db809 100644 --- a/tests/wsum_hess/test_chain_rule_wsum_hess.h +++ b/tests/wsum_hess/composite/test_chain_rule_wsum_hess.h @@ -1,5 +1,5 @@ #include "affine.h" -#include "bivariate.h" +#include "bivariate_full_dom.h" #include "elementwise_full_dom.h" #include "minunit.h" #include "numerical_diff.h" diff --git a/tests/wsum_hess/elementwise/test_exp.h b/tests/wsum_hess/elementwise_full_dom/test_exp.h similarity index 100% rename from tests/wsum_hess/elementwise/test_exp.h rename to tests/wsum_hess/elementwise_full_dom/test_exp.h diff --git a/tests/wsum_hess/elementwise/test_hyperbolic.h b/tests/wsum_hess/elementwise_full_dom/test_hyperbolic.h similarity index 100% rename from tests/wsum_hess/elementwise/test_hyperbolic.h rename to tests/wsum_hess/elementwise_full_dom/test_hyperbolic.h diff --git a/tests/wsum_hess/elementwise/test_logistic.h b/tests/wsum_hess/elementwise_full_dom/test_logistic.h similarity index 100% rename from tests/wsum_hess/elementwise/test_logistic.h rename to tests/wsum_hess/elementwise_full_dom/test_logistic.h diff --git a/tests/wsum_hess/elementwise/test_power.h b/tests/wsum_hess/elementwise_full_dom/test_power.h similarity index 100% rename from tests/wsum_hess/elementwise/test_power.h rename to tests/wsum_hess/elementwise_full_dom/test_power.h diff --git a/tests/wsum_hess/elementwise/test_trig.h b/tests/wsum_hess/elementwise_full_dom/test_trig.h similarity index 100% rename from tests/wsum_hess/elementwise/test_trig.h rename to tests/wsum_hess/elementwise_full_dom/test_trig.h diff --git a/tests/wsum_hess/elementwise/test_xexp.h b/tests/wsum_hess/elementwise_full_dom/test_xexp.h similarity index 100% rename from tests/wsum_hess/elementwise/test_xexp.h rename to tests/wsum_hess/elementwise_full_dom/test_xexp.h diff --git a/tests/wsum_hess/elementwise/test_entr.h b/tests/wsum_hess/elementwise_restricted_dom/test_entr.h similarity index 100% rename from tests/wsum_hess/elementwise/test_entr.h rename to tests/wsum_hess/elementwise_restricted_dom/test_entr.h diff --git a/tests/wsum_hess/elementwise/test_log.h b/tests/wsum_hess/elementwise_restricted_dom/test_log.h similarity index 100% rename from tests/wsum_hess/elementwise/test_log.h rename to tests/wsum_hess/elementwise_restricted_dom/test_log.h diff --git a/tests/wsum_hess/test_prod.h b/tests/wsum_hess/other/test_prod.h similarity index 100% rename from tests/wsum_hess/test_prod.h rename to tests/wsum_hess/other/test_prod.h diff --git a/tests/wsum_hess/test_prod_axis_one.h b/tests/wsum_hess/other/test_prod_axis_one.h similarity index 100% rename from tests/wsum_hess/test_prod_axis_one.h rename to tests/wsum_hess/other/test_prod_axis_one.h diff --git a/tests/wsum_hess/test_prod_axis_zero.h b/tests/wsum_hess/other/test_prod_axis_zero.h similarity index 100% rename from tests/wsum_hess/test_prod_axis_zero.h rename to tests/wsum_hess/other/test_prod_axis_zero.h diff --git a/tests/wsum_hess/test_quad_form.h b/tests/wsum_hess/other/test_quad_form.h similarity index 100% rename from tests/wsum_hess/test_quad_form.h rename to tests/wsum_hess/other/test_quad_form.h From f4f8fb730019db0ea346f194f5f28e0b73250ce8 Mon Sep 17 00:00:00 2001 From: dance858 Date: Fri, 27 Mar 2026 07:32:41 -0700 Subject: [PATCH 4/4] run formatter --- tests/jacobian_tests/affine/test_right_matmul.h | 1 - tests/profiling/profile_left_matmul.h | 1 - tests/wsum_hess/affine/test_left_matmul.h | 1 - tests/wsum_hess/affine/test_right_matmul.h | 1 - 4 files changed, 4 deletions(-) diff --git a/tests/jacobian_tests/affine/test_right_matmul.h b/tests/jacobian_tests/affine/test_right_matmul.h index f8fc571f..7aed736b 100644 --- a/tests/jacobian_tests/affine/test_right_matmul.h +++ b/tests/jacobian_tests/affine/test_right_matmul.h @@ -1,7 +1,6 @@ #include #include -#include "affine.h" #include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" diff --git a/tests/profiling/profile_left_matmul.h b/tests/profiling/profile_left_matmul.h index 554b5ae3..331734b3 100644 --- a/tests/profiling/profile_left_matmul.h +++ b/tests/profiling/profile_left_matmul.h @@ -3,7 +3,6 @@ #include #include -#include "affine.h" #include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" diff --git a/tests/wsum_hess/affine/test_left_matmul.h b/tests/wsum_hess/affine/test_left_matmul.h index 8a26da0e..39cf4655 100644 --- a/tests/wsum_hess/affine/test_left_matmul.h +++ b/tests/wsum_hess/affine/test_left_matmul.h @@ -3,7 +3,6 @@ #include #include -#include "affine.h" #include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h" diff --git a/tests/wsum_hess/affine/test_right_matmul.h b/tests/wsum_hess/affine/test_right_matmul.h index 2848dd33..b560f13a 100644 --- a/tests/wsum_hess/affine/test_right_matmul.h +++ b/tests/wsum_hess/affine/test_right_matmul.h @@ -3,7 +3,6 @@ #include #include -#include "affine.h" #include "affine.h" #include "elementwise_full_dom.h" #include "elementwise_restricted_dom.h"