From 6c476f6f8ed8d892cd4ec285a712c8aae84b0fc9 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Tue, 3 Jun 2025 11:40:29 -0400 Subject: [PATCH 1/2] update to_ref test to use Eigen::all instead of Eigen::placeholders::all --- test/unit/math/prim/fun/to_ref_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/math/prim/fun/to_ref_test.cpp b/test/unit/math/prim/fun/to_ref_test.cpp index e4c1d2a116a..2b298622a88 100644 --- a/test/unit/math/prim/fun/to_ref_test.cpp +++ b/test/unit/math/prim/fun/to_ref_test.cpp @@ -25,7 +25,7 @@ TEST(MathMatrix, to_ref_matrix_exprs_tuple) { TEST(MathMatrix, to_ref_matrix_views_tuple) { Eigen::MatrixXd a = Eigen::MatrixXd::Random(3, 3); auto x = std::make_tuple(a.block(0, 0, 1, 1), - a(Eigen::placeholders::all, std::vector{2, 1, 1}), + a(Eigen::all, std::vector{2, 1, 1}), a.array()); auto x_ref = stan::math::to_ref(x); using x_ref_t = decltype(x_ref); @@ -47,10 +47,10 @@ TEST(MathMatrix, to_ref_matrix_views_exprs_tuple) { auto x = std::make_tuple( a.block(0, 0, 1, 1), std::make_tuple(a.block(0, 0, 1, 1), - a(Eigen::placeholders::all, std::vector{2, 1, 1}), + a(Eigen::all, std::vector{2, 1, 1}), a.array()), std::make_tuple(a * a, a, a.array() * 3), - a(Eigen::placeholders::all, std::vector{2, 1, 1}), a.array() * a.array()); + a(Eigen::all, std::vector{2, 1, 1}), a.array() * a.array()); auto x_ref = stan::math::to_ref(x); using x_ref_t = decltype(x_ref); using stan::test::is_same_tuple_element_v; @@ -99,11 +99,11 @@ TEST(MathMatrix, to_ref_matrix_views_exprs_moves_tuple) { a.block(0, 0, 1, 1), std::forward_as_tuple( a.block(0, 0, 1, 1), - a(Eigen::placeholders::all, + a(Eigen::all, std::vector{Eigen::Index{2}, Eigen::Index{1}, Eigen::Index{1}}), a.array()), std::forward_as_tuple(a * a, a, a.array() * 3), - a(Eigen::placeholders::all, + a(Eigen::all, std::vector{Eigen::Index{2}, Eigen::Index{1}, Eigen::Index{1}}), a.array() * a.array())); using x_ref_t = decltype(x_ref); From ed6b54f0e10f3460cb8ce212b507ee179b1b1498 Mon Sep 17 00:00:00 2001 From: Stan Jenkins Date: Tue, 3 Jun 2025 11:43:19 -0400 Subject: [PATCH 2/2] [Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1 --- test/unit/math/prim/fun/to_ref_test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/unit/math/prim/fun/to_ref_test.cpp b/test/unit/math/prim/fun/to_ref_test.cpp index 2b298622a88..bb412b93c7c 100644 --- a/test/unit/math/prim/fun/to_ref_test.cpp +++ b/test/unit/math/prim/fun/to_ref_test.cpp @@ -25,8 +25,7 @@ TEST(MathMatrix, to_ref_matrix_exprs_tuple) { TEST(MathMatrix, to_ref_matrix_views_tuple) { Eigen::MatrixXd a = Eigen::MatrixXd::Random(3, 3); auto x = std::make_tuple(a.block(0, 0, 1, 1), - a(Eigen::all, std::vector{2, 1, 1}), - a.array()); + a(Eigen::all, std::vector{2, 1, 1}), a.array()); auto x_ref = stan::math::to_ref(x); using x_ref_t = decltype(x_ref); using stan::test::is_same_tuple_element_v; @@ -46,8 +45,7 @@ TEST(MathMatrix, to_ref_matrix_views_exprs_tuple) { Eigen::MatrixXd a = Eigen::MatrixXd::Random(3, 3); auto x = std::make_tuple( a.block(0, 0, 1, 1), - std::make_tuple(a.block(0, 0, 1, 1), - a(Eigen::all, std::vector{2, 1, 1}), + std::make_tuple(a.block(0, 0, 1, 1), a(Eigen::all, std::vector{2, 1, 1}), a.array()), std::make_tuple(a * a, a, a.array() * 3), a(Eigen::all, std::vector{2, 1, 1}), a.array() * a.array());