Skip to content

Commit d45dff2

Browse files
committed
update to 5.0
2 parents 7a9601d + 00314f3 commit d45dff2

381 files changed

Lines changed: 1554 additions & 5715 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doxygen/contributor_help_pages/distribution_tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Here, I'm just going to describe the steps that are taken to run the tests. Deta
2828

2929
1. `make generate-tests` is called.
3030
1. This first builds the `test/prob/generate_tests` executable from `test/prob/generate_tests.cpp`.
31-
2. For each test file inside `test/prob/*/*`, it will call the executable with the test file as the first argument and the number of template instantiations per file within the second argument. For example, for testing the `bernoulli_log()` function, make will call: `test/prob/generate_tests test/prob/bernoulli/bernoulli_test.hpp 100`
31+
2. For each test file inside `test/prob/*/*`, it will call the executable with the test file as the first argument and the number of template instantiations per file within the second argument. For example, for testing the `bernoulli_lpmf()` function, make will call: `test/prob/generate_tests test/prob/bernoulli/bernoulli_test.hpp 100`
3232
The call to the executable will generate 5 different test files, all within the `test/prob/bernoulli/` folder:
3333
- bernoulli\_00000\_generated\_fd\_test.cpp
3434
- bernoulli\_00000\_generated\_ffd\_test.cpp

runTests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,34 @@
2323

2424
allowed_paths_with_jumbo = [
2525
"test/unit/math/prim/",
26+
"test/unit/math/prim/constraint",
2627
"test/unit/math/",
2728
"test/unit/math/rev/",
29+
"test/unit/math/rev/constraint",
2830
"test/unit/math/fwd/",
31+
"test/unit/math/fwd/constraint",
2932
"test/unit/math/mix/",
3033
"test/unit/math/mix/fun/",
3134
"test/unit/math/opencl/",
3235
"test/unit/",
3336
]
3437

3538
jumbo_folders = [
39+
"test/unit/math/prim/constraint",
3640
"test/unit/math/prim/core",
3741
"test/unit/math/prim/err",
3842
"test/unit/math/prim/fun",
3943
"test/unit/math/prim/functor",
4044
"test/unit/math/prim/meta",
4145
"test/unit/math/prim/prob",
46+
"test/unit/math/rev/constraint",
4247
"test/unit/math/rev/core",
4348
"test/unit/math/rev/err",
4449
"test/unit/math/rev/fun",
4550
"test/unit/math/rev/functor",
4651
"test/unit/math/rev/meta",
4752
"test/unit/math/rev/prob",
53+
"test/unit/math/fwd/constraint",
4854
"test/unit/math/fwd/core",
4955
"test/unit/math/fwd/fun",
5056
"test/unit/math/fwd/functor",
@@ -58,7 +64,9 @@
5864
"test/unit/math/opencl/device_functions",
5965
"test/unit/math/opencl/kernel_generator",
6066
"test/unit/math/opencl/prim",
67+
"test/unit/math/opencl/prim/constraint",
6168
"test/unit/math/opencl/rev",
69+
"test/unit/math/opencl/rev/constraint",
6270
]
6371

6472

stan/math/fwd.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
#ifdef STAN_OPENCL
77
#include <stan/math/opencl/prim.hpp>
8+
#include <stan/math/opencl/prim_constraint.hpp>
89
#endif
910

11+
#include <stan/math/fwd/constraint.hpp>
1012
#include <stan/math/fwd/core.hpp>
1113
#include <stan/math/fwd/meta.hpp>
1214
#include <stan/math/fwd/fun.hpp>

stan/math/fwd/constraint.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef STAN_MATH_FWD_CONSTRAINT_HPP
2+
#define STAN_MATH_FWD_CONSTRAINT_HPP
3+
4+
#include <stan/math/prim/fun/Eigen.hpp>
5+
#include <stan/math/fwd/fun/Eigen_NumTraits.hpp>
6+
7+
#include <stan/math/fwd/constraint/unit_vector_constrain.hpp>
8+
9+
#endif

stan/math/fwd/fun/unit_vector_constrain.hpp renamed to stan/math/fwd/constraint/unit_vector_constrain.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef STAN_MATH_FWD_FUN_UNIT_VECTOR_CONSTRAIN_HPP
2-
#define STAN_MATH_FWD_FUN_UNIT_VECTOR_CONSTRAIN_HPP
1+
#ifndef STAN_MATH_FWD_CONSTRAINT_UNIT_VECTOR_CONSTRAIN_HPP
2+
#define STAN_MATH_FWD_CONSTRAINT_UNIT_VECTOR_CONSTRAIN_HPP
33

44
#include <stan/math/fwd/core.hpp>
55
#include <stan/math/fwd/fun/tcrossprod.hpp>
@@ -8,7 +8,7 @@
88
#include <stan/math/prim/fun/dot_self.hpp>
99
#include <stan/math/prim/fun/Eigen.hpp>
1010
#include <stan/math/prim/fun/inv.hpp>
11-
#include <stan/math/prim/fun/unit_vector_constrain.hpp>
11+
#include <stan/math/prim/constraint/unit_vector_constrain.hpp>
1212
#include <stan/math/prim/fun/tcrossprod.hpp>
1313
#include <cmath>
1414

stan/math/fwd/fun.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
#include <stan/math/fwd/fun/trigamma.hpp>
122122
#include <stan/math/fwd/fun/trunc.hpp>
123123
#include <stan/math/fwd/fun/typedefs.hpp>
124-
#include <stan/math/fwd/fun/unit_vector_constrain.hpp>
124+
#include <stan/math/fwd/constraint/unit_vector_constrain.hpp>
125125
#include <stan/math/fwd/fun/value_of.hpp>
126126
#include <stan/math/fwd/fun/value_of_rec.hpp>
127127

