Skip to content

Commit

Permalink
cleanup after reduce_sum is called in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Aug 7, 2023
1 parent 119099d commit 90b23ab
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 33 deletions.
Empty file added lib/sundials_6.1.1/lib/stlTVNfQ
Empty file.
Empty file added lib/sundials_6.1.1/lib/stytHoFH
Empty file.
34 changes: 17 additions & 17 deletions test/unit/math/mix/functor/reduce_sum_part1_test.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <stan/math/prim/meta.hpp>
#include <test/unit/math/test_ad.hpp>
#include <test/unit/math/mix/functor/reduce_sum_util.hpp>

#include <test/unit/math/rev/util.hpp>
#include <limits>
#include <vector>

// Reduce sum tests are broken up into four files to avoid windows compiler
// error

TEST(MathMix_reduce_sum, grainsize_static) {
TEST_F(AgradRev, reduce_sum_grainsize_static) {
using stan::math::test::get_new_msg;
using stan::math::test::sum_lpdf;

Expand All @@ -33,7 +33,7 @@ TEST(MathMix_reduce_sum, grainsize_static) {
stan::test::expect_ad(f4, data);
}

TEST(MathMix_reduce_sum, grainsize) {
TEST_F(AgradRev, reduce_sum_grainsize) {
using stan::math::test::get_new_msg;
using stan::math::test::sum_lpdf;
auto f1 = [](auto&& data) {
Expand All @@ -57,7 +57,7 @@ TEST(MathMix_reduce_sum, grainsize) {
stan::test::expect_ad(f4, data);
}

TEST(MathMix_reduce_sum, std_vector_zero_length) {
TEST_F(AgradRev, reduce_sum_std_vector_zero_length) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -67,7 +67,7 @@ TEST(MathMix_reduce_sum, std_vector_zero_length) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -77,7 +77,7 @@ TEST(MathMix_reduce_sum, std_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_std_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_std_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -87,7 +87,7 @@ TEST(MathMix_reduce_sum, std_vector_std_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_eigen_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_eigen_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -97,7 +97,7 @@ TEST(MathMix_reduce_sum, std_vector_eigen_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_eigen_row_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_eigen_row_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -107,7 +107,7 @@ TEST(MathMix_reduce_sum, std_vector_eigen_row_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_eigen_matrix_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_eigen_matrix_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -117,7 +117,7 @@ TEST(MathMix_reduce_sum, std_vector_eigen_matrix_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_std_vector_std_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_std_vector_std_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -128,7 +128,7 @@ TEST(MathMix_reduce_sum, std_vector_std_vector_std_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_std_vector_eigen_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_std_vector_eigen_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -139,7 +139,7 @@ TEST(MathMix_reduce_sum, std_vector_std_vector_eigen_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_std_vector_eigen_row_vector_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_std_vector_eigen_row_vector_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand All @@ -150,7 +150,7 @@ TEST(MathMix_reduce_sum, std_vector_std_vector_eigen_row_vector_double_slice) {
stan::test::expect_ad(reduce_sum_sum_lpdf, data);
}

TEST(MathMix_reduce_sum, std_vector_std_vector_eigen_matrix_double_slice) {
TEST_F(AgradRev, reduce_sum_std_vector_std_vector_eigen_matrix_double_slice) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;

Expand Down Expand Up @@ -180,7 +180,7 @@ TEST(StanMath_reduce_sum_static, start_end_slice) {
stan::test::expect_ad(start_end_static, data);
}

TEST(MathMix_reduce_sum, int_arg) {
TEST_F(AgradRev, reduce_sum_int_arg) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;
std::vector<double> data(2, 1.0);
Expand All @@ -192,7 +192,7 @@ TEST(MathMix_reduce_sum, int_arg) {
[&](auto&& data) { return reduce_sum_sum_lpdf(data, arg); }, data);
}

TEST(MathMix_reduce_sum, std_vector_int_arg) {
TEST_F(AgradRev, reduce_sum_std_vector_int_arg) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;
std::vector<double> data(2, 10.0);
Expand All @@ -204,12 +204,12 @@ TEST(MathMix_reduce_sum, std_vector_int_arg) {
[&](auto&& data) { return reduce_sum_sum_lpdf(data, arg); }, data);
}

TEST(MathMix_reduce_sum, double_arg) {
TEST_F(AgradRev, reduce_sum_double_arg) {
stan::math::test::expect_ad_reduce_sum_lpdf(std::vector<double>(2, 10.0),
5.0);
}

TEST(MathMix_reduce_sum, std_vector_double_arg) {
TEST_F(AgradRev, reduce_sum_std_vector_double_arg) {
stan::math::test::expect_ad_reduce_sum_lpdf(std::vector<double>(2, 10.0),
std::vector<double>(2, 10.0));
}
13 changes: 7 additions & 6 deletions test/unit/math/mix/functor/reduce_sum_part2_test.cpp
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
#include <stan/math/prim/meta.hpp>
#include <test/unit/math/test_ad.hpp>
#include <test/unit/math/mix/functor/reduce_sum_util.hpp>
#include <test/unit/math/rev/util.hpp>

#include <limits>
#include <vector>

// Reduce sum tests are broken up into four files to avoid windows compiler
// error

TEST(MathMix_reduce_sum, eigen_vector_arg) {
TEST_F(AgradRev, reduce_sum_eigen_vector_arg) {
std::vector<double> data(2, 10.0);
Eigen::VectorXd arg = Eigen::VectorXd::Ones(2);
stan::math::test::expect_ad_reduce_sum_lpdf(data, arg);
}

TEST(MathMix_reduce_sum, eigen_row_vector_arg) {
TEST_F(AgradRev, reduce_sum_eigen_row_vector_arg) {
std::vector<double> data(2, 10.0);
Eigen::RowVectorXd arg = Eigen::RowVectorXd::Ones(2);

stan::math::test::expect_ad_reduce_sum_lpdf(data, arg);
}

TEST(MathMix_reduce_sum, eigen_matrix_arg) {
TEST_F(AgradRev, reduce_sum_eigen_matrix_arg) {
std::vector<double> data(2, 10.0);
Eigen::MatrixXd arg = Eigen::MatrixXd::Ones(2, 2);

stan::math::test::expect_ad_reduce_sum_lpdf(data, arg);
}

TEST(MathMix_reduce_sum, std_vector_std_vector_double_arg) {
TEST_F(AgradRev, reduce_sum_std_vector_std_vector_double_arg) {
std::vector<double> data(2, 10.0);
std::vector<std::vector<double>> arg(2, std::vector<double>(2, 10.0));

stan::math::test::expect_ad_reduce_sum_lpdf(data, arg);
}

TEST(MathMix_reduce_sum, std_vector_eigen_vector_arg) {
TEST_F(AgradRev, reduce_sum_std_vector_eigen_vector_arg) {
std::vector<double> data(2, 10.0);
std::vector<Eigen::VectorXd> arg(2, Eigen::VectorXd::Ones(2));

stan::math::test::expect_ad_reduce_sum_lpdf(data, arg);
}

TEST(MathMix_reduce_sum, std_vector_eigen_row_vector_arg) {
TEST_F(AgradRev, reduce_sum_std_vector_eigen_row_vector_arg) {
std::vector<double> data(2, 10.0);
std::vector<Eigen::RowVectorXd> arg(2, Eigen::RowVectorXd::Ones(2));

Expand Down
11 changes: 6 additions & 5 deletions test/unit/math/mix/functor/reduce_sum_part3_test.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#include <stan/math/prim/meta.hpp>
#include <test/unit/math/test_ad.hpp>
#include <test/unit/math/mix/functor/reduce_sum_util.hpp>
#include <test/unit/math/rev/util.hpp>

#include <limits>
#include <vector>

// Reduce sum tests are broken up into four files to avoid windows compiler
// error

TEST(MathMix_reduce_sum, eigen_three_args1) {
TEST_F(AgradRev, reduce_sum_eigen_three_args1) {
using stan::math::test::reduce_sum_int_sum_lpdf;
using stan::math::test::reduce_sum_static_int_sum_lpdf;
Eigen::VectorXd arg1 = Eigen::VectorXd::Ones(2);
Expand All @@ -19,7 +20,7 @@ TEST(MathMix_reduce_sum, eigen_three_args1) {
stan::test::expect_ad(reduce_sum_int_sum_lpdf, arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args2) {
TEST_F(AgradRev, reduce_sum_eigen_three_args2) {
using stan::math::test::reduce_sum_int_sum_lpdf;
using stan::math::test::reduce_sum_static_int_sum_lpdf;
double arg1 = 1.0;
Expand All @@ -30,7 +31,7 @@ TEST(MathMix_reduce_sum, eigen_three_args2) {
stan::test::expect_ad(reduce_sum_int_sum_lpdf, arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args3) {
TEST_F(AgradRev, reduce_sum_eigen_three_args3) {
using stan::math::test::reduce_sum_int_sum_lpdf;
using stan::math::test::reduce_sum_static_int_sum_lpdf;
double arg1 = 1.0;
Expand All @@ -41,7 +42,7 @@ TEST(MathMix_reduce_sum, eigen_three_args3) {
stan::test::expect_ad(reduce_sum_int_sum_lpdf, arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args_with_ints1) {
TEST_F(AgradRev, reduce_sum_eigen_three_args_with_ints1) {
using stan::math::test::reduce_sum_int_sum_lpdf;
using stan::math::test::reduce_sum_static_int_sum_lpdf;
Eigen::VectorXd arg1 = Eigen::VectorXd::Ones(2);
Expand All @@ -63,7 +64,7 @@ TEST(MathMix_reduce_sum, eigen_three_args_with_ints1) {
arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args_with_ints2) {
TEST_F(AgradRev, reduce_sum_eigen_three_args_with_ints2) {
using stan::math::test::reduce_sum_int_sum_lpdf;
using stan::math::test::reduce_sum_static_int_sum_lpdf;
double arg1 = 1.0;
Expand Down
11 changes: 6 additions & 5 deletions test/unit/math/mix/functor/reduce_sum_part4_test.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#include <stan/math/prim/meta.hpp>
#include <test/unit/math/test_ad.hpp>
#include <test/unit/math/mix/functor/reduce_sum_util.hpp>
#include <test/unit/math/rev/util.hpp>

#include <limits>
#include <vector>

// Reduce sum tests are broken up into four files to avoid windows compiler
// error

TEST(MathMix_reduce_sum, eigen_three_args_with_ints3) {
TEST_F(AgradRev, reduce_sum_eigen_three_args_with_ints3) {
using stan::math::test::reduce_sum_int_sum_lpdf;
using stan::math::test::reduce_sum_static_int_sum_lpdf;
double arg1 = 1.0;
Expand All @@ -30,7 +31,7 @@ TEST(MathMix_reduce_sum, eigen_three_args_with_ints3) {
arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args_with_doubles1) {
TEST_F(AgradRev, reduce_sum_eigen_three_args_with_doubles1) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;
Eigen::VectorXd arg1 = Eigen::VectorXd::Ones(2);
Expand All @@ -53,7 +54,7 @@ TEST(MathMix_reduce_sum, eigen_three_args_with_doubles1) {
arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args_with_doubles2) {
TEST_F(AgradRev, reduce_sum_eigen_three_args_with_doubles2) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;
double arg1 = 1.0;
Expand All @@ -77,7 +78,7 @@ TEST(MathMix_reduce_sum, eigen_three_args_with_doubles2) {
arg1, arg2, arg3);
}

TEST(MathMix_reduce_sum, eigen_three_args_with_doubles3) {
TEST_F(AgradRev, reduce_sum_eigen_three_args_with_doubles3) {
using stan::math::test::reduce_sum_static_sum_lpdf;
using stan::math::test::reduce_sum_sum_lpdf;
double arg1 = 1.0;
Expand All @@ -102,7 +103,7 @@ TEST(MathMix_reduce_sum, eigen_three_args_with_doubles3) {
}

#ifdef STAN_THREADS
TEST(MathMix_reduce_sum, static_check) {
TEST_F(AgradRev, reduce_sum_static_check) {
using stan::math::test::get_new_msg;
using stan::math::test::static_check_lpdf;

Expand Down

0 comments on commit 90b23ab

Please sign in to comment.