stan/math/mix.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stan/math/mix/fun.hpp>
66
#include <stan/math/mix/functor.hpp>
77

8+
#include <stan/math/fwd/constraint.hpp>
89
#include <stan/math/fwd/core.hpp>
910
#include <stan/math/fwd/meta.hpp>
1011
#include <stan/math/fwd/fun.hpp>
@@ -13,8 +14,10 @@
1314

1415
#ifdef STAN_OPENCL
1516
#include <stan/math/opencl/rev.hpp>
17+
#include <stan/math/opencl/rev_constraint.hpp>
1618
#endif
1719

20+
#include <stan/math/rev/constraint.hpp>
1821
#include <stan/math/rev/core.hpp>
1922
#include <stan/math/rev/meta.hpp>
2023
#include <stan/math/rev/fun.hpp>

stan/math/opencl/prim.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@
9999
#include <stan/math/opencl/zeros_strict_tri.hpp>
100100
#include <stan/math/opencl/qr_decomposition.hpp>
101101

102+
#include <stan/math/opencl/prim_constraint.hpp>
103+
102104
#include <stan/math/opencl/prim/add_diag.hpp>
103105
#include <stan/math/opencl/prim/append_array.hpp>
104106
#include <stan/math/opencl/prim/bernoulli_cdf.hpp>
@@ -172,7 +174,6 @@
172174
#include <stan/math/opencl/prim/inv_cloglog.hpp>
173175
#include <stan/math/opencl/prim/inv_gamma_lpdf.hpp>
174176
#include <stan/math/opencl/prim/inv_sqrt.hpp>
175-
#include <stan/math/opencl/prim/lb_constrain.hpp>
176177
#include <stan/math/opencl/prim/log_mix.hpp>
177178
#include <stan/math/opencl/prim/log_softmax.hpp>
178179
#include <stan/math/opencl/prim/logistic_cdf.hpp>
@@ -184,7 +185,6 @@
184185
#include <stan/math/opencl/prim/lognormal_lccdf.hpp>
185186
#include <stan/math/opencl/prim/lognormal_lcdf.hpp>
186187
#include <stan/math/opencl/prim/lognormal_lpdf.hpp>
187-
#include <stan/math/opencl/prim/lub_constrain.hpp>
188188
#include <stan/math/opencl/prim/matrix_power.hpp>
189189
#include <stan/math/opencl/prim/mdivide_left_tri_low.hpp>
190190
#include <stan/math/opencl/prim/mdivide_right_tri_low.hpp>
@@ -201,7 +201,6 @@
201201
#include <stan/math/opencl/prim/normal_lcdf.hpp>
202202
#include <stan/math/opencl/prim/normal_lpdf.hpp>
203203
#include <stan/math/opencl/prim/num_elements.hpp>
204-
#include <stan/math/opencl/prim/offset_multiplier_constrain.hpp>
205204
#include <stan/math/opencl/prim/ordered_logistic_glm_lpmf.hpp>
206205
#include <stan/math/opencl/prim/ordered_logistic_lpmf.hpp>
207206
#include <stan/math/opencl/prim/pareto_cdf.hpp>
@@ -266,12 +265,10 @@
266265
#include <stan/math/opencl/prim/to_row_vector.hpp>
267266
#include <stan/math/opencl/prim/to_vector.hpp>
268267
#include <stan/math/opencl/prim/trace.hpp>
269-
#include <stan/math/opencl/prim/ub_constrain.hpp>
270268
#include <stan/math/opencl/prim/uniform_cdf.hpp>
271269
#include <stan/math/opencl/prim/uniform_lccdf.hpp>
272270
#include <stan/math/opencl/prim/uniform_lcdf.hpp>
273271
#include <stan/math/opencl/prim/uniform_lpdf.hpp>
274-
#include <stan/math/opencl/prim/unit_vector_constrain.hpp>
275272
#include <stan/math/opencl/prim/variance.hpp>
276273
#include <stan/math/opencl/prim/weibull_cdf.hpp>
277274
#include <stan/math/opencl/prim/weibull_lccdf.hpp>

stan/math/opencl/prim/lb_constrain.hpp renamed to stan/math/opencl/prim/constraint/lb_constrain.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef STAN_MATH_OPENCL_PRIM_LB_CONSTRAIN_HPP
2-
#define STAN_MATH_OPENCL_PRIM_LB_CONSTRAIN_HPP
1+
#ifndef STAN_MATH_OPENCL_PRIM_CONSTRAINT_LB_CONSTRAIN_HPP
2+
#define STAN_MATH_OPENCL_PRIM_CONSTRAINT_LB_CONSTRAIN_HPP
33
#ifdef STAN_OPENCL
44

55
#include <stan/math/opencl/prim/sum.hpp>

stan/math/opencl/prim/lub_constrain.hpp renamed to stan/math/opencl/prim/constraint/lub_constrain.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef STAN_MATH_OPENCL_PRIM_LUB_CONSTRAIN_HPP
2-
#define STAN_MATH_OPENCL_PRIM_LUB_CONSTRAIN_HPP
1+
#ifndef STAN_MATH_OPENCL_PRIM_CONSTRAINT_LUB_CONSTRAIN_HPP
2+
#define STAN_MATH_OPENCL_PRIM_CONSTRAINT_LUB_CONSTRAIN_HPP
33
#ifdef STAN_OPENCL
44

55
#include <stan/math/opencl/prim/sum.hpp>

0 commit comments

Comments
 (0)