From 02d6bc26fadc63d14dd4e52ead24ec753f507524 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 10:35:53 -0400 Subject: [PATCH 01/16] Fix two issues with tuple functions 1. Accidentally returning a reference 2. Integer arguments failed under certain circumstances, are now templated --- src/stan_math_backend/Cpp.ml | 13 +- src/stan_math_backend/Lower_functions.ml | 69 +- src/stan_math_backend/Lower_program.ml | 36 +- .../cli-args/allow-undefined/cpp.expected | 18 +- .../allow-undefined/standalone-cpp.expected | 6 +- .../filename-in-msg/filename_good.expected | 12 + test/integration/good/code-gen/cl.expected | 12 + .../code-gen/complex_numbers/cpp.expected | 230 +- test/integration/good/code-gen/cpp.expected | 3433 ++++++++---- .../good/code-gen/expressions/cpp.expected | 108 +- test/integration/good/code-gen/lir.expected | 1861 ++++--- .../good/code-gen/ode/cpp.expected | 155 +- .../good/code-gen/opencl/cpp.expected | 24 + .../good/code-gen/profiling/cpp.expected | 12 + .../standalone_functions/cpp.expected | 189 +- .../good/compiler-optimizations/cpp.expected | 1013 +++- .../compiler-optimizations/cppO0.expected | 1013 +++- .../compiler-optimizations/cppO1.expected | 1013 +++- .../mem_patterns/cpp.expected | 200 +- test/integration/good/tuples/cpp.expected | 4676 ++++++++++------- test/integration/good/tuples/pretty.expected | 20 + .../good/tuples/transformed_mir.expected | 184 + .../good/tuples/tuple-dataonly2.stan | 8 + test/integration/good/tuples/tuple_lpdf2.stan | 9 + 24 files changed, 9996 insertions(+), 4318 deletions(-) create mode 100644 test/integration/good/tuples/tuple-dataonly2.stan create mode 100644 test/integration/good/tuples/tuple_lpdf2.stan diff --git a/src/stan_math_backend/Cpp.ml b/src/stan_math_backend/Cpp.ml index 3b33a0158..0a4793722 100644 --- a/src/stan_math_backend/Cpp.ml +++ b/src/stan_math_backend/Cpp.ml @@ -266,6 +266,7 @@ module Decls = struct VariableDefn (make_variable_defn ~type_:Int ~name:"current_statement__" ~init:(Assignment (Literal "0")) () ) + :: Stmts.unused "current_statement__" let dummy_var = VariableDefn @@ -299,7 +300,7 @@ end type template_parameter = | Typename of string (** The name of a template typename *) - | RequireIs of string * string + | RequireIs of string * type_ (** A C++ type trait (e.g. is_arithmetic) and the template name which needs to satisfy that. These are collated into one require_all_t<> *) @@ -412,7 +413,7 @@ module Printing = struct let pp_requires ~default ppf requires = if not (List.is_empty requires) then - let pp_require ppf (trait, name) = pf ppf "%s<%s>" trait name in + let pp_require ppf (trait, t) = pf ppf "%s<%a>" trait pp_type_ t in pf ppf ",@ stan::require_all_t<@[%a@]>*%s" (list ~sep:comma pp_require) requires @@ -762,7 +763,9 @@ module Tests = struct let funs = [ make_fun_defn ~templates_init: - ([[Typename "T0__"; RequireIs ("stan::is_foobar", "T0__")]], true) + ( [ [ Typename "T0__" + ; RequireIs ("stan::is_foobar", TemplateType "T0__") ] ] + , true ) ~name:"foobar" ~return_type:Void ~inline:true () ; (let s = [ Comment "A potentially \n long comment" @@ -770,7 +773,9 @@ module Tests = struct let rethrow = Stmts.rethrow_located s in make_fun_defn ~templates_init: - ([[Typename "T0__"; RequireIs ("stan::is_foobar", "T0__")]], false) + ( [ [ Typename "T0__" + ; RequireIs ("stan::is_foobar", TemplateType "T0__") ] ] + , false ) ~name:"foobar" ~return_type:Void ~inline:true ~body:rethrow () ) ] in let open Fmt in diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 412d40723..cda0efba4 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -6,8 +6,9 @@ open Cpp let rec lower_type_eigen_expr (t : UnsizedType.t) (inner_type : type_) : type_ = match t with - | UInt -> Int - | UReal | UMatrix | URowVector | UVector | UComplexVector | UComplexMatrix + | UInt + (* | UInt -> Int *) + |UReal | UMatrix | URowVector | UVector | UComplexVector | UComplexMatrix |UComplexRowVector | UTuple _ -> inner_type | UComplex -> Types.complex inner_type @@ -34,6 +35,7 @@ let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = (Types.const_ref type_, opt_arg_suffix) let requires ut t = + let t = TemplateType t in match ut with | UnsizedType.URowVector -> [ RequireIs ("stan::is_row_vector", t) @@ -54,6 +56,7 @@ let requires ut t = [ RequireIs ("stan::is_eigen_matrix_dynamic", t) ; RequireIs ("stan::is_vt_complex", t) ] (* NB: Not unwinding array types due to the way arrays of eigens are printed *) + | UInt -> [RequireIs ("std::is_integral", TypeTrait ("std::decay_t", [t]))] | _ -> [RequireIs ("stan::is_stan_scalar", t)] let return_optional_arg_types (args : Program.fun_arg_decl) = @@ -91,7 +94,7 @@ let return_optional_arg_types (args : Program.fun_arg_decl) = let template_parameters (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = match (ad, fst (UnsizedType.unwind_array_type typ)) with - | _, UInt -> ([], [], arg_type None typ) + (* | _, UInt -> ([], [], arg_type None typ) *) | _, UTuple tys -> let temps, reqs, sclrs = List.map ~f:(fun ty -> (ad, ty)) tys @@ -111,14 +114,16 @@ let template_parameters (args : Program.fun_arg_decl) = List.mapi args ~f:(fun i (ad, _, ty) -> template_p "T" i (ad, ty)) let%expect_test "arg types templated correctly" = - [(AutoDiffable, "xreal", UReal); (DataOnly, "yint", UInt)] + [(AutoDiffable, "xreal", UReal); (AutoDiffable, "yint", UInt)] |> template_parameters |> List.map ~f:fst3 |> List.concat |> String.concat ~sep:"," |> print_endline ; - [%expect {| T0__ |}] + [%expect {| T0__,T1__ |}] let%expect_test "arg types tuple template" = let templates, reqs, type_ = - [(AutoDiffable, "xreal", UTuple [UReal; UMatrix])] + [ ( TupleAD [AutoDiffable; AutoDiffable; DataOnly] + , "xreal" + , UTuple [UReal; UMatrix; UInt] ) ] |> template_parameters |> List.unzip3 in templates |> List.concat |> String.concat ~sep:"," |> print_endline ; reqs |> List.concat |> List.sexp_of_t sexp_of_template_parameter |> print_s ; @@ -127,11 +132,13 @@ let%expect_test "arg types tuple template" = |> print_endline ; [%expect {| - T0__0__,T0__1__ - ((RequireIs stan::is_stan_scalar T0__0__) - (RequireIs stan::is_eigen_matrix_dynamic T0__1__) - (RequireIs stan::is_vt_not_complex T0__1__)) - std::tuple |}] + T0__0__,T0__1__,T0__2__ + ((RequireIs stan::is_stan_scalar (TemplateType T0__0__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__1__)) + (RequireIs std::is_integral + (TypeTrait std::decay_t ((TemplateType T0__2__))))) + std::tuple |}] let%expect_test "arg types tuple template" = let templates, reqs, type_ = @@ -144,9 +151,10 @@ let%expect_test "arg types tuple template" = |> print_endline ; [%expect {| - T0__1__ - ((RequireIs stan::is_eigen_matrix_dynamic T0__1__) - (RequireIs stan::is_vt_not_complex T0__1__)) + T0__0__,T0__1__ + ((RequireIs stan::is_stan_scalar (TemplateType T0__0__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__1__))) std::vector, T0__1__>> |}] let lower_promoted_scalar args = @@ -160,8 +168,11 @@ let lower_promoted_scalar args = match args with | [] -> Double | hd :: list_tail -> - TypeTrait ("stan::promote_args_t", hd @ chunk_till_empty list_tail) - in + TypeTrait + ( "std::decay_t" + , [ TypeTrait + ("stan::promote_args_t", hd @ chunk_till_empty list_tail) ] + ) in promote_args_chunked List.( chunks_of ~length:5 @@ -222,7 +233,7 @@ let lower_fun_body fdargs fdsuffix fdbody = ~name:"propto__" ~init:(Assignment (Literal "true")) () ) :: Stmts.unused "propto__" in let body = lower_statement fdbody in - (local_scalar :: Decls.current_statement :: to_refs) + ((local_scalar :: Decls.current_statement) @ to_refs) @ propto @ Decls.dummy_var @ Stmts.rethrow_located body let mk_extra_args templates args = @@ -441,9 +452,11 @@ module Testing = struct stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> void sars(const T0__& x_arg__, const T1__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; @@ -503,14 +516,17 @@ module Testing = struct stan::is_row_vector, stan::is_vt_not_complex, stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, - stan::base_type_t, stan::base_type_t, T3__>,-1,-1> + Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, T3__>>,-1,-1> sars(const T0__& x_arg__, const T1__& y_arg__, const T2__& z_arg__, const std::vector>& w, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, - stan::base_type_t, T3__>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, T3__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); const auto& z = stan::math::to_ref(z_arg__); @@ -535,8 +551,9 @@ module Testing = struct stan::is_row_vector, stan::is_vt_not_complex, stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, - stan::base_type_t, stan::base_type_t, T3__>,-1,-1> + Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, T3__>>,-1,-1> operator()(const T0__& x, const T1__& y, const T2__& z, const std::vector>& w, std::ostream* pstream__) const { diff --git a/src/stan_math_backend/Lower_program.ml b/src/stan_math_backend/Lower_program.ml index f675bd519..b1f119746 100644 --- a/src/stan_math_backend/Lower_program.ml +++ b/src/stan_math_backend/Lower_program.ml @@ -159,15 +159,16 @@ let lower_constructor ; (TypeLiteral "unsigned int", "random_seed__ = 0") ; (Pointer (TypeLiteral "std::ostream"), "pstream__ = nullptr") ] in let preamble = - [ Decls.current_statement; Using ("local_scalar_t__", Some Double) - ; VariableDefn - (make_variable_defn ~type_:(TypeLiteral "boost::ecuyer1988") - ~name:"base_rng__" - ~init: - (Assignment - (Exprs.fun_call "stan::services::util::create_rng" - [Var "random_seed__"; Literal "0"] ) ) - () ) ] + Decls.current_statement + @ [ Using ("local_scalar_t__", Some Double) + ; VariableDefn + (make_variable_defn ~type_:(TypeLiteral "boost::ecuyer1988") + ~name:"base_rng__" + ~init: + (Assignment + (Exprs.fun_call "stan::services::util::create_rng" + [Var "random_seed__"; Literal "0"] ) ) + () ) ] @ Stmts.unused "base_rng__" @ gen_function__ prog_name prog_name @ Decls.dummy_var in @@ -220,9 +221,8 @@ let gen_log_prob Program.{prog_name; log_prob; reverse_mode_log_prob; _} = ; VariableDefn (make_variable_defn ~type_:t__ ~name:"lp__" ~init:(Construction [Literal "0.0"]) - () ); Decls.lp_accum t__; Decls.serializer_in - ; Decls.current_statement ] - @ Decls.dummy_var + () ); Decls.lp_accum t__; Decls.serializer_in ] + @ Decls.current_statement @ Decls.dummy_var @ gen_function__ prog_name "log_prob" in let outro = let open Expression_syntax in @@ -278,8 +278,8 @@ let gen_write_array {Program.prog_name; generate_quantities; _} = (make_variable_defn ~type_:Double ~name:"lp__" ~init:(Assignment (Literal "0.0")) () ) :: Stmts.unused "lp__" - @ [Decls.current_statement; Decls.lp_accum Double] - @ Decls.dummy_var + @ Decls.current_statement + @ (Decls.lp_accum Double :: Decls.dummy_var) @ VariableDefn (make_variable_defn ~constexpr:true ~type_:Types.bool ~name:"jacobian__" ~init:(Assignment (Literal "false")) () ) @@ -301,8 +301,8 @@ let gen_transform_inits_impl {Program.transform_inits; output_vars; _} = ; (Ref (TemplateType "VecVar"), "vars__") ; (Pointer (TypeLiteral "std::ostream"), "pstream__ = nullptr") ] in let intro = - [ Using ("local_scalar_t__", Some Double); Decls.serializer_out - ; Decls.current_statement ] + Using ("local_scalar_t__", Some Double) + :: Decls.serializer_out :: Decls.current_statement @ Decls.dummy_var in let validate_params ( (name : string) @@ -338,8 +338,8 @@ let gen_unconstrain_array_impl {Program.unconstrain_array; _} = ; (Pointer (TypeLiteral "std::ostream"), "pstream__ = nullptr") ] in let intro = [ Using ("local_scalar_t__", Some Double); Decls.serializer_in - ; Decls.serializer_out; Decls.current_statement ] - @ Decls.dummy_var in + ; Decls.serializer_out ] + @ Decls.current_statement @ Decls.dummy_var in FunDef (make_fun_defn ~templates_init:([templates], true) diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index e20f765ba..d4458f297 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -18,8 +18,8 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>,-1,1> + Eigen::Matrix, + stan::base_type_t>>,-1,1> operator()(const T0__& phi, const T1__& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); @@ -30,6 +30,8 @@ internal_fun(const std::vector>& a, const std::vector>& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -56,6 +58,8 @@ class external_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -91,6 +95,8 @@ class external_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -115,6 +121,8 @@ class external_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -146,6 +154,8 @@ class external_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -180,6 +190,8 @@ class external_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -191,6 +203,8 @@ class external_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index df7d96003..57136050a 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -18,8 +18,8 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>,-1,1> + Eigen::Matrix, + stan::base_type_t>>,-1,1> operator()(const T0__& phi, const T1__& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); @@ -30,6 +30,8 @@ internal_fun(const std::vector>& a, const std::vector>& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; diff --git a/test/integration/cli-args/filename-in-msg/filename_good.expected b/test/integration/cli-args/filename-in-msg/filename_good.expected index 0584f451d..84cc7b441 100644 --- a/test/integration/cli-args/filename-in-msg/filename_good.expected +++ b/test/integration/cli-args/filename-in-msg/filename_good.expected @@ -19,6 +19,8 @@ class filename_good_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -64,6 +66,8 @@ class filename_good_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -88,6 +92,8 @@ class filename_good_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -119,6 +125,8 @@ class filename_good_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -153,6 +161,8 @@ class filename_good_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -164,6 +174,8 @@ class filename_good_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/cl.expected b/test/integration/good/code-gen/cl.expected index 6be762d8a..f76784c73 100644 --- a/test/integration/good/code-gen/cl.expected +++ b/test/integration/good/code-gen/cl.expected @@ -262,6 +262,8 @@ class optimize_glm_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -505,6 +507,8 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1220,6 +1224,8 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1942,6 +1948,8 @@ class optimize_glm_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -2026,6 +2034,8 @@ class optimize_glm_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2095,6 +2105,8 @@ class optimize_glm_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index 4e5bc7180..d2e07785d 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -149,6 +149,8 @@ class basic_op_param_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -223,6 +225,8 @@ class basic_op_param_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -735,6 +739,8 @@ class basic_op_param_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1254,6 +1260,8 @@ class basic_op_param_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1804,6 +1812,8 @@ class basic_op_param_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1873,6 +1883,8 @@ class basic_op_param_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2491,6 +2503,8 @@ class basic_operations_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2726,6 +2742,8 @@ class basic_operations_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2757,6 +2775,8 @@ class basic_operations_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3232,6 +3252,8 @@ class basic_operations_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3243,6 +3265,8 @@ class basic_operations_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3665,6 +3689,8 @@ class basic_ops_mix_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3893,6 +3919,8 @@ class basic_ops_mix_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4464,6 +4492,8 @@ class basic_ops_mix_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5042,6 +5072,8 @@ class basic_ops_mix_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5651,6 +5683,8 @@ class basic_ops_mix_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5720,6 +5754,8 @@ class basic_ops_mix_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6231,6 +6267,8 @@ class complex_data_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -6497,6 +6535,8 @@ class complex_data_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6521,6 +6561,8 @@ class complex_data_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6552,6 +6594,8 @@ class complex_data_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6586,6 +6630,8 @@ class complex_data_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6597,6 +6643,8 @@ class complex_data_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7172,46 +7220,50 @@ static constexpr std::array locations_array__ = std::complex foo(std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo1(const std::complex& z, std::ostream* pstream__); template >* = nullptr> -std::complex> +std::complex>> foo2(const T0__& r, std::ostream* pstream__); template >* = nullptr> -std::complex> +std::complex>> foo3(const std::complex& z, std::ostream* pstream__); std::vector> foo4(std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo5(const std::vector>& z, std::ostream* pstream__); template >* = nullptr> -std::vector>> +std::vector>>> foo6(const T0__& r, std::ostream* pstream__); template >* = nullptr> -std::vector>> +std::vector>>> foo7(const std::vector>& z, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo8(const std::vector>>& z, std::ostream* pstream__); template >* = nullptr> -std::vector>>> +std::vector< + std::vector>>>> foo9(const T0__& r, std::ostream* pstream__); template >* = nullptr> -std::vector>>> +std::vector< + std::vector>>>> foo10(const std::vector>>& z, std::ostream* pstream__); std::complex foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7227,10 +7279,12 @@ std::complex foo(std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo1(const std::complex& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7245,10 +7299,12 @@ foo1(const std::complex& z, std::ostream* pstream__) { } } template >*> -std::complex> +std::complex>> foo2(const T0__& r, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7263,10 +7319,12 @@ foo2(const T0__& r, std::ostream* pstream__) { } } template >*> -std::complex> +std::complex>> foo3(const std::complex& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7283,6 +7341,8 @@ foo3(const std::complex& z, std::ostream* pstream__) { std::vector> foo4(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7302,10 +7362,12 @@ std::vector> foo4(std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo5(const std::vector>& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7320,10 +7382,12 @@ foo5(const std::vector>& z, std::ostream* pstream__) { } } template >*> -std::vector>> +std::vector>>> foo6(const T0__& r, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7340,10 +7404,12 @@ foo6(const T0__& r, std::ostream* pstream__) { } } template >*> -std::vector>> +std::vector>>> foo7(const std::vector>& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7358,11 +7424,13 @@ foo7(const std::vector>& z, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo8(const std::vector>>& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7377,10 +7445,13 @@ foo8(const std::vector>>& z, std::ostream* } } template >*> -std::vector>>> +std::vector< + std::vector>>>> foo9(const T0__& r, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7405,11 +7476,14 @@ foo9(const T0__& r, std::ostream* pstream__) { } } template >*> -std::vector>>> +std::vector< + std::vector>>>> foo10(const std::vector>>& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7441,6 +7515,8 @@ class complex_scalar_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -7723,6 +7799,8 @@ class complex_scalar_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7982,6 +8060,8 @@ class complex_scalar_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8248,6 +8328,8 @@ class complex_scalar_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9208,6 +9290,8 @@ class complex_scalar_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9256,6 +9340,8 @@ class complex_scalar_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9687,6 +9773,8 @@ class complex_vectors_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9808,6 +9898,8 @@ class complex_vectors_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9901,6 +9993,8 @@ class complex_vectors_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10005,6 +10099,8 @@ class complex_vectors_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10016,6 +10112,8 @@ class complex_vectors_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10287,49 +10385,52 @@ static constexpr std::array locations_array__ = template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>>>,-1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> foo(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>>>,-1,1> foo(const T0__& Z_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>,1,-1> +Eigen::Matrix>>>,1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,1,-1> +Eigen::Matrix>>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__); template >* = nullptr> -std::vector>,-1,-1>> +std::vector< + Eigen::Matrix>>,-1,-1>> foo(const std::vector,-1,-1>>& Z, std::ostream* pstream__); template >* = nullptr> -std::vector,-1,-1>> +std::vector>,-1,-1>> foo(const std::vector>& A, std::ostream* pstream__); template , stan::is_vt_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>>>,-1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& Z = stan::math::to_ref(Z_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -10347,10 +10448,12 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -10370,10 +10473,12 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>>>,-1,1> foo(const T0__& Z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& Z = stan::math::to_ref(Z_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -10391,10 +10496,12 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -10414,10 +10521,12 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_complex>*> -Eigen::Matrix>>,1,-1> +Eigen::Matrix>>>,1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& Z = stan::math::to_ref(Z_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -10435,10 +10544,12 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,1,-1> +Eigen::Matrix>>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -10456,11 +10567,14 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { } } template >*> -std::vector>,-1,-1>> +std::vector< + Eigen::Matrix>>,-1,-1>> foo(const std::vector,-1,-1>>& Z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -10475,10 +10589,12 @@ foo(const std::vector,-1,-1>>& Z, } } template >*> -std::vector,-1,-1>> +std::vector>,-1,-1>> foo(const std::vector>& A, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -10504,6 +10620,8 @@ class user_function_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10614,6 +10734,8 @@ class user_function_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10688,6 +10810,8 @@ class user_function_templating_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10722,6 +10846,8 @@ class user_function_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10733,6 +10859,8 @@ class user_function_templating_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 6a24ac994..690f5449a 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -33,6 +33,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -103,6 +105,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -159,6 +163,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -222,6 +228,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -282,6 +290,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -312,6 +322,8 @@ class _8_schools_ncp_model final : public model_base_crtp<_8_schools_ncp_model> using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -538,6 +550,8 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -583,6 +597,8 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -614,6 +630,8 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -652,6 +670,8 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -690,6 +710,8 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -709,6 +731,8 @@ class _8start_with_number_model final : public model_base_crtp<_8start_with_numb using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -877,20 +901,34 @@ static constexpr std::array locations_array__ = " (in 'complex-tuples.stan', line 15, column 2 to column 74)", " (in 'complex-tuples.stan', line 3, column 4 to column 27)", " (in 'complex-tuples.stan', line 2, column 105 to line 4, column 3)"}; +template >, + std::is_integral>, + std::is_integral>, + stan::is_stan_scalar>* = nullptr> std::tuple>> -f(const int& x, +f(const T0__& x, const std::vector< std::vector< - std::tuple>, + std::tuple>, std::vector>>>>& x2, std::ostream* pstream__); +template >, + std::is_integral>, + std::is_integral>, + stan::is_stan_scalar>*> std::tuple>> -f(const int& x, +f(const T0__& x, const std::vector< std::vector< - std::tuple>, + std::tuple>, std::vector>>>>& x2, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -925,6 +963,8 @@ class complex_tuples_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -1029,6 +1069,8 @@ class complex_tuples_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1053,6 +1095,8 @@ class complex_tuples_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1084,6 +1128,8 @@ class complex_tuples_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1118,6 +1164,8 @@ class complex_tuples_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1129,6 +1177,8 @@ class complex_tuples_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1298,6 +1348,8 @@ class container_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1447,6 +1501,8 @@ class container_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1554,6 +1610,8 @@ class container_promotion_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1700,6 +1758,8 @@ class container_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1719,6 +1779,8 @@ class container_promotion_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2059,9 +2121,15 @@ static constexpr std::array locations_array__ = " (in 'cpp-reserved-words.stan', line 14, column 13 to column 15)", " (in 'cpp-reserved-words.stan', line 15, column 17 to column 19)", " (in 'cpp-reserved-words.stan', line 16, column 17 to column 19)"}; -void _stan_alignas(const int& _stan_asm, std::ostream* pstream__); -void _stan_alignof(const int& _stan_char, std::ostream* pstream__); -int _stan_and(const int& _stan_STAN_MAJOR, std::ostream* pstream__); +template >>* = nullptr> +void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__); +template >>* = nullptr> +void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__); +template >>* = nullptr> +int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__); template >* = nullptr> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__); @@ -2069,7 +2137,9 @@ template , stan::is_vt_not_complex>* = nullptr> void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__); -void _stan_bitand(const int& _stan_constexpr, std::ostream* pstream__); +template >>* = nullptr> +void _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__); void _stan_bitor(std::ostream* pstream__); void _stan_bool(std::ostream* pstream__); void _stan_case(std::ostream* pstream__); @@ -2077,9 +2147,13 @@ void _stan_catch(std::ostream* pstream__); void _stan_char(std::ostream* pstream__); void _stan_char16_t(std::ostream* pstream__); void _stan_char32_t(std::ostream* pstream__); -void _stan_alignas(const int& _stan_asm, std::ostream* pstream__) { +template >>*> +void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2087,9 +2161,13 @@ void _stan_alignas(const int& _stan_asm, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } -void _stan_alignof(const int& _stan_char, std::ostream* pstream__) { +template >>*> +void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2097,9 +2175,13 @@ void _stan_alignof(const int& _stan_char, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } -int _stan_and(const int& _stan_STAN_MAJOR, std::ostream* pstream__) { +template >>*> +int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2115,8 +2197,10 @@ int _stan_and(const int& _stan_STAN_MAJOR, std::ostream* pstream__) { } template >*> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2128,8 +2212,10 @@ template , stan::is_vt_not_complex>*> void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& _stan_class = stan::math::to_ref(_stan_class_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -2138,9 +2224,13 @@ void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } -void _stan_bitand(const int& _stan_constexpr, std::ostream* pstream__) { +template >>*> +void _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2151,6 +2241,8 @@ void _stan_bitand(const int& _stan_constexpr, std::ostream* pstream__) { void _stan_bitor(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2161,6 +2253,8 @@ void _stan_bitor(std::ostream* pstream__) { void _stan_bool(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2171,6 +2265,8 @@ void _stan_bool(std::ostream* pstream__) { void _stan_case(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2181,6 +2277,8 @@ void _stan_case(std::ostream* pstream__) { void _stan_catch(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2191,6 +2289,8 @@ void _stan_catch(std::ostream* pstream__) { void _stan_char(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2201,6 +2301,8 @@ void _stan_char(std::ostream* pstream__) { void _stan_char16_t(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2211,6 +2313,8 @@ void _stan_char16_t(std::ostream* pstream__) { void _stan_char32_t(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2238,6 +2342,8 @@ class cpp_reserved_words_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2440,6 +2548,8 @@ class cpp_reserved_words_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2537,6 +2647,8 @@ class cpp_reserved_words_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -2677,6 +2789,8 @@ class cpp_reserved_words_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2752,6 +2866,8 @@ class cpp_reserved_words_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3130,6 +3246,8 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3256,6 +3376,8 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3319,6 +3441,8 @@ class eight_schools_ncp_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3379,6 +3503,8 @@ class eight_schools_ncp_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3409,6 +3535,8 @@ class eight_schools_ncp_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3637,7 +3765,7 @@ static constexpr std::array locations_array__ = template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo(const T0__& x, const T1__& y, std::ostream* pstream__); template , @@ -3646,10 +3774,12 @@ void bar(const T0__& x, const T1__& y, std::ostream* pstream__); template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -3667,8 +3797,10 @@ template , stan::is_stan_scalar>*> void bar(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -3694,6 +3826,8 @@ class funcall_type_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3784,6 +3920,8 @@ class funcall_type_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3830,6 +3968,8 @@ class funcall_type_promotion_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3864,6 +4004,8 @@ class funcall_type_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3875,6 +4017,8 @@ class funcall_type_promotion_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4034,6 +4178,8 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4132,6 +4280,8 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4196,6 +4346,8 @@ class mixed_type_arrays_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4280,6 +4432,8 @@ class mixed_type_arrays_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4301,6 +4455,8 @@ class mixed_type_arrays_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5308,40 +5464,46 @@ static constexpr std::array locations_array__ = " (in 'mother.stan', line 343, column 4 to column 18)", " (in 'mother.stan', line 344, column 4 to column 16)", " (in 'mother.stan', line 341, column 41 to line 345, column 3)"}; -int foo(const int& n, std::ostream* pstream__); +template >>* = nullptr> +int foo(const T0__& n, std::ostream* pstream__); template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -std::vector> +std::vector>> sho(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__); double foo_bar0(std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__); +std::decay_t> +foo_bar1(const T0__& x, std::ostream* pstream__); template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -foo_lpmf(const int& y, const T1__& lambda, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -foo_lcdf(const int& y, const T1__& lambda, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -foo_lccdf(const int& y, const T1__& lambda, std::ostream* pstream__); +template >, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__); +template >, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); +template >, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__); template >* = nullptr> -std::vector> -foo_3(const T0__& t, const int& n, std::ostream* pstream__); + stan::require_all_t>>* = nullptr> +int foo_1(const T0__& a, std::ostream* pstream__); +template >>* = nullptr> +int foo_2(const T0__& a, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +std::vector>> +foo_3(const T0__& t, const T1__& n, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,1> +Eigen::Matrix, + stan::base_type_t>>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__); @@ -5390,7 +5557,7 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__); template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t> +std::decay_t>>> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, const T5__& x6, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); -template , - stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> -covsqrt2corsqrt(const T0__& mat_arg__, const int& invert, std::ostream* + stan::is_vt_not_complex, + std::is_integral>>* = nullptr> +Eigen::Matrix>>,-1,-1> +covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5428,7 +5599,7 @@ template , stan::is_stan_scalar>* = nullptr> void -f0(const int& a1, const std::vector& a2, +f0(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5436,10 +5607,13 @@ f0(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5451,7 +5625,7 @@ template , stan::is_stan_scalar>* = nullptr> int -f1(const int& a1, const std::vector& a2, +f1(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5459,10 +5633,13 @@ f1(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5474,7 +5651,7 @@ template , stan::is_stan_scalar>* = nullptr> std::vector -f2(const int& a1, const std::vector& a2, +f2(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5482,10 +5659,13 @@ f2(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5497,7 +5677,7 @@ template , stan::is_stan_scalar>* = nullptr> std::vector> -f3(const int& a1, const std::vector& a2, +f3(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5505,10 +5685,13 @@ f3(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5519,9 +5702,11 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>> -f4(const int& a1, const std::vector& a2, +std::decay_t, + T7__, + std::decay_t, T10__, T11__>>>> +f4(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5529,10 +5714,13 @@ f4(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5544,9 +5732,11 @@ template , stan::is_stan_scalar>* = nullptr> std::vector< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>> -f5(const int& a1, const std::vector& a2, + std::decay_t, T7__, + std::decay_t, T10__, T11__>>>>> +f5(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5554,10 +5744,13 @@ f5(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5570,9 +5763,11 @@ template >* = nullptr> std::vector< std::vector< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>>> -f6(const int& a1, const std::vector& a2, + std::decay_t, T7__, + std::decay_t, T10__, T11__>>>>>> +f6(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5580,10 +5775,13 @@ f6(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5594,11 +5792,12 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, - T7__, - stan::promote_args_t, T10__, - T11__>>,-1,1> -f7(const int& a1, const std::vector& a2, +Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,1> +f7(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5606,10 +5805,13 @@ f7(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5621,11 +5823,12 @@ template , stan::is_stan_scalar>* = nullptr> std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, T10__, - T11__>>,-1,1>> -f8(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,1>> +f8(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5633,10 +5836,13 @@ f8(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5649,11 +5855,12 @@ template >* = nullptr> std::vector< std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, - T10__, T11__>>,-1,1>>> -f9(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, + T10__, T11__>>>>,-1,1>>> +f9(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5661,10 +5868,13 @@ f9(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5675,11 +5885,12 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, - T7__, - stan::promote_args_t, T10__, - T11__>>,-1,-1> -f10(const int& a1, const std::vector& a2, +Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,-1> +f10(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5687,10 +5898,13 @@ f10(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5702,11 +5916,12 @@ template , stan::is_stan_scalar>* = nullptr> std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, T10__, - T11__>>,-1,-1>> -f11(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,-1>> +f11(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5714,10 +5929,13 @@ f11(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__); -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -5730,11 +5948,12 @@ template >* = nullptr> std::vector< std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, - T10__, T11__>>,-1,-1>>> -f12(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, + T10__, T11__>>>>,-1,-1>>> +f12(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -5747,20 +5966,21 @@ Eigen::Matrix matfoo(std::ostream* pstream__); Eigen::Matrix vecfoo(std::ostream* pstream__); template >* = nullptr> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__); template >* = nullptr> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__); -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const std::vector& dat, const std::vector& dat_int, std::ostream* pstream__); @@ -5769,20 +5989,21 @@ template , stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,1> +Eigen::Matrix, + stan::base_type_t>>,-1,1> binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); struct algebra_system_functor__ { - template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> operator()(const T0__& x, const T1__& y, const std::vector& dat, const std::vector& dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); @@ -5794,16 +6015,20 @@ struct binomialf_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>,-1,1> + Eigen::Matrix, + stan::base_type_t>>,-1,1> operator()(const T0__& phi, const T1__& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return binomialf(phi, theta, x_r, x_i, pstream__); } }; -int foo(const int& n, std::ostream* pstream__) { +template >>*> +int foo(const T0__& n, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5826,12 +6051,15 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -std::vector> +std::vector>> sho(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5860,6 +6088,8 @@ sho(const T0__& t, const std::vector& y, const std::vector& double foo_bar0(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5874,9 +6104,12 @@ double foo_bar0(std::ostream* pstream__) { } } template >*> -stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +foo_bar1(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5893,10 +6126,12 @@ stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__) { template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5910,12 +6145,15 @@ foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo_lpmf(const int& y, const T1__& lambda, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template >, + stan::is_stan_scalar>*> +std::decay_t> +foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5926,11 +6164,15 @@ foo_lpmf(const int& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo_lcdf(const int& y, const T1__& lambda, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template >, + stan::is_stan_scalar>*> +std::decay_t> +foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5944,11 +6186,15 @@ foo_lcdf(const int& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo_lccdf(const int& y, const T1__& lambda, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template >, + stan::is_stan_scalar>*> +std::decay_t> +foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5965,11 +6211,13 @@ foo_lccdf(const int& y, const T1__& lambda, std::ostream* pstream__) { template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5989,8 +6237,10 @@ template ; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6003,9 +6253,13 @@ unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int foo_1(const int& a, std::ostream* pstream__) { +template >>*> +int foo_1(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6208,9 +6462,13 @@ int foo_1(const int& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int foo_2(const int& a, std::ostream* pstream__) { +template >>*> +int foo_2(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6235,11 +6493,15 @@ int foo_2(const int& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::vector> -foo_3(const T0__& t, const int& n, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>>*> +std::vector>> +foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6256,11 +6518,13 @@ foo_3(const T0__& t, const int& n, std::ostream* pstream__) { template >*> -stan::promote_args_t +std::decay_t> foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6273,8 +6537,10 @@ foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } template >*> void foo_4(const std::vector& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6299,11 +6565,14 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6354,14 +6623,16 @@ template , stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,1> +Eigen::Matrix, + stan::base_type_t>>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& shared_params = stan::math::to_ref(shared_params_arg__); const auto& job_params = stan::math::to_ref(job_params_arg__); static constexpr bool propto__ = true; @@ -6385,11 +6656,14 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6412,14 +6686,17 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -stan::promote_args_t> +std::decay_t>>> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, const T5__& x6, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6430,14 +6707,17 @@ foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> -covsqrt2corsqrt(const T0__& mat_arg__, const int& invert, std::ostream* + stan::is_vt_not_complex, + std::is_integral>>*> +Eigen::Matrix>>,-1,-1> +covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& mat = stan::math::to_ref(mat_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -6473,10 +6753,13 @@ covsqrt2corsqrt(const T0__& mat_arg__, const int& invert, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6488,7 +6771,7 @@ template , stan::is_stan_scalar>*> void -f0(const int& a1, const std::vector& a2, +f0(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6496,11 +6779,15 @@ f0(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6519,10 +6806,13 @@ f0(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6534,7 +6824,7 @@ template , stan::is_stan_scalar>*> int -f1(const int& a1, const std::vector& a2, +f1(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6542,11 +6832,15 @@ f1(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6562,10 +6856,13 @@ f1(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6577,7 +6874,7 @@ template , stan::is_stan_scalar>*> std::vector -f2(const int& a1, const std::vector& a2, +f2(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6585,11 +6882,15 @@ f2(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6605,10 +6906,13 @@ f2(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6620,7 +6924,7 @@ template , stan::is_stan_scalar>*> std::vector> -f3(const int& a1, const std::vector& a2, +f3(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6628,11 +6932,15 @@ f3(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6648,10 +6956,13 @@ f3(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6662,9 +6973,11 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>> -f4(const int& a1, const std::vector& a2, +std::decay_t, + T7__, + std::decay_t, T10__, T11__>>>> +f4(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6672,11 +6985,15 @@ f4(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6692,10 +7009,13 @@ f4(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6707,9 +7027,11 @@ template , stan::is_stan_scalar>*> std::vector< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>> -f5(const int& a1, const std::vector& a2, + std::decay_t, T7__, + std::decay_t, T10__, T11__>>>>> +f5(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6717,11 +7039,15 @@ f5(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6737,10 +7063,13 @@ f5(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6753,9 +7082,11 @@ template >*> std::vector< std::vector< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>>> -f6(const int& a1, const std::vector& a2, + std::decay_t, T7__, + std::decay_t, T10__, T11__>>>>>> +f6(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6763,11 +7094,15 @@ f6(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6783,10 +7118,13 @@ f6(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6797,11 +7135,12 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -Eigen::Matrix, - T7__, - stan::promote_args_t, T10__, - T11__>>,-1,1> -f7(const int& a1, const std::vector& a2, +Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,1> +f7(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6809,11 +7148,15 @@ f7(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6829,10 +7172,13 @@ f7(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6844,11 +7190,12 @@ template , stan::is_stan_scalar>*> std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, T10__, - T11__>>,-1,1>> -f8(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,1>> +f8(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6856,11 +7203,15 @@ f8(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6876,10 +7227,13 @@ f8(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6892,11 +7246,12 @@ template >*> std::vector< std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, - T10__, T11__>>,-1,1>>> -f9(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, + T10__, T11__>>>>,-1,1>>> +f9(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6904,11 +7259,15 @@ f9(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6924,10 +7283,13 @@ f9(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6938,11 +7300,12 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -Eigen::Matrix, - T7__, - stan::promote_args_t, T10__, - T11__>>,-1,-1> -f10(const int& a1, const std::vector& a2, +Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,-1> +f10(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6950,11 +7313,15 @@ f10(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6970,10 +7337,13 @@ f10(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -6985,11 +7355,12 @@ template , stan::is_stan_scalar>*> std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, T10__, - T11__>>,-1,-1>> -f11(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, T10__, + T11__>>>>,-1,-1>> +f11(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -6997,11 +7368,15 @@ f11(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -7017,10 +7392,13 @@ f11(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_col_vector, @@ -7033,11 +7411,12 @@ template >*> std::vector< std::vector< - Eigen::Matrix, T7__, - stan::promote_args_t, - T10__, T11__>>,-1,-1>>> -f12(const int& a1, const std::vector& a2, + Eigen::Matrix, T7__, + std::decay_t, + T10__, T11__>>>>,-1,-1>>> +f12(const T0__& a1, const std::vector& a2, const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, @@ -7045,11 +7424,15 @@ f12(const int& a1, const std::vector& a2, a10_arg__, const std::vector>& a11, const std::vector>>& a12, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + using local_scalar_t__ = std::decay_t, + T7__, + std::decay_t, + T10__, T11__>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -7068,6 +7451,8 @@ f12(const int& a1, const std::vector& a2, void foo_6(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7096,6 +7481,8 @@ void foo_6(std::ostream* pstream__) { Eigen::Matrix matfoo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7120,6 +7507,8 @@ Eigen::Matrix matfoo(std::ostream* pstream__) { Eigen::Matrix vecfoo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7135,10 +7524,12 @@ Eigen::Matrix vecfoo(std::ostream* pstream__) { } } template >*> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7158,10 +7549,12 @@ vecmufoo(const T0__& mu, std::ostream* pstream__) { } } template >*> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7183,20 +7576,23 @@ vecmubar(const T0__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const std::vector& dat, const std::vector& dat_int, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T2__>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; @@ -7229,14 +7625,16 @@ template , stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,1> +Eigen::Matrix, + stan::base_type_t>>,-1,1> binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); const auto& theta = stan::math::to_ref(theta_arg__); static constexpr bool propto__ = true; @@ -7373,6 +7771,8 @@ class mother_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -9490,6 +9890,8 @@ class mother_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10007,6 +10409,8 @@ class mother_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10531,6 +10935,8 @@ class mother_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -11654,6 +12060,8 @@ class mother_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11935,6 +12343,8 @@ class mother_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13773,69 +14183,77 @@ static constexpr std::array locations_array__ = " (in 'motherHOF.stan', line 29, column 4 to column 15)", " (in 'motherHOF.stan', line 25, column 45 to line 30, column 3)"}; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::vector>> sho(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__); template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::decay_t> integrand(const T0__& x, const T1__& xc, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__); -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> map_rectfake(const T0__& x, std::ostream* pstream__); -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const std::vector& dat, const std::vector& dat_int, std::ostream* pstream__); struct goo_functor__ { - template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> operator()(const T0__& shared_params, const T1__& job_params, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) const { @@ -13843,14 +14261,15 @@ struct goo_functor__ { } }; struct foo_functor__ { - template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> operator()(const T0__& shared_params, const T1__& job_params, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) const { @@ -13859,11 +14278,13 @@ struct foo_functor__ { }; struct integrand_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::decay_t> operator()(const T0__& x, const T1__& xc, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { @@ -13871,14 +14292,15 @@ struct integrand_functor__ { } }; struct algebra_system_functor__ { - template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> operator()(const T0__& x, const T1__& y, const std::vector& dat, const std::vector& dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); @@ -13886,11 +14308,13 @@ struct algebra_system_functor__ { }; struct sho_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::vector>> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__) const { @@ -13898,16 +14322,21 @@ struct sho_functor__ { } }; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::vector>> sho(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13934,16 +14363,21 @@ sho(const T0__& t, const std::vector& y, const std::vector& } } template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -stan::promote_args_t + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::decay_t> integrand(const T0__& x, const T1__& xc, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13957,20 +14391,23 @@ integrand(const T0__& x, const T1__& xc, const std::vector& theta, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T2__>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& shared_params = stan::math::to_ref(shared_params_arg__); const auto& job_params = stan::math::to_ref(job_params_arg__); static constexpr bool propto__ = true; @@ -13987,20 +14424,23 @@ foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T2__>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& shared_params = stan::math::to_ref(shared_params_arg__); const auto& job_params = stan::math::to_ref(job_params_arg__); static constexpr bool propto__ = true; @@ -14018,10 +14458,12 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, } } template >*> -stan::promote_args_t +std::decay_t> map_rectfake(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -14035,20 +14477,23 @@ map_rectfake(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> -Eigen::Matrix, - stan::base_type_t, T2__>,-1,1> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +Eigen::Matrix, + stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const std::vector& dat, const std::vector& dat_int, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T2__>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; @@ -14098,6 +14543,8 @@ class motherHOF_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -14285,6 +14732,8 @@ class motherHOF_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14603,6 +15052,8 @@ class motherHOF_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14925,6 +15376,8 @@ class motherHOF_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -15340,6 +15793,8 @@ class motherHOF_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15405,6 +15860,8 @@ class motherHOF_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16656,8 +17113,9 @@ template , stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, T2__, - stan::base_type_t>,-1,1> +Eigen::Matrix, T2__, + stan::base_type_t>>,-1,1> f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, std::ostream* pstream__); struct f_variadic2_functor__ { @@ -16668,8 +17126,9 @@ struct f_variadic2_functor__ { stan::is_stan_scalar, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, T2__, - stan::base_type_t>,-1,1> + Eigen::Matrix, T2__, + stan::base_type_t>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, const T2__& a, const T3__& b) const { return f(t, z, a, b, pstream__); @@ -16682,14 +17141,17 @@ template , stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix, T2__, - stan::base_type_t>,-1,1> +Eigen::Matrix, T2__, + stan::base_type_t>>,-1,1> f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T2__, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, T2__, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; @@ -16720,6 +17182,8 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18511,6 +18977,8 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20155,6 +20623,8 @@ class new_integrate_interface_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -21810,6 +22280,8 @@ class new_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21842,6 +22314,8 @@ class new_integrate_interface_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22128,21 +22602,25 @@ static constexpr std::array locations_array__ = " (in 'old_integrate_interface.stan', line 18, column 4 to column 26)", " (in 'old_integrate_interface.stan', line 7, column 38 to line 19, column 3)"}; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::vector>> dz_dt(const T0__& t, const std::vector& z, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); struct dz_dt_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::vector>> operator()(const T0__& t, const std::vector& z, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { @@ -22150,16 +22628,21 @@ struct dz_dt_functor__ { } }; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::vector>> dz_dt(const T0__& t, const std::vector& z, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -22209,6 +22692,8 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22399,6 +22886,8 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22507,6 +22996,8 @@ class old_integrate_interface_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22590,6 +23081,8 @@ class old_integrate_interface_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22634,6 +23127,8 @@ class old_integrate_interface_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23133,6 +23628,8 @@ class optimize_glm_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -23370,6 +23867,8 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23935,6 +24434,8 @@ class optimize_glm_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24507,6 +25008,8 @@ class optimize_glm_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24591,6 +25094,8 @@ class optimize_glm_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24660,6 +25165,8 @@ class optimize_glm_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25053,49 +25560,58 @@ static constexpr std::array locations_array__ = " (in 'overloading_templating.stan', line 36, column 29 to line 38, column 4)", " (in 'overloading_templating.stan', line 40, column 4 to column 23)", " (in 'overloading_templating.stan', line 39, column 25 to line 41, column 3)"}; -double foo(const int& p, std::ostream* pstream__); +template >>* = nullptr> +double foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t foo(const T0__& p, std::ostream* pstream__); +std::decay_t> +foo(const T0__& p, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& p_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& p_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& p_arg__, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo(const std::vector& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__); +template >* = nullptr> double foo(const std::vector& p, std::ostream* pstream__); -double foo(const int& p, std::ostream* pstream__) { +template >>*> +double foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25110,9 +25626,12 @@ double foo(const int& p, std::ostream* pstream__) { } } template >*> -stan::promote_args_t foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25129,10 +25648,12 @@ stan::promote_args_t foo(const T0__& p, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& p_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -25150,10 +25671,12 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& p_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -25171,10 +25694,12 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& p_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -25190,10 +25715,12 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo(const std::vector& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25208,10 +25735,12 @@ foo(const std::vector& p, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25228,10 +25757,12 @@ foo(const std::vector>& p, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25248,10 +25779,12 @@ foo(const std::vector>& p, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25268,10 +25801,12 @@ foo(const std::vector>& p, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25287,9 +25822,12 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> double foo(const std::vector& p, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25315,6 +25853,8 @@ class overloading_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25456,6 +25998,8 @@ class overloading_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25544,6 +26088,8 @@ class overloading_templating_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -25586,6 +26132,8 @@ class overloading_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25609,6 +26157,8 @@ class overloading_templating_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25793,6 +26343,8 @@ class param_constraint_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25892,6 +26446,8 @@ class param_constraint_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25943,6 +26499,8 @@ class param_constraint_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26007,6 +26565,8 @@ class param_constraint_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26047,6 +26607,8 @@ class param_constraint_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26283,6 +26845,8 @@ class print_unicode_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -26333,6 +26897,8 @@ class print_unicode_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26357,6 +26923,8 @@ class print_unicode_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26388,6 +26956,8 @@ class print_unicode_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26422,6 +26992,8 @@ class print_unicode_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26433,6 +27005,8 @@ class print_unicode_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26588,17 +27162,19 @@ static constexpr std::array locations_array__ = " (in 'promotion.stan', line 6, column 28 to line 8, column 4)"}; template >* = nullptr> -std::complex> +std::complex>> ident(const std::complex& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo(const std::vector& zs, std::ostream* pstream__); template >*> -std::complex> +std::complex>> ident(const std::complex& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26613,10 +27189,12 @@ ident(const std::complex& x, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> foo(const std::vector& zs, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26639,6 +27217,8 @@ class promotion_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -26674,6 +27254,8 @@ class promotion_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26698,6 +27280,8 @@ class promotion_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26729,6 +27313,8 @@ class promotion_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26783,6 +27369,8 @@ class promotion_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26794,6 +27382,8 @@ class promotion_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27016,30 +27606,32 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__); -template , - stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> -matrix_pow(const T0__& a_arg__, const int& n, std::ostream* pstream__); + stan::is_vt_not_complex, + std::is_integral>>* = nullptr> +Eigen::Matrix>>,-1,-1> +matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& a_arg__, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t foo(const T0__& b, std::ostream* pstream__); +std::decay_t> +foo(const T0__& b, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test4(const T0__& gamma_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test3(const T0__& gamma_arg__, std::ostream* pstream__); template , @@ -27048,7 +27640,7 @@ void test6(const T0__& alpha_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__); template , @@ -27056,8 +27648,9 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,1> +Eigen::Matrix, + stan::base_type_t>>,-1,1> foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* pstream__); struct foo_variadic2_functor__ { @@ -27067,8 +27660,9 @@ struct foo_variadic2_functor__ { stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>,-1,1> + Eigen::Matrix, + stan::base_type_t>>,-1,1> operator()(const T0__& x, const T1__& s, std::ostream* pstream__, const T2__& y) const { return foo(x, s, y, pstream__); @@ -27077,10 +27671,12 @@ struct foo_variadic2_functor__ { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27108,13 +27704,16 @@ test2(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> -matrix_pow(const T0__& a_arg__, const int& n, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + stan::is_vt_not_complex, + std::is_integral>>*> +Eigen::Matrix>>,-1,-1> +matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27146,10 +27745,12 @@ matrix_pow(const T0__& a_arg__, const int& n, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27165,9 +27766,12 @@ foo(const T0__& a_arg__, std::ostream* pstream__) { } } template >*> -stan::promote_args_t foo(const T0__& b, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +foo(const T0__& b, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -27191,10 +27795,12 @@ stan::promote_args_t foo(const T0__& b, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test4(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27224,10 +27830,12 @@ test4(const T0__& gamma_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test3(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27246,8 +27854,10 @@ template , stan::is_vt_not_complex>*> void test6(const T0__& alpha_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& alpha = stan::math::to_ref(alpha_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27281,10 +27891,12 @@ void test6(const T0__& alpha_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27316,14 +27928,17 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,1> +Eigen::Matrix, + stan::base_type_t>>,-1,1> foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& s = stan::math::to_ref(s_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; @@ -27356,6 +27971,8 @@ class recursive_slicing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27454,6 +28073,8 @@ class recursive_slicing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27504,6 +28125,8 @@ class recursive_slicing_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -27561,6 +28184,8 @@ class recursive_slicing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27583,6 +28208,8 @@ class recursive_slicing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27814,57 +28441,74 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m1.stan', line 9, column 67 to line 15, column 3)", " (in 'reduce_sum_m1.stan', line 17, column 4 to column 39)", " (in 'reduce_sum_m1.stan', line 16, column 58 to line 18, column 3)"}; -template >* = nullptr> -stan::promote_args_t -g(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +g(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +h(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector& a, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -foo_lpdf(const std::vector& y_slice, const int& start, const int& end, - std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +foo_lpdf(const std::vector& y_slice, const T1__& start, const T2__& + end, std::ostream* pstream__); struct h_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector& a) const { return h(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g(y_slice, (start + 1), (end + 1), pstream__); } }; template struct foo_lpdf_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return foo_lpdf(y_slice, (start + 1), (end + 1), pstream__); } }; -template >*> -stan::promote_args_t -g(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +g(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -27884,14 +28528,18 @@ g(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +h(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -27913,13 +28561,17 @@ h(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo_lpdf(const std::vector& y_slice, const int& start, const int& end, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +foo_lpdf(const std::vector& y_slice, const T1__& start, const T2__& + end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27939,6 +28591,8 @@ class reduce_sum_m1_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -27988,6 +28642,8 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28041,6 +28697,8 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28101,6 +28759,8 @@ class reduce_sum_m1_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -28150,6 +28810,8 @@ class reduce_sum_m1_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28183,6 +28845,8 @@ class reduce_sum_m1_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28562,264 +29226,333 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m2.stan', line 115, column 4 to line 119, column 5)", " (in 'reduce_sum_m2.stan', line 120, column 4 to column 20)", " (in 'reduce_sum_m2.stan', line 113, column 65 to line 121, column 3)"}; -template >* = nullptr> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +g1(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -g2(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -g3(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -g4(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -g5(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +g2(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +g3(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +g4(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +g5(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> g6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t + const T1__& start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> g7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t + const T1__& start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> g8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h1(const std::vector& y, const int& start, const int& end, +std::decay_t> +h1(const std::vector& y, const T1__& start, const T2__& end, const std::vector& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h2(const std::vector& y, const int& start, const int& end, +std::decay_t> +h2(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h3(const std::vector& y, const int& start, const int& end, +std::decay_t> +h3(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h4(const std::vector& y, const int& start, const int& end, +std::decay_t> +h4(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h5(const std::vector& y, const int& start, const int& end, +std::decay_t> +h5(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h6(const std::vector& y, const int& start, const int& end, +std::decay_t> +h6(const std::vector& y, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h7(const std::vector& y, const int& start, const int& end, +std::decay_t> +h7(const std::vector& y, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h8(const std::vector& y, const int& start, const int& end, +std::decay_t> +h8(const std::vector& y, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__); struct h5_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return h5(y, (start + 1), (end + 1), a, pstream__); } }; struct h1_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector& a) const { return h1(y, (start + 1), (end + 1), a, pstream__); } }; struct g3_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, const int& - start, const int& end, std::ostream* pstream__) const { + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector>& y_slice, + const T1__& start, const T2__& end, std::ostream* pstream__) const { return g3(y_slice, (start + 1), (end + 1), pstream__); } }; struct h7_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>>& a) const { return h7(y, (start + 1), (end + 1), a, pstream__); } }; struct h3_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return h3(y, (start + 1), (end + 1), a, pstream__); } }; struct g2_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, const int& - start, const int& end, std::ostream* pstream__) const { + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector>& y_slice, + const T1__& start, const T2__& end, std::ostream* pstream__) const { return g2(y_slice, (start + 1), (end + 1), pstream__); } }; struct g8_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* + y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g8(y_slice, (start + 1), (end + 1), pstream__); } }; struct h2_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return h2(y, (start + 1), (end + 1), a, pstream__); } }; struct h8_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>>& a) const { return h8(y, (start + 1), (end + 1), a, pstream__); } }; struct g7_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* + y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g7(y_slice, (start + 1), (end + 1), pstream__); } }; struct g4_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + const T1__& start, const T2__& end, std::ostream* pstream__) const { return g4(y_slice, (start + 1), (end + 1), pstream__); } }; struct h4_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return h4(y, (start + 1), (end + 1), a, pstream__); } }; struct g6_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* + y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g6(y_slice, (start + 1), (end + 1), pstream__); } }; struct g5_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) const { + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__) const { return g5(y_slice, (start + 1), (end + 1), pstream__); } }; struct h6_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, + std::decay_t> + operator()(const std::vector& y, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>>& a) const { return h6(y, (start + 1), (end + 1), a, pstream__); } }; struct g1_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g1(y_slice, (start + 1), (end + 1), pstream__); } }; -template >*> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +g1(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -28833,12 +29566,17 @@ g1(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g2(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +g2(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -28863,12 +29601,17 @@ g2(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g3(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +g3(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -28893,12 +29636,17 @@ g3(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g4(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +g4(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -28924,12 +29672,17 @@ g4(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g5(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +g5(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -28960,12 +29713,17 @@ g5(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> g6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + const T1__& start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -28997,12 +29755,17 @@ g6(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> g7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + const T1__& start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29034,12 +29797,17 @@ g7(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> g8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + const T1__& start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29071,14 +29839,18 @@ g8(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h1(const std::vector& y, const int& start, const int& end, +std::decay_t> +h1(const std::vector& y, const T1__& start, const T2__& end, const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29094,14 +29866,18 @@ h1(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h2(const std::vector& y, const int& start, const int& end, +std::decay_t> +h2(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29125,14 +29901,18 @@ h2(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h3(const std::vector& y, const int& start, const int& end, +std::decay_t> +h3(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29156,14 +29936,18 @@ h3(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h4(const std::vector& y, const int& start, const int& end, +std::decay_t> +h4(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29188,14 +29972,18 @@ h4(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h5(const std::vector& y, const int& start, const int& end, +std::decay_t> +h5(const std::vector& y, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29225,15 +30013,19 @@ h5(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h6(const std::vector& y, const int& start, const int& end, +std::decay_t> +h6(const std::vector& y, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29264,15 +30056,19 @@ h6(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h7(const std::vector& y, const int& start, const int& end, +std::decay_t> +h7(const std::vector& y, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29303,15 +30099,19 @@ h7(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -h8(const std::vector& y, const int& start, const int& end, +std::decay_t> +h8(const std::vector& y, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -29352,6 +30152,8 @@ class reduce_sum_m2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -29482,6 +30284,8 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29666,6 +30470,8 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29857,6 +30663,8 @@ class reduce_sum_m2_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -30127,6 +30935,8 @@ class reduce_sum_m2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30364,6 +31174,8 @@ class reduce_sum_m2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -31492,148 +32304,208 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m3.stan', line 145, column 4 to line 146, column 66)", " (in 'reduce_sum_m3.stan', line 148, column 4 to column 15)", " (in 'reduce_sum_m3.stan', line 86, column 11 to line 149, column 3)"}; -template >* = nullptr> -stan::promote_args_t -f1(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f1(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f1a(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f1a(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f2(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f3(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f4(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f5(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f2(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f3(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f4(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f5(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> f6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t + const T1__& start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> f7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t + const T1__& start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> f8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); + const T1__& start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> double -f9(const std::vector& y_slice, const int& start, const int& end, +f9(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> double -f10(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__); +f10(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> double -f11(const std::vector>>& y_slice, const int& - start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f12(const std::vector>>& y_slice, const int& - start, const int& end, std::ostream* pstream__); -template >>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>>* = nullptr> +std::decay_t> +f12(const std::vector>>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__); +template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g1(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> -g2(const std::vector& y_slice, const int& start, const int& end, +std::decay_t>> +g2(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> -g3(const std::vector& y_slice, const int& start, const int& end, +std::decay_t>> +g3(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> -g4(const std::vector& y_slice, const int& start, const int& end, +std::decay_t>> +g4(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g5(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g5(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g6(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g6(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g7(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g7(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g8(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g8(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g9(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g9(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g10(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g10(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g11(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g11(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g12(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g12(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__); -template , + std::is_integral>, + std::is_integral>, + std::is_integral>, stan::is_stan_scalar, stan::is_col_vector, stan::is_vt_not_complex, @@ -31641,21 +32513,26 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -stan::promote_args_t, - stan::base_type_t, stan::base_type_t, - stan::promote_args_t>> -s(const std::vector& y_slice, const int& start, const int& end, - const int& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, +std::decay_t, + stan::base_type_t, stan::base_type_t, + std::decay_t>>>>> +s(const std::vector& y_slice, const T1__& start, const T2__& end, + const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, const T7__& e_arg__, const std::vector& f, const std::vector& g, const std::vector>& h, const std::vector>& i, @@ -31670,236 +32547,292 @@ s(const std::vector& y_slice, const int& start, const int& end, pstream__); double r(std::ostream* pstream__); struct f11_rsfunctor__ { + template , + std::is_integral>, + std::is_integral>>* = nullptr> double operator()(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + const T1__& start, const T2__& end, std::ostream* pstream__) const { return f11(y_slice, (start + 1), (end + 1), pstream__); } }; struct f10_rsfunctor__ { + template , + std::is_integral>, + std::is_integral>>* = nullptr> double - operator()(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) const { + operator()(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) const { return f10(y_slice, (start + 1), (end + 1), pstream__); } }; struct g8_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return g8(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g7_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return g7(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g4_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> - stan::promote_args_t> - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t>> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g4(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g6_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return g6(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g11_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>>& a) const { return g11(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f5_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) const { + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__) const { return f5(y_slice, (start + 1), (end + 1), pstream__); } }; struct f1_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f1(y_slice, (start + 1), (end + 1), pstream__); } }; struct g5_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector& a) const { return g5(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g9_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>& a) const { return g9(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g1_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g1(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f12_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + const T1__& start, const T2__& end, std::ostream* pstream__) const { return f12(y_slice, (start + 1), (end + 1), pstream__); } }; struct g3_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> - stan::promote_args_t> - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t>> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g3(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f3_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, const int& - start, const int& end, std::ostream* pstream__) const { + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector>& y_slice, + const T1__& start, const T2__& end, std::ostream* pstream__) const { return f3(y_slice, (start + 1), (end + 1), pstream__); } }; struct f2_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, const int& - start, const int& end, std::ostream* pstream__) const { + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector>& y_slice, + const T1__& start, const T2__& end, std::ostream* pstream__) const { return f2(y_slice, (start + 1), (end + 1), pstream__); } }; struct f6_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* + y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f6(y_slice, (start + 1), (end + 1), pstream__); } }; struct g2_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - stan::promote_args_t> - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t>> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g2(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g10_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>>& a) const { return g10(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f8_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* + y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f8(y_slice, (start + 1), (end + 1), pstream__); } }; struct g12_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::vector>>& a) const { return g12(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f9_rsfunctor__ { + template , + std::is_integral>, + std::is_integral>>* = nullptr> double - operator()(const std::vector& y_slice, const int& start, const int& + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f9(y_slice, (start + 1), (end + 1), pstream__); } }; struct f4_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + const T1__& start, const T2__& end, std::ostream* pstream__) const { return f4(y_slice, (start + 1), (end + 1), pstream__); } }; struct s_rsfunctor__ { - template , + std::is_integral>, + std::is_integral>, + std::is_integral>, stan::is_stan_scalar, stan::is_col_vector, stan::is_vt_not_complex, @@ -31907,21 +32840,26 @@ struct s_rsfunctor__ { stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> - stan::promote_args_t, - stan::base_type_t, stan::base_type_t, - stan::promote_args_t>> - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__, const int& a, const T4__& b, + std::decay_t, + stan::base_type_t, stan::base_type_t, + std::decay_t>>>>> + operator()(const std::vector& y_slice, const T1__& start, const T2__& + end, std::ostream* pstream__, const T3__& a, const T4__& b, const T5__& c, const T6__& d, const T7__& e, const std::vector& f, const std::vector& g, const std::vector>& h, @@ -31939,30 +32877,39 @@ struct s_rsfunctor__ { } }; struct f7_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* + y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f7(y_slice, (start + 1), (end + 1), pstream__); } }; struct f1a_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& + template , + std::is_integral>, + std::is_integral>>* = nullptr> + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f1a(y_slice, (start + 1), (end + 1), pstream__); } }; -template >*> -stan::promote_args_t -f1(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f1(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -31976,12 +32923,17 @@ f1(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f1a(const std::vector& y_slice, const int& start, const int& end, +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f1a(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -31995,12 +32947,17 @@ f1a(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f2(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f2(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32014,12 +32971,17 @@ f2(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f3(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f3(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32033,12 +32995,17 @@ f3(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f4(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f4(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32052,12 +33019,17 @@ f4(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f5(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f5(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32071,12 +33043,17 @@ f5(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> f6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + const T1__& start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32090,12 +33067,17 @@ f6(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> f7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + const T1__& start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32109,12 +33091,17 @@ f7(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> f8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + const T1__& start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32128,11 +33115,17 @@ f8(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template , + std::is_integral>, + std::is_integral>>*> double -f9(const std::vector& y_slice, const int& start, const int& end, +f9(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32146,11 +33139,17 @@ f9(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template , + std::is_integral>, + std::is_integral>>*> double -f10(const std::vector>& y_slice, const int& start, - const int& end, std::ostream* pstream__) { +f10(const std::vector>& y_slice, const T1__& start, + const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32164,11 +33163,17 @@ f10(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template , + std::is_integral>, + std::is_integral>>*> double -f11(const std::vector>>& y_slice, const int& - start, const int& end, std::ostream* pstream__) { +f11(const std::vector>>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32182,12 +33187,17 @@ f11(const std::vector>>& y_slice, const int& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f12(const std::vector>>& y_slice, const int& - start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template , + std::is_integral>, + std::is_integral>>*> +std::decay_t> +f12(const std::vector>>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32201,14 +33211,18 @@ f12(const std::vector>>& y_slice, const int& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g1(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32222,16 +33236,20 @@ g1(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_col_vector, stan::is_vt_not_complex>*> -stan::promote_args_t> -g2(const std::vector& y_slice, const int& start, const int& end, +std::decay_t>> +g2(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -32246,16 +33264,20 @@ g2(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_row_vector, stan::is_vt_not_complex>*> -stan::promote_args_t> -g3(const std::vector& y_slice, const int& start, const int& end, +std::decay_t>> +g3(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -32270,16 +33292,20 @@ g3(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -stan::promote_args_t> -g4(const std::vector& y_slice, const int& start, const int& end, +std::decay_t>> +g4(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -32294,14 +33320,18 @@ g4(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g5(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g5(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32315,14 +33345,18 @@ g5(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g6(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g6(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32336,14 +33370,18 @@ g6(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g7(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g7(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32357,14 +33395,18 @@ g7(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g8(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g8(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32378,14 +33420,18 @@ g8(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g9(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g9(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32399,15 +33445,19 @@ g9(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g10(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g10(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32421,15 +33471,19 @@ g10(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g11(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g11(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32443,15 +33497,19 @@ g11(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, stan::is_stan_scalar>*> -stan::promote_args_t -g12(const std::vector& y_slice, const int& start, const int& end, +std::decay_t> +g12(const std::vector& y_slice, const T1__& start, const T2__& end, const std::vector>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32465,11 +33523,15 @@ g12(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , + std::is_integral>, + std::is_integral>, + std::is_integral>, stan::is_stan_scalar, stan::is_col_vector, stan::is_vt_not_complex, @@ -32477,21 +33539,26 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, + stan::is_stan_scalar, stan::is_stan_scalar>*> -stan::promote_args_t, - stan::base_type_t, stan::base_type_t, - stan::promote_args_t>> -s(const std::vector& y_slice, const int& start, const int& end, - const int& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, +std::decay_t, + stan::base_type_t, stan::base_type_t, + std::decay_t>>>>> +s(const std::vector& y_slice, const T1__& start, const T2__& end, + const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, const T7__& e_arg__, const std::vector& f, const std::vector& g, const std::vector>& h, const std::vector>& i, @@ -32504,15 +33571,20 @@ s(const std::vector& y_slice, const int& start, const int& end, const std::vector>>& p, const std::vector>>& q, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, - stan::base_type_t, - stan::promote_args_t>>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t>>>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& c = stan::math::to_ref(c_arg__); const auto& d = stan::math::to_ref(d_arg__); const auto& e = stan::math::to_ref(e_arg__); @@ -32534,6 +33606,8 @@ s(const std::vector& y_slice, const int& start, const int& end, double r(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32888,6 +33962,8 @@ class reduce_sum_m3_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -33475,6 +34551,8 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33665,6 +34743,8 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33862,6 +34942,8 @@ class reduce_sum_m3_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -34159,6 +35241,8 @@ class reduce_sum_m3_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -34325,6 +35409,8 @@ class reduce_sum_m3_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35032,22 +36118,24 @@ static constexpr std::array locations_array__ = " (in 'return-position-types.stan', line 10, column 30 to line 12, column 3)"}; template >* = nullptr> -std::vector> +std::vector>> foo(const T0__& a, std::ostream* pstream__); template >* = nullptr> -std::tuple>, - stan::promote_args_t> +std::tuple>>, + std::decay_t>> baz(const T0__& a, std::ostream* pstream__); template >* = nullptr> -std::vector>> +std::vector>>> bar(const T0__& a, std::ostream* pstream__); template >*> -std::vector> +std::vector>> foo(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35062,11 +36150,13 @@ foo(const T0__& a, std::ostream* pstream__) { } } template >*> -std::tuple>, - stan::promote_args_t> +std::tuple>>, + std::decay_t>> baz(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35082,10 +36172,12 @@ baz(const T0__& a, std::ostream* pstream__) { } } template >*> -std::vector>> +std::vector>>> bar(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35112,6 +36204,8 @@ class return_position_types_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35194,6 +36290,8 @@ class return_position_types_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35248,6 +36346,8 @@ class return_position_types_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -35286,6 +36386,8 @@ class return_position_types_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35305,6 +36407,8 @@ class return_position_types_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35520,7 +36624,8 @@ template , stan::is_vt_not_complex, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T2__>,-1,1> +Eigen::Matrix, T2__>>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* pstream__); struct rhs_variadic2_functor__ { @@ -35529,7 +36634,8 @@ struct rhs_variadic2_functor__ { stan::is_col_vector, stan::is_vt_not_complex, stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, T2__>,-1,1> + Eigen::Matrix, T2__>>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, const T2__& alpha) const { return rhs(t, y, alpha, pstream__); @@ -35540,12 +36646,15 @@ template , stan::is_vt_not_complex, stan::is_stan_scalar>*> -Eigen::Matrix, T2__>,-1,1> +Eigen::Matrix, T2__>>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T2__>; + using local_scalar_t__ = std::decay_t, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -35576,6 +36685,8 @@ class shadowing_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -35645,6 +36756,8 @@ class shadowing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35826,6 +36939,8 @@ class shadowing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -36014,6 +37129,8 @@ class shadowing_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -36244,6 +37361,8 @@ class shadowing_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -36401,6 +37520,8 @@ class shadowing_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -36979,29 +38100,39 @@ static constexpr std::array locations_array__ = " (in 'single-argument-lpmf.stan', line 14, column 25 to line 16, column 3)", " (in 'single-argument-lpmf.stan', line 18, column 4 to column 14)", " (in 'single-argument-lpmf.stan', line 17, column 23 to line 19, column 3)"}; -template double -foo0_lpmf(const int& y, std::ostream* pstream__); -template double -foo1_lpmf(const int& y, std::ostream* pstream__); -template double -foo4_lp(const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* +template >>* = nullptr> +double foo0_lpmf(const T0__& y, std::ostream* pstream__); +template >>* = nullptr> +double foo1_lpmf(const T0__& y, std::ostream* pstream__); +template >>* = nullptr> +double +foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__); +std::decay_t> +foo2_lpdf(const T0__& y, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__); +std::decay_t> +foo3_lpdf(const T0__& y, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); -template double -foo0_lpmf(const int& y, std::ostream* pstream__) { +template >>*> +double foo0_lpmf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37012,10 +38143,13 @@ foo0_lpmf(const int& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template double -foo1_lpmf(const int& y, std::ostream* pstream__) { +template >>*> +double foo1_lpmf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37026,11 +38160,16 @@ foo1_lpmf(const int& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template double -foo4_lp(const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* +template >>*> +double +foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37043,9 +38182,12 @@ foo4_lp(const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } template >*> -stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +foo2_lpdf(const T0__& y, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37058,9 +38200,12 @@ stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__) { } template >*> -stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +foo3_lpdf(const T0__& y, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37074,11 +38219,13 @@ stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__) { template >*> -stan::promote_args_t +std::decay_t> foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37098,6 +38245,8 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37157,6 +38308,8 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37188,6 +38341,8 @@ class single_argument_lpmf_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -37222,6 +38377,8 @@ class single_argument_lpmf_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37233,6 +38390,8 @@ class single_argument_lpmf_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37394,6 +38553,8 @@ class tilde_block_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -37439,6 +38600,8 @@ class tilde_block_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37497,6 +38660,8 @@ class tilde_block_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37562,6 +38727,8 @@ class tilde_block_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -37601,6 +38768,8 @@ class tilde_block_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37620,6 +38789,8 @@ class tilde_block_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37908,6 +39079,8 @@ class transform_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -38218,6 +39391,8 @@ class transform_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38698,6 +39873,8 @@ class transform_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -39185,6 +40362,8 @@ class transform_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -39817,6 +40996,8 @@ class transform_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -40033,6 +41214,8 @@ class transform_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41008,6 +42191,8 @@ class truncate_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -41059,6 +42244,8 @@ class truncate_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41176,6 +42363,8 @@ class truncate_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41300,6 +42489,8 @@ class truncate_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -41343,6 +42534,8 @@ class truncate_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41366,6 +42559,8 @@ class truncate_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41540,11 +42735,15 @@ static constexpr std::array locations_array__ = " (in 'udf_tilde_stmt_conflict.stan', line 2, column 22 to line 4, column 3)"}; template >* = nullptr> -stan::promote_args_t normal(const T0__& a, std::ostream* pstream__); +std::decay_t> +normal(const T0__& a, std::ostream* pstream__); template >*> -stan::promote_args_t normal(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +normal(const T0__& a, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -41567,6 +42766,8 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41637,6 +42840,8 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41679,6 +42884,8 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -41717,6 +42924,8 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41736,6 +42945,8 @@ class udf_tilde_stmt_conflict_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -41901,15 +43112,17 @@ static constexpr std::array locations_array__ = template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__); template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -41932,6 +43145,8 @@ class user_constrain_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -41967,6 +43182,8 @@ class user_constrain_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42003,6 +43220,8 @@ class user_constrain_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42046,6 +43265,8 @@ class user_constrain_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -42085,6 +43306,8 @@ class user_constrain_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42104,6 +43327,8 @@ class user_constrain_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42279,6 +43504,8 @@ class variable_named_context_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42387,6 +43616,8 @@ class variable_named_context_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42433,6 +43664,8 @@ class variable_named_context_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -42476,6 +43709,8 @@ class variable_named_context_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42499,6 +43734,8 @@ class variable_named_context_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42772,6 +44009,8 @@ class vector_truncate_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43370,6 +44611,8 @@ class vector_truncate_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43898,6 +45141,8 @@ class vector_truncate_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -43954,6 +45199,8 @@ class vector_truncate_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43991,6 +45238,8 @@ class vector_truncate_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 6ed00e009..cad567e0c 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -36,6 +36,8 @@ class operators_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -99,6 +101,8 @@ class operators_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -139,6 +143,8 @@ class operators_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -186,6 +192,8 @@ class operators_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -269,6 +277,8 @@ class operators_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -305,6 +315,8 @@ class operators_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -596,9 +608,10 @@ static constexpr std::array locations_array__ = " (in 'simple_function.stan', line 8, column 34 to line 10, column 3)", " (in 'simple_function.stan', line 12, column 4 to column 21)", " (in 'simple_function.stan', line 11, column 37 to line 13, column 3)"}; -template , + std::is_integral>, stan::is_stan_scalar, stan::is_col_vector, stan::is_vt_not_complex, @@ -606,9 +619,9 @@ template , stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t, - stan::base_type_t, stan::base_type_t> -foo1(const T0__& a, const int& b, const std::vector& c, const T3__& +std::decay_t, + stan::base_type_t, stan::base_type_t>> +foo1(const T0__& a, const T1__& b, const std::vector& c, const T3__& d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* pstream__); template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T1__, T2__>,-1,1> +Eigen::Matrix, + T1__, T2__>>,-1,1> foo2(const T0__& a_arg__, const std::vector>& b, const std::vector>& c, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> foo3(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); -template , + std::is_integral>, stan::is_stan_scalar, stan::is_col_vector, stan::is_vt_not_complex, @@ -645,16 +660,18 @@ template , stan::is_row_vector, stan::is_vt_not_complex>*> -stan::promote_args_t, - stan::base_type_t, stan::base_type_t> -foo1(const T0__& a, const int& b, const std::vector& c, const T3__& +std::decay_t, + stan::base_type_t, stan::base_type_t>> +foo1(const T0__& a, const T1__& b, const std::vector& c, const T3__& d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& d = stan::math::to_ref(d_arg__); const auto& e = stan::math::to_ref(e_arg__); const auto& f = stan::math::to_ref(f_arg__); @@ -676,12 +693,15 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -Eigen::Matrix, T1__, T2__>,-1,1> +Eigen::Matrix, + T1__, T2__>>,-1,1> foo2(const T0__& a_arg__, const std::vector>& b, const std::vector>& c, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - T1__, T2__>; + using local_scalar_t__ = std::decay_t, + T1__, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -701,12 +721,14 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> foo3(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; @@ -727,12 +749,14 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; @@ -759,6 +783,8 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -854,6 +882,8 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -885,6 +915,8 @@ class simple_function_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -919,6 +951,8 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -930,6 +964,8 @@ class simple_function_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1094,6 +1130,8 @@ class ternary_if_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -1139,6 +1177,8 @@ class ternary_if_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1215,6 +1255,8 @@ class ternary_if_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1298,6 +1340,8 @@ class ternary_if_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1385,6 +1429,8 @@ class ternary_if_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1423,6 +1469,8 @@ class ternary_if_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 061a723b0..81f74b40c 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -801,20 +801,28 @@ (Literal "\" (in 'mother.stan', line 344, column 4 to column 16)\"") (Literal "\" (in 'mother.stan', line 341, column 41 to line 345, column 3)\""))))))) (FunDef - ((templates_init ((()) true)) (inline false) (return_type Int) (name foo) - (args (((Const (Ref Int)) n) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((templates_init + ((((Typename T0__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) + true)) + (inline false) (return_type Int) (name foo) + (args + (((Const (Ref (TemplateType T0__))) n) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__) - (RequireIs stan::is_stan_scalar T2__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)))) true)) (inline false) (return_type (StdVector - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))))) (name sho) (args (((Const (Ref (TemplateType T0__))) t) @@ -828,8 +836,11 @@ (name foo_bar0) (args (((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) (name foo_bar1) (args (((Const (Ref (TemplateType T0__))) x) @@ -837,12 +848,14 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) true)) (inline false) (return_type - (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) (name foo_bar2) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -850,37 +863,56 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Bool propto__) (Typename T1__) (RequireIs stan::is_stan_scalar T1__))) true)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) + ((((Bool propto__) (Typename T0__) (Typename T1__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + true)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) (name foo_lpmf) (args - (((Const (Ref Int)) y) ((Const (Ref (TemplateType T1__))) lambda) + (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T1__) (RequireIs stan::is_stan_scalar T1__))) true)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + true)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) (name foo_lcdf) (args - (((Const (Ref Int)) y) ((Const (Ref (TemplateType T1__))) lambda) + (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T1__) (RequireIs stan::is_stan_scalar T1__))) true)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + true)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) (name foo_lccdf) (args - (((Const (Ref Int)) y) ((Const (Ref (TemplateType T1__))) lambda) + (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) true)) (inline false) (return_type - (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) (name foo_rng) (args (((Const (Ref (TemplateType T0__))) mu) ((Const (Ref (TemplateType T1__))) sigma) @@ -890,7 +922,7 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -899,28 +931,48 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((()) true)) (inline false) (return_type Int) (name foo_1) - (args (((Const (Ref Int)) a) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((templates_init + ((((Typename T0__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) + true)) + (inline false) (return_type Int) (name foo_1) + (args + (((Const (Ref (TemplateType T0__))) a) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((()) true)) (inline false) (return_type Int) (name foo_2) - (args (((Const (Ref Int)) a) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((templates_init + ((((Typename T0__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) + true)) + (inline false) (return_type Int) (name foo_2) + (args + (((Const (Ref (TemplateType T0__))) a) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) + true)) (inline false) - (return_type (StdVector (TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (return_type + (StdVector + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (name foo_3) (args - (((Const (Ref (TemplateType T0__))) t) ((Const (Ref Int)) n) + (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) n) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) (name foo_lp) (args (((Const (Ref (TemplateType T0__))) x) ((Ref (TemplateType T_lp__)) lp__) @@ -928,7 +980,8 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) (inline false) (return_type Void) (name foo_4) (args (((Const (Ref (StdVector (TemplateType T0__)))) x) @@ -937,13 +990,17 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__) - (RequireIs stan::is_stan_scalar T2__) (RequireIs stan::is_stan_scalar T3__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)))) true)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__)))))) (name relative_diff) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -952,15 +1009,18 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_col_vector T0__) - (RequireIs stan::is_vt_not_complex T0__) (RequireIs stan::is_col_vector T1__) - (RequireIs stan::is_vt_not_complex T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) -1 1 AoS)) (name foo_5) (args @@ -972,15 +1032,18 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (Typename T4__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__) (RequireIs stan::is_stan_scalar T2__) - (RequireIs stan::is_stan_scalar T3__) (RequireIs stan::is_stan_scalar T4__))) + (Typename T4__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)))) true)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) - (TemplateType T4__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__)))))) (name foo_five_args) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -992,16 +1055,21 @@ ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T_lp__) - (Typename T_lp_accum__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__) (RequireIs stan::is_stan_scalar T2__) - (RequireIs stan::is_stan_scalar T3__) (RequireIs stan::is_stan_scalar T4__) - (RequireIs stan::is_stan_scalar T5__))) + (Typename T_lp_accum__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)))) true)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) - (TemplateType T4__) (TypeTrait stan::promote_args_t ((TemplateType T5__)))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T5__)))))))))) (name foo_five_args_lp) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -1012,33 +1080,46 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_eigen_matrix_dynamic T0__) - (RequireIs stan::is_vt_not_complex T0__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) true)) (inline false) (return_type - (Matrix (TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))) + (Matrix + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))) -1 -1 AoS)) (name covsqrt2corsqrt) (args - (((Const (Ref (TemplateType T0__))) mat_arg__) ((Const (Ref Int)) invert) + (((Const (Ref (TemplateType T0__))) mat_arg__) + ((Const (Ref (TemplateType T1__))) invert) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type Void) (name f0) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1054,19 +1135,27 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type Int) (name f1) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1082,19 +1171,27 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector Int)) (name f2) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1110,19 +1207,27 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector (StdVector Int))) (name f3) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1138,27 +1243,37 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__)))))))))) (name f4) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1174,28 +1289,38 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (name f5) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1211,29 +1336,39 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector (StdVector - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__)))))))))))) (name f6) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1249,29 +1384,39 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 1 AoS)) (name f7) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1287,30 +1432,40 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 1 AoS))) (name f8) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1326,31 +1481,41 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 1 AoS)))) (name f9) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1366,29 +1531,39 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 -1 AoS)) (name f10) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1404,30 +1579,40 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 -1 AoS))) (name f11) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1443,31 +1628,41 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) true)) (inline false) (return_type (StdVector (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 -1 AoS)))) (name f12) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -1494,20 +1689,26 @@ (name vecfoo) (args (((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) (inline false) (return_type - (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) + (Matrix + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + -1 1 AoS)) (name vecmufoo) (args (((Const (Ref (TemplateType T0__))) mu) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) (inline false) (return_type - (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) + (Matrix + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + -1 1 AoS)) (name vecmubar) (args (((Const (Ref (TemplateType T0__))) mu) @@ -1515,17 +1716,21 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_col_vector T0__) (RequireIs stan::is_vt_not_complex T0__) - (RequireIs stan::is_col_vector T1__) (RequireIs stan::is_vt_not_complex T1__) - (RequireIs stan::is_stan_scalar T2__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType T2__))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType T2__))))) -1 1 AoS)) (name algebra_system) (args @@ -1537,15 +1742,18 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_col_vector T0__) - (RequireIs stan::is_vt_not_complex T0__) (RequireIs stan::is_col_vector T1__) - (RequireIs stan::is_vt_not_complex T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) -1 1 AoS)) (name binomialf) (args @@ -1559,19 +1767,21 @@ (body ((FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_col_vector T0__) - (RequireIs stan::is_vt_not_complex T0__) - (RequireIs stan::is_col_vector T1__) - (RequireIs stan::is_vt_not_complex T1__) - (RequireIs stan::is_stan_scalar T2__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType T2__))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType T2__))))) -1 1 AoS)) (name "operator()") (args @@ -1589,17 +1799,19 @@ (body ((FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_col_vector T0__) - (RequireIs stan::is_vt_not_complex T0__) - (RequireIs stan::is_col_vector T1__) - (RequireIs stan::is_vt_not_complex T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) true)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))) -1 1 AoS)) (name "operator()") (args @@ -1613,14 +1825,22 @@ ((FunCall binomialf () ((Var phi) (Var theta) (Var x_r) (Var x_i) (Var pstream__)))))))))))))) (FunDef - ((templates_init ((()) false)) (inline false) (return_type Int) (name foo) - (args (((Const (Ref Int)) n) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((templates_init + ((((Typename T0__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) + false)) + (inline false) (return_type Int) (name foo) + (args + (((Const (Ref (TemplateType T0__))) n) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ (Double)) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1651,14 +1871,16 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__) - (RequireIs stan::is_stan_scalar T2__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)))) false)) (inline false) (return_type (StdVector - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))))) (name sho) (args (((Const (Ref (TemplateType T0__))) t) @@ -1669,11 +1891,14 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1738,6 +1963,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1756,18 +1983,25 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) (name foo_bar1) (args (((Const (Ref (TemplateType T0__))) x) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1787,12 +2021,14 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) false)) (inline false) (return_type - (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) (name foo_bar2) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -1800,10 +2036,13 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1823,18 +2062,27 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Bool propto__) (Typename T1__) (RequireIs stan::is_stan_scalar T1__))) false)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) + ((((Bool propto__) (Typename T0__) (Typename T1__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + false)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) (name foo_lpmf) (args - (((Const (Ref Int)) y) ((Const (Ref (TemplateType T1__))) lambda) + (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T1__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -1849,18 +2097,28 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T1__) (RequireIs stan::is_stan_scalar T1__))) false)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + false)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) (name foo_lcdf) (args - (((Const (Ref Int)) y) ((Const (Ref (TemplateType T1__))) lambda) + (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T1__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1879,18 +2137,28 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T1__) (RequireIs stan::is_stan_scalar T1__))) false)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + false)) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) (name foo_lccdf) (args - (((Const (Ref Int)) y) ((Const (Ref (TemplateType T1__))) lambda) + (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T1__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1911,11 +2179,13 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)))) false)) (inline false) (return_type - (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) (name foo_rng) (args (((Const (Ref (TemplateType T0__))) mu) ((Const (Ref (TemplateType T1__))) sigma) @@ -1924,10 +2194,13 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -1949,7 +2222,7 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -1958,10 +2231,14 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -1984,14 +2261,22 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((()) false)) (inline false) (return_type Int) (name foo_1) - (args (((Const (Ref Int)) a) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((templates_init + ((((Typename T0__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) + false)) + (inline false) (return_type Int) (name foo_1) + (args + (((Const (Ref (TemplateType T0__))) a) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ (Double)) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -2320,14 +2605,22 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((()) false)) (inline false) (return_type Int) (name foo_2) - (args (((Const (Ref Int)) a) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((templates_init + ((((Typename T0__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) + false)) + (inline false) (return_type Int) (name foo_2) + (args + (((Const (Ref (TemplateType T0__))) a) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ (Double)) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -2372,19 +2665,29 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) + false)) (inline false) - (return_type (StdVector (TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (return_type + (StdVector + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (name foo_3) (args - (((Const (Ref (TemplateType T0__))) t) ((Const (Ref Int)) n) + (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) n) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -2405,9 +2708,11 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) - (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) + (inline false) + (return_type + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) (name foo_lp) (args (((Const (Ref (TemplateType T0__))) x) ((Ref (TemplateType T_lp__)) lp__) @@ -2415,10 +2720,14 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -2436,17 +2745,22 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) (inline false) (return_type Void) (name foo_4) (args (((Const (Ref (StdVector (TemplateType T0__)))) x) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -2485,13 +2799,17 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__) - (RequireIs stan::is_stan_scalar T2__) (RequireIs stan::is_stan_scalar T3__))) + (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)))) false)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__)))))) (name relative_diff) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -2500,12 +2818,15 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -2602,15 +2923,18 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_col_vector T0__) - (RequireIs stan::is_vt_not_complex T0__) (RequireIs stan::is_col_vector T1__) - (RequireIs stan::is_vt_not_complex T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) false)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) -1 1 AoS)) (name foo_5) (args @@ -2621,12 +2945,15 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name shared_params) @@ -2661,15 +2988,18 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (Typename T4__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__) (RequireIs stan::is_stan_scalar T2__) - (RequireIs stan::is_stan_scalar T3__) (RequireIs stan::is_stan_scalar T4__))) + (Typename T4__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)))) false)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) - (TemplateType T4__)))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__)))))) (name foo_five_args) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -2679,12 +3009,15 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -2706,16 +3039,21 @@ ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T_lp__) - (Typename T_lp_accum__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__) (RequireIs stan::is_stan_scalar T2__) - (RequireIs stan::is_stan_scalar T3__) (RequireIs stan::is_stan_scalar T4__) - (RequireIs stan::is_stan_scalar T5__))) + (Typename T_lp_accum__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)))) false)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) - (TemplateType T4__) (TypeTrait stan::promote_args_t ((TemplateType T5__)))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T5__)))))))))) (name foo_five_args_lp) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -2726,13 +3064,17 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__) - (TypeTrait stan::promote_args_t ((TemplateType T5__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T5__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -2748,24 +3090,32 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_eigen_matrix_dynamic T0__) - (RequireIs stan::is_vt_not_complex T0__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) false)) (inline false) (return_type - (Matrix (TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))) + (Matrix + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))) -1 -1 AoS)) (name covsqrt2corsqrt) (args - (((Const (Ref (TemplateType T0__))) mat_arg__) ((Const (Ref Int)) invert) + (((Const (Ref (TemplateType T0__))) mat_arg__) + ((Const (Ref (TemplateType T1__))) invert) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name mat) @@ -2833,19 +3183,27 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type Void) (name f0) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -2861,15 +3219,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -2901,19 +3263,27 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type Int) (name f1) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -2929,15 +3299,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -2964,19 +3338,27 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector Int)) (name f2) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -2992,15 +3374,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3027,19 +3413,27 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector (StdVector Int))) (name f3) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3055,15 +3449,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3090,27 +3488,37 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__)))))))))) (name f4) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3126,15 +3534,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3161,28 +3573,38 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (name f5) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3198,15 +3620,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3233,29 +3659,39 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector (StdVector - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__)))))))))))) (name f6) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3271,15 +3707,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3306,29 +3746,39 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 1 AoS)) (name f7) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3344,15 +3794,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3379,30 +3833,40 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 1 AoS))) (name f8) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3418,15 +3882,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3453,31 +3921,41 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 1 AoS)))) (name f9) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3493,15 +3971,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3528,29 +4010,39 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 -1 AoS)) (name f10) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3566,15 +4058,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3601,30 +4097,40 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 -1 AoS))) (name f11) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3640,15 +4146,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3675,31 +4185,41 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) - (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) - (Typename T11__) (RequireIs stan::is_stan_scalar T3__) - (RequireIs stan::is_stan_scalar T4__) (RequireIs stan::is_stan_scalar T5__) - (RequireIs stan::is_col_vector T6__) (RequireIs stan::is_vt_not_complex T6__) - (RequireIs stan::is_stan_scalar T7__) (RequireIs stan::is_stan_scalar T8__) - (RequireIs stan::is_eigen_matrix_dynamic T9__) - (RequireIs stan::is_vt_not_complex T9__) (RequireIs stan::is_stan_scalar T10__) - (RequireIs stan::is_stan_scalar T11__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) + (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) + (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) + (RequireIs stan::is_stan_scalar (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)) + (RequireIs stan::is_stan_scalar (TemplateType T4__)) + (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs stan::is_col_vector (TemplateType T6__)) + (RequireIs stan::is_vt_not_complex (TemplateType T6__)) + (RequireIs stan::is_stan_scalar (TemplateType T7__)) + (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) + (RequireIs stan::is_vt_not_complex (TemplateType T9__)) + (RequireIs stan::is_stan_scalar (TemplateType T10__)) + (RequireIs stan::is_stan_scalar (TemplateType T11__)))) false)) (inline false) (return_type (StdVector (StdVector (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))) -1 -1 AoS)))) (name f12) (args - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (StdVector Int))) a2) ((Const (Ref (StdVector (StdVector Int)))) a3) ((Const (Ref (TemplateType T3__))) a4) ((Const (Ref (StdVector (TemplateType T4__)))) a5) @@ -3715,15 +4235,19 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) - (TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) + (TemplateType stan::base_type_t) (TemplateType T7__) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType T8__) (TemplateType stan::base_type_t) + (TemplateType T10__) (TemplateType T11__))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name a7) (init (Assignment (FunCall stan::math::to_ref () ((Var a7_arg__))))))) @@ -3757,6 +4281,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -3820,6 +4346,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -3873,6 +4401,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -3898,20 +4428,27 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) (inline false) (return_type - (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) + (Matrix + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + -1 1 AoS)) (name vecmufoo) (args (((Const (Ref (TemplateType T0__))) mu) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -3945,20 +4482,27 @@ (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) (inline false) (return_type - (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) + (Matrix + (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + -1 1 AoS)) (name vecmubar) (args (((Const (Ref (TemplateType T0__))) mu) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_t__ + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static true) (constexpr true) (type_ (TypeLiteral bool)) (name propto__) (init (Assignment (Literal true))))) @@ -4004,17 +4548,21 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_col_vector T0__) (RequireIs stan::is_vt_not_complex T0__) - (RequireIs stan::is_col_vector T1__) (RequireIs stan::is_vt_not_complex T1__) - (RequireIs stan::is_stan_scalar T2__))) + ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)) + (RequireIs stan::is_stan_scalar (TemplateType T2__)) + (RequireIs stan::is_stan_scalar (TemplateType T3__)))) false)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType T2__))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType T2__))))) -1 1 AoS)) (name algebra_system) (args @@ -4026,12 +4574,15 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType T2__))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType T2__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name x) (init (Assignment (FunCall stan::math::to_ref () ((Var x_arg__))))))) @@ -4095,15 +4646,18 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs stan::is_col_vector T0__) - (RequireIs stan::is_vt_not_complex T0__) (RequireIs stan::is_col_vector T1__) - (RequireIs stan::is_vt_not_complex T1__))) + ((((Typename T0__) (Typename T1__) + (RequireIs stan::is_col_vector (TemplateType T0__)) + (RequireIs stan::is_vt_not_complex (TemplateType T0__)) + (RequireIs stan::is_col_vector (TemplateType T1__)) + (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) false)) (inline false) (return_type (Matrix - (TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))) + (TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) -1 1 AoS)) (name binomialf) (args @@ -4114,12 +4668,15 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))) + ((TypeTrait std::decay_t + ((TypeTrait stan::promote_args_t + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name phi) @@ -4521,6 +5078,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -5675,6 +6234,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -6834,6 +7395,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeTrait stan::math::accumulator (Double))) (name lp_accum__) @@ -9263,6 +9826,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -9931,6 +10496,8 @@ (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral local_scalar_t__)) (name DUMMY_VAR__) @@ -15155,6 +15722,8 @@ ((VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (Using local_scalar_t__ (Double)) (VariableDefn ((static false) (constexpr false) (type_ (TypeLiteral boost::ecuyer1988)) diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index ff5955a47..91a7b234c 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -46,23 +46,27 @@ template , stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T2__>,-1,1> +Eigen::Matrix, T2__>>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* pstream__); -template , stan::is_col_vector, stan::is_vt_not_complex, + std::is_integral>, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T3__>,-1,1> -f_2_arg(const T0__& t, const T1__& z_arg__, const int& b, const T3__& a, +Eigen::Matrix, T3__>>,-1,1> +f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, std::ostream* pstream__); struct f_1_arg_variadic2_functor__ { template , stan::is_vt_not_complex, stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, T2__>,-1,1> + Eigen::Matrix, T2__>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, const T2__& a) const { return f_1_arg(t, z, a, pstream__); } }; struct f_2_arg_variadic2_functor__ { - template , stan::is_col_vector, stan::is_vt_not_complex, + std::is_integral>, stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, T3__>,-1,1> + Eigen::Matrix, T3__>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, - const int& b, const T3__& a) const { + const T2__& b, const T3__& a) const { return f_2_arg(t, z, b, a, pstream__); } }; @@ -93,7 +100,8 @@ struct f_0_arg_variadic2_functor__ { stan::require_all_t, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix>,-1,1> + Eigen::Matrix>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__) const { return f_0_arg(t, z, pstream__); } @@ -102,11 +110,14 @@ template , stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -126,12 +137,15 @@ template , stan::is_vt_not_complex, stan::is_stan_scalar>*> -Eigen::Matrix, T2__>,-1,1> +Eigen::Matrix, T2__>>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T2__>; + using local_scalar_t__ = std::decay_t, T2__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -146,17 +160,21 @@ f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , stan::is_col_vector, stan::is_vt_not_complex, + std::is_integral>, stan::is_stan_scalar>*> -Eigen::Matrix, T3__>,-1,1> -f_2_arg(const T0__& t, const T1__& z_arg__, const int& b, const T3__& a, +Eigen::Matrix, T3__>>,-1,1> +f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T3__>; + using local_scalar_t__ = std::decay_t, T3__>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& z = stan::math::to_ref(z_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -195,6 +213,8 @@ class ode_adjoint_test_model_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -364,6 +386,8 @@ class ode_adjoint_test_model_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -441,6 +465,8 @@ class ode_adjoint_test_model_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -527,6 +553,8 @@ class ode_adjoint_test_model_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -563,6 +591,8 @@ class ode_adjoint_test_model_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -864,13 +894,14 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T2__, T3__, - T4__, stan::promote_args_t>,-1,1> +Eigen::Matrix, T2__, T3__, T4__, + std::decay_t>>>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex, @@ -878,12 +909,14 @@ template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T2__, T3__, - T4__, stan::promote_args_t>,-1,1> + stan::is_stan_scalar, + std::is_integral>>* = nullptr> +Eigen::Matrix, T2__, T3__, T4__, + std::decay_t>>>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, - const int& unused, std::ostream* pstream__); + const T7__& unused, std::ostream* pstream__); struct simple_SIR_variadic2_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, T2__, - T3__, T4__, stan::promote_args_t>,-1,1> + Eigen::Matrix, T2__, T3__, T4__, + std::decay_t>>>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta) const { return simple_SIR(t, y, beta, kappa, gamma, xi, delta, pstream__); } template , stan::is_col_vector, stan::is_vt_not_complex, @@ -911,12 +945,14 @@ struct simple_SIR_variadic2_functor__ { stan::is_stan_scalar, stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - Eigen::Matrix, T2__, - T3__, T4__, stan::promote_args_t>,-1,1> + stan::is_stan_scalar, + std::is_integral>>* = nullptr> + Eigen::Matrix, T2__, T3__, T4__, + std::decay_t>>>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, const T2__& beta, const T3__& kappa, const T4__& gamma, - const T5__& xi, const T6__& delta, const int& unused) const { + const T5__& xi, const T6__& delta, const T7__& unused) const { return simple_SIR(t, y, beta, kappa, gamma, xi, delta, unused, pstream__); } }; @@ -930,15 +966,20 @@ template , stan::is_stan_scalar, stan::is_stan_scalar>*> -Eigen::Matrix, T2__, T3__, - T4__, stan::promote_args_t>,-1,1> +Eigen::Matrix, T2__, T3__, T4__, + std::decay_t>>>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T2__, T3__, T4__, - stan::promote_args_t>; + using local_scalar_t__ = std::decay_t, T2__, + T3__, T4__, + std::decay_t>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -978,7 +1019,7 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& } } template , stan::is_col_vector, stan::is_vt_not_complex, @@ -986,16 +1027,22 @@ template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -Eigen::Matrix, T2__, T3__, - T4__, stan::promote_args_t>,-1,1> + stan::is_stan_scalar, + std::is_integral>>*> +Eigen::Matrix, T2__, T3__, T4__, + std::decay_t>>>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, - const int& unused, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T2__, T3__, T4__, - stan::promote_args_t>; + const T7__& unused, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, T2__, + T3__, T4__, + std::decay_t>>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -1056,6 +1103,8 @@ class overloaded_ode_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -1164,6 +1213,8 @@ class overloaded_ode_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1294,6 +1345,8 @@ class overloaded_ode_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1431,6 +1484,8 @@ class overloaded_ode_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1521,6 +1576,8 @@ class overloaded_ode_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1552,6 +1609,8 @@ class overloaded_ode_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/opencl/cpp.expected b/test/integration/good/code-gen/opencl/cpp.expected index a81a4ca60..e816a643f 100644 --- a/test/integration/good/code-gen/opencl/cpp.expected +++ b/test/integration/good/code-gen/opencl/cpp.expected @@ -797,6 +797,8 @@ class distributions_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -922,6 +924,8 @@ class distributions_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3976,6 +3980,8 @@ class distributions_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7037,6 +7043,8 @@ class distributions_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10101,6 +10109,8 @@ class distributions_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10153,6 +10163,8 @@ class distributions_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10500,6 +10512,8 @@ class restricted_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -10622,6 +10636,8 @@ class restricted_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10729,6 +10745,8 @@ class restricted_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10843,6 +10861,8 @@ class restricted_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10963,6 +10983,8 @@ class restricted_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11015,6 +11037,8 @@ class restricted_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/profiling/cpp.expected b/test/integration/good/code-gen/profiling/cpp.expected index f4508210c..92e8fb076 100644 --- a/test/integration/good/code-gen/profiling/cpp.expected +++ b/test/integration/good/code-gen/profiling/cpp.expected @@ -48,6 +48,8 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -231,6 +235,8 @@ class simple_function_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -336,6 +342,8 @@ class simple_function_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -385,6 +393,8 @@ class simple_function_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -412,6 +422,8 @@ class simple_function_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index aa6fd8430..50ca91589 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -33,23 +33,28 @@ static constexpr std::array locations_array__ = " (in 'basic.stan', line 45, column 51 to line 47, column 3)"}; template >* = nullptr> -stan::promote_args_t +std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> array_fun(const std::vector& a, std::ostream* pstream__); +template >* = nullptr> double int_array_fun(const std::vector& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__); +template >, + std::is_integral>>* = nullptr> int -int_only_multiplication(const int& a, const int& b, std::ostream* pstream__); +int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__); template >* = nullptr> std::vector< - std::vector>>>> + std::vector< + std::vector>>>>> array_fun(const std::vector>>>& a, std::ostream* pstream__); template >*> -stan::promote_args_t +std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -96,10 +104,12 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> array_fun(const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -113,9 +123,12 @@ array_fun(const std::vector& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> double int_array_fun(const std::vector& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -132,10 +145,12 @@ double int_array_fun(const std::vector& a, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -159,10 +174,15 @@ my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >, + std::is_integral>>*> int -int_only_multiplication(const int& a, const int& b, std::ostream* pstream__) { +int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -177,10 +197,12 @@ int_only_multiplication(const int& a, const int& b, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -200,8 +222,10 @@ template ; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -214,10 +238,12 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } template >*> -stan::promote_args_t +std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -234,10 +260,12 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -251,10 +279,12 @@ test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { template , stan::is_vt_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& a = stan::math::to_ref(a_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -271,11 +301,14 @@ test_complex(const T0__& a_arg__, std::ostream* pstream__) { } template >*> std::vector< - std::vector>>>> + std::vector< + std::vector>>>>> array_fun(const std::vector>>>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -380,23 +413,28 @@ static constexpr std::array locations_array__ = " (in 'basic.stanfunctions', line 35, column 31 to line 37, column 1)"}; template >* = nullptr> -stan::promote_args_t +std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> array_fun(const std::vector& a, std::ostream* pstream__); +template >* = nullptr> double int_array_fun(const std::vector& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__); +template >, + std::is_integral>>* = nullptr> int -int_only_multiplication(const int& a, const int& b, std::ostream* pstream__); +int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t +std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); template >*> -stan::promote_args_t +std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -432,10 +472,12 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> array_fun(const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -449,9 +491,12 @@ array_fun(const std::vector& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> double int_array_fun(const std::vector& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -468,10 +513,12 @@ double int_array_fun(const std::vector& a, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -495,10 +542,15 @@ my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >, + std::is_integral>>*> int -int_only_multiplication(const int& a, const int& b, std::ostream* pstream__) { +int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -513,10 +565,12 @@ int_only_multiplication(const int& a, const int& b, std::ostream* pstream__) { } } template >*> -stan::promote_args_t +std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -536,8 +590,10 @@ template ; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -550,10 +606,12 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } template >*> -stan::promote_args_t +std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -570,10 +628,12 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -654,25 +714,29 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__); template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::vector>> integrand_ode(const T0__& r, const std::vector& f, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); double ode_integrate(std::ostream* pstream__); struct integrand_ode_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::vector>> operator()(const T0__& r, const std::vector& f, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { @@ -682,10 +746,12 @@ struct integrand_ode_functor__ { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -701,16 +767,21 @@ integrand(const T0__& x_arg__, std::ostream* pstream__) { } } template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::vector>> integrand_ode(const T0__& r, const std::vector& f, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -736,6 +807,8 @@ integrand_ode(const T0__& r, const std::vector& f, double ode_integrate(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index ed015bf8f..dd6e62934 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -31,6 +31,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -764,6 +768,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -848,6 +854,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -946,6 +954,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -967,6 +977,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1899,21 +1911,25 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 19, column 4 to column 16)", " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::vector>> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::vector>> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { @@ -1921,16 +1937,21 @@ struct simple_SIR_functor__ { } }; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::vector>> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -1999,6 +2020,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2214,6 +2239,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2342,6 +2369,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -2469,6 +2498,8 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2500,6 +2531,8 @@ class ad_level_failing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2733,6 +2766,8 @@ class ad_levels_deep_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3390,6 +3425,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3434,6 +3471,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3489,6 +3528,8 @@ class ad_levels_deep_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3549,6 +3590,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3570,6 +3613,8 @@ class ad_levels_deep_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4418,6 +4463,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4537,6 +4586,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4612,6 +4663,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4652,6 +4705,8 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4673,6 +4728,8 @@ class copy_prop_profile_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4950,20 +5007,29 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 21, column 4 to column 13)", " (in 'copy_fail.stan', line 12, column 36 to line 22, column 3)", " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -4998,9 +5064,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5041,18 +5110,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -5205,6 +5278,8 @@ class copy_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -5442,6 +5517,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5874,6 +5951,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6312,6 +6391,8 @@ class copy_fail_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6642,6 +6723,8 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6667,6 +6750,8 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7009,6 +7094,8 @@ class dce_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -7215,6 +7302,8 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7494,6 +7583,8 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7780,6 +7871,8 @@ class dce_fail_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7889,6 +7982,8 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7978,6 +8073,8 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8470,6 +8567,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8557,6 +8658,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8588,6 +8691,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8624,6 +8729,8 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8635,6 +8742,8 @@ class expr_prop_experiment_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8800,6 +8909,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8886,6 +8999,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8917,6 +9032,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8953,6 +9070,8 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8964,6 +9083,8 @@ class expr_prop_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9135,6 +9256,8 @@ class expr_prop_fail_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -9210,6 +9333,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9302,6 +9427,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9401,6 +9528,8 @@ class expr_prop_fail_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9453,6 +9582,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9483,6 +9614,8 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9719,6 +9852,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9834,6 +9971,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9888,6 +10027,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9938,6 +10079,8 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9966,6 +10109,8 @@ class expr_prop_fail2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10236,6 +10381,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10698,6 +10847,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10896,6 +11047,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -11087,6 +11240,8 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11158,6 +11313,8 @@ class expr_prop_fail3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11679,6 +11836,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11886,6 +12047,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11969,6 +12132,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -12136,6 +12301,8 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12161,6 +12328,8 @@ class expr_prop_fail4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12513,20 +12682,29 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 21, column 4 to column 13)", " (in 'expr-prop-fail5.stan', line 12, column 36 to line 22, column 3)", " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -12561,9 +12739,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -12604,18 +12785,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -12763,6 +12948,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13373,6 +13562,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13810,6 +14001,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14145,6 +14338,8 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14178,6 +14373,8 @@ class expr_prop_fail5_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14610,21 +14807,28 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 28, column 36 to line 36, column 3)", " (in 'expr-prop-fail6.stan', line 48, column 47 to line 65, column 3)", " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -14639,9 +14843,12 @@ js_super_lp(const std::vector>& y, const std::vector& const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -14676,9 +14883,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -14724,13 +14934,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -14861,10 +15073,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -14879,11 +15094,13 @@ js_super_lp(const std::vector>& y, const std::vector& const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T5__, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T5__, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& nu = stan::math::to_ref(nu_arg__); @@ -15423,6 +15640,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16542,6 +16763,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17477,6 +17700,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -18152,6 +18377,8 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18195,6 +18422,8 @@ class expr_prop_fail6_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18643,6 +18872,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19029,6 +19262,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19222,6 +19457,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -19464,6 +19701,8 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19501,6 +19740,8 @@ class expr_prop_fail7_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19864,6 +20105,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20060,6 +20305,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20143,6 +20390,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -20228,6 +20477,8 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20271,6 +20522,8 @@ class expr_prop_fail8_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20624,20 +20877,29 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 21, column 4 to column 13)", " (in 'fails-test.stan', line 12, column 36 to line 22, column 3)", " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -20672,9 +20934,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -20715,18 +20980,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -20879,6 +21148,8 @@ class fails_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -21116,6 +21387,8 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21548,6 +21821,8 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21986,6 +22261,8 @@ class fails_test_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22316,6 +22593,8 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22341,6 +22620,8 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22602,20 +22883,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22633,10 +22916,12 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22665,6 +22950,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22812,6 +23101,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22860,6 +23151,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22896,6 +23189,8 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22907,6 +23202,8 @@ class function_in_function_inline_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23069,18 +23366,20 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template >* = nullptr> -stan::promote_args_t +std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); template >*> -stan::promote_args_t +std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23097,10 +23396,12 @@ do_something(const T0__& x, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& et = stan::math::to_ref(et_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -23152,6 +23453,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23291,6 +23596,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23392,6 +23699,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -23428,6 +23737,8 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23439,6 +23750,8 @@ class function_in_function_loops_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23596,6 +23909,8 @@ class fuzz_div0_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -23631,6 +23946,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23671,6 +23988,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23718,6 +24037,8 @@ class fuzz_div0_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -23754,6 +24075,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23765,6 +24088,8 @@ class fuzz_div0_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23939,6 +24264,8 @@ class initialize_SoA_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -23974,6 +24301,8 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24043,6 +24372,8 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24126,6 +24457,8 @@ class initialize_SoA_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24246,6 +24579,8 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24280,6 +24615,8 @@ class initialize_SoA_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24607,20 +24944,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -24638,10 +24977,12 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -24678,6 +25019,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24784,6 +25129,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24868,6 +25215,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24954,6 +25303,8 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24981,6 +25332,8 @@ class inline_functions_varmat_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25277,12 +25630,20 @@ static constexpr std::array locations_array__ = " (in 'inline-tdata.stan', line 10, column 3 to column 31)", " (in 'inline-tdata.stan', line 3, column 4 to column 31)", " (in 'inline-tdata.stan', line 2, column 26 to line 4, column 3)"}; +template >, + std::is_integral>>* = nullptr> Eigen::Matrix -foo(const int& N, const int& M, std::ostream* pstream__); +foo(const T0__& N, const T1__& M, std::ostream* pstream__); +template >, + std::is_integral>>*> Eigen::Matrix -foo(const int& N, const int& M, std::ostream* pstream__) { +foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25314,6 +25675,8 @@ class inline_tdata_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -25375,6 +25738,8 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25412,6 +25777,8 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25456,6 +25823,8 @@ class inline_tdata_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -25496,6 +25865,8 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25515,6 +25886,8 @@ class inline_tdata_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25686,15 +26059,17 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& oR = stan::math::to_ref(oR_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -25728,6 +26103,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25823,6 +26202,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25878,6 +26259,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -25936,6 +26319,8 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25947,6 +26332,8 @@ class inliner_same_names_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26265,20 +26652,28 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 48, column 47 to line 65, column 3)", " (in 'inlining-fail2.stan', line 79, column 70 to line 137, column 3)", " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -26295,11 +26690,14 @@ jolly_seber_lp(const std::vector>& y, template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26334,9 +26732,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26382,13 +26783,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -26519,9 +26922,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -26535,11 +26942,13 @@ jolly_seber_lp(const std::vector>& y, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& gamma = stan::math::to_ref(gamma_arg__); @@ -27054,10 +27463,12 @@ jolly_seber_lp(const std::vector>& y, template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -27140,6 +27551,8 @@ class inlining_fail2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -27336,6 +27749,8 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28231,6 +28646,8 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29136,6 +29553,8 @@ class inlining_fail2_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -29818,6 +30237,8 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29857,6 +30278,8 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30255,6 +30678,8 @@ class lcm_experiment_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -30316,6 +30741,8 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30340,6 +30767,8 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30371,6 +30800,8 @@ class lcm_experiment_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -30407,6 +30838,8 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30418,6 +30851,8 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30579,6 +31014,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30662,6 +31101,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30717,6 +31158,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -30757,6 +31200,8 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30776,6 +31221,8 @@ class lcm_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30950,6 +31397,8 @@ class lcm_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -31007,6 +31456,8 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -31044,6 +31495,8 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -31088,6 +31541,8 @@ class lcm_fails_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -31129,6 +31584,8 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -31149,6 +31606,8 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -31378,20 +31837,29 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 21, column 4 to column 13)", " (in 'lcm-fails2.stan', line 12, column 36 to line 22, column 3)", " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -31426,9 +31894,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -31469,18 +31940,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -31628,6 +32103,8 @@ class lcm_fails2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -31805,6 +32282,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -32214,6 +32693,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -32629,6 +33110,8 @@ class lcm_fails2_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -32936,6 +33419,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -32959,6 +33444,8 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33196,22 +33683,26 @@ static constexpr std::array locations_array__ = template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__); +template >, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); +std::decay_t> +baz_lpdf(const T0__& x, std::ostream* pstream__); template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33225,12 +33716,15 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template >, + stan::is_stan_scalar>*> +std::decay_t> +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33246,9 +33740,12 @@ bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { } template >*> -stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +baz_lpdf(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33271,6 +33768,8 @@ class lupdf_inlining_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -33316,6 +33815,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33371,6 +33872,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33433,6 +33936,8 @@ class lupdf_inlining_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -33502,6 +34007,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33521,6 +34028,8 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33784,6 +34293,8 @@ class off_dce_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -33969,6 +34480,8 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -34092,6 +34605,8 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -34222,6 +34737,8 @@ class off_dce_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -34403,6 +34920,8 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -34434,6 +34953,8 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -34749,6 +35270,8 @@ class off_small_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -34909,6 +35432,8 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35042,6 +35567,8 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35182,6 +35709,8 @@ class off_small_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -35319,6 +35848,8 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35370,6 +35901,8 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35783,23 +36316,29 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 11, column 8 to column 21)", " (in 'optimizations.stan', line 16, column 8 to column 18)", " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; -template >* = nullptr> + stan::require_all_t, + std::is_integral>>* = nullptr> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__); -int rfun(const int& y, std::ostream* pstream__); +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__); +template >>* = nullptr> +int rfun(const T0__& y, std::ostream* pstream__); template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); -template >*> + stan::require_all_t, + std::is_integral>>*> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35818,9 +36357,13 @@ nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int rfun(const int& y, std::ostream* pstream__) { +template >>*> +int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35848,6 +36391,8 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -35869,6 +36414,8 @@ class optimizations_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -35904,6 +36451,8 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -36439,6 +36988,8 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -36983,6 +37534,8 @@ class optimizations_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -37041,6 +37594,8 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37082,6 +37637,8 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37410,12 +37967,18 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template >* = nullptr> -stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); -double dumb(const int& x, std::ostream* pstream__); +std::decay_t> +dumb(const T0__& x, std::ostream* pstream__); +template >>* = nullptr> +double dumb(const T0__& x, std::ostream* pstream__); template >*> -stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +dumb(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -37432,9 +37995,13 @@ stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -double dumb(const int& x, std::ostream* pstream__) { +template >>*> +double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -37460,6 +38027,8 @@ class overloaded_fn_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -37495,6 +38064,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37528,6 +38099,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37568,6 +38141,8 @@ class overloaded_fn_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -37604,6 +38179,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37615,6 +38192,8 @@ class overloaded_fn_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37770,21 +38349,23 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -37806,6 +38387,8 @@ template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37821,10 +38404,12 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { } } template >*> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -37850,6 +38435,8 @@ class overloaded_fn2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -37885,6 +38472,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37919,6 +38508,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37960,6 +38551,8 @@ class overloaded_fn2_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -37996,6 +38589,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38007,6 +38602,8 @@ class overloaded_fn2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38165,6 +38762,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38238,6 +38839,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38283,6 +38886,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -38332,6 +38937,8 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38343,6 +38950,8 @@ class partial_eval_tuple_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38573,6 +39182,8 @@ class partial_eval_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -38732,6 +39343,8 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38846,6 +39459,8 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -38967,6 +39582,8 @@ class partial_eval_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -39068,6 +39685,8 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -39107,6 +39726,8 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -39409,6 +40030,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -40754,6 +41379,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -40823,6 +41450,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -40867,6 +41496,8 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -40894,6 +41525,8 @@ class partial_eval_multiply_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42327,6 +42960,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42415,6 +43052,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42446,6 +43085,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -42482,6 +43123,8 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42493,6 +43136,8 @@ class partial_eval_zeros_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42696,6 +43341,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -42963,6 +43612,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43100,6 +43751,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -43272,6 +43925,8 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43320,6 +43975,8 @@ class stalled1_failure_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43694,6 +44351,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43865,6 +44526,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -43994,6 +44657,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -44171,6 +44836,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -44190,6 +44857,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -44392,6 +45061,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -44516,6 +45189,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -44612,6 +45287,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -44718,6 +45395,8 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -44737,6 +45416,8 @@ class unenforce_initialize_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -44946,6 +45627,8 @@ class unroll_limit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -44981,6 +45664,8 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -45005,6 +45690,8 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -45036,6 +45723,8 @@ class unroll_limit_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -45348,6 +46037,8 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -45359,6 +46050,8 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index ba5197193..319593ed9 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -28,6 +28,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -158,6 +162,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -233,6 +239,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -325,6 +333,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -347,6 +357,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -683,21 +695,25 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 19, column 4 to column 16)", " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::vector>> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::vector>> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { @@ -705,16 +721,21 @@ struct simple_SIR_functor__ { } }; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::vector>> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -777,6 +798,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -969,6 +994,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1074,6 +1101,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1153,6 +1182,8 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1184,6 +1215,8 @@ class ad_level_failing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1414,6 +1447,8 @@ class ad_levels_deep_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -1476,6 +1511,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1520,6 +1557,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1571,6 +1610,8 @@ class ad_levels_deep_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1629,6 +1670,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1651,6 +1694,8 @@ class ad_levels_deep_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1904,6 +1949,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2026,6 +2075,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2104,6 +2155,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -2144,6 +2197,8 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2166,6 +2221,8 @@ class copy_prop_profile_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2426,20 +2483,29 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 27, column 4 to line 44, column 5)", " (in 'copy_fail.stan', line 45, column 4 to column 15)", " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2461,9 +2527,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2488,18 +2557,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -2564,6 +2637,8 @@ class copy_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -2741,6 +2816,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2869,6 +2946,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3004,6 +3083,8 @@ class copy_fail_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3110,6 +3191,8 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3136,6 +3219,8 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3463,6 +3548,8 @@ class dce_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3662,6 +3749,8 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3846,6 +3935,8 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4037,6 +4128,8 @@ class dce_fail_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4154,6 +4247,8 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4249,6 +4344,8 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4674,6 +4771,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4761,6 +4862,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4792,6 +4895,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4826,6 +4931,8 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4837,6 +4944,8 @@ class expr_prop_experiment_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5001,6 +5110,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5087,6 +5200,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5118,6 +5233,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5152,6 +5269,8 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5163,6 +5282,8 @@ class expr_prop_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5330,6 +5451,8 @@ class expr_prop_fail_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -5398,6 +5521,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5467,6 +5592,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5543,6 +5670,8 @@ class expr_prop_fail_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5595,6 +5724,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5627,6 +5758,8 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5853,6 +5986,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5966,6 +6103,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6018,6 +6157,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6066,6 +6207,8 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6095,6 +6238,8 @@ class expr_prop_fail2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6357,6 +6502,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6734,6 +6883,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6870,6 +7021,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7008,6 +7161,8 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7087,6 +7242,8 @@ class expr_prop_fail3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7529,6 +7686,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7724,6 +7885,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7797,6 +7960,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7929,6 +8094,8 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7956,6 +8123,8 @@ class expr_prop_fail4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8306,20 +8475,29 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 27, column 4 to line 46, column 5)", " (in 'expr-prop-fail5.stan', line 47, column 4 to column 15)", " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -8341,9 +8519,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -8368,18 +8549,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -8446,6 +8631,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8724,6 +8913,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8870,6 +9061,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8994,6 +9187,8 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9028,6 +9223,8 @@ class expr_prop_fail5_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9460,21 +9657,28 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 86, column 25 to line 142, column 5)", " (in 'expr-prop-fail6.stan', line 86, column 4 to line 142, column 5)", " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -9489,9 +9693,12 @@ js_super_lp(const std::vector>& y, const std::vector& const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9513,9 +9720,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9545,13 +9755,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -9606,10 +9818,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -9624,11 +9839,13 @@ js_super_lp(const std::vector>& y, const std::vector& const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T5__, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T5__, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& nu = stan::math::to_ref(nu_arg__); @@ -9857,6 +10074,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10149,6 +10370,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10294,6 +10517,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10579,6 +10804,8 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10625,6 +10852,8 @@ class expr_prop_fail6_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11044,6 +11273,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11282,6 +11515,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11375,6 +11610,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -11473,6 +11710,8 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11511,6 +11750,8 @@ class expr_prop_fail7_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11797,6 +12038,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11985,6 +12230,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12064,6 +12311,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -12149,6 +12398,8 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12194,6 +12445,8 @@ class expr_prop_fail8_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12533,20 +12786,29 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 27, column 4 to line 44, column 5)", " (in 'fails-test.stan', line 45, column 4 to column 15)", " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -12568,9 +12830,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -12595,18 +12860,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -12671,6 +12940,8 @@ class fails_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -12848,6 +13119,8 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12976,6 +13249,8 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13111,6 +13386,8 @@ class fails_test_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -13217,6 +13494,8 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13243,6 +13522,8 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13493,20 +13774,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -13521,10 +13804,12 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -13547,6 +13832,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13639,6 +13928,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13679,6 +13970,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -13713,6 +14006,8 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13724,6 +14019,8 @@ class function_in_function_inline_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13887,18 +14184,20 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template >* = nullptr> -stan::promote_args_t +std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); template >*> -stan::promote_args_t +std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13921,10 +14220,12 @@ do_something(const T0__& x, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& et = stan::math::to_ref(et_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -13962,6 +14263,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14047,6 +14352,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14094,6 +14401,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14128,6 +14437,8 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14139,6 +14450,8 @@ class function_in_function_loops_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14296,6 +14609,8 @@ class fuzz_div0_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -14331,6 +14646,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14376,6 +14693,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14428,6 +14747,8 @@ class fuzz_div0_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14462,6 +14783,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14473,6 +14796,8 @@ class fuzz_div0_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14648,6 +14973,8 @@ class initialize_SoA_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -14683,6 +15010,8 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14738,6 +15067,8 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14800,6 +15131,8 @@ class initialize_SoA_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14863,6 +15196,8 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14898,6 +15233,8 @@ class initialize_SoA_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15146,20 +15483,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -15177,10 +15516,12 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -15213,6 +15554,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15298,6 +15643,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15355,6 +15702,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -15421,6 +15770,8 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15450,6 +15801,8 @@ class inline_functions_varmat_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15693,12 +16046,20 @@ static constexpr std::array locations_array__ = " (in 'inline-tdata.stan', line 10, column 3 to column 31)", " (in 'inline-tdata.stan', line 3, column 4 to column 31)", " (in 'inline-tdata.stan', line 2, column 26 to line 4, column 3)"}; +template >, + std::is_integral>>* = nullptr> Eigen::Matrix -foo(const int& N, const int& M, std::ostream* pstream__); +foo(const T0__& N, const T1__& M, std::ostream* pstream__); +template >, + std::is_integral>>*> Eigen::Matrix -foo(const int& N, const int& M, std::ostream* pstream__) { +foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -15725,6 +16086,8 @@ class inline_tdata_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -15785,6 +16148,8 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15821,6 +16186,8 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15864,6 +16231,8 @@ class inline_tdata_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -15902,6 +16271,8 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15921,6 +16292,8 @@ class inline_tdata_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16093,15 +16466,17 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& oR = stan::math::to_ref(oR_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -16134,6 +16509,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16217,6 +16596,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16258,6 +16639,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -16304,6 +16687,8 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16315,6 +16700,8 @@ class inliner_same_names_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16645,20 +17032,28 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 153, column 4 to line 156, column 5)", " (in 'inlining-fail2.stan', line 157, column 4 to column 26)", " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -16675,11 +17070,14 @@ jolly_seber_lp(const std::vector>& y, template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -16701,9 +17099,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -16733,13 +17134,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -16794,9 +17197,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -16810,11 +17217,13 @@ jolly_seber_lp(const std::vector>& y, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& gamma = stan::math::to_ref(gamma_arg__); @@ -17034,10 +17443,12 @@ jolly_seber_lp(const std::vector>& y, template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -17090,6 +17501,8 @@ class inlining_fail2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -17246,6 +17659,8 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17345,6 +17760,8 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17451,6 +17868,8 @@ class inlining_fail2_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -17698,6 +18117,8 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17741,6 +18162,8 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18115,6 +18538,8 @@ class lcm_experiment_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -18178,6 +18603,8 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18202,6 +18629,8 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18233,6 +18662,8 @@ class lcm_experiment_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -18267,6 +18698,8 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18278,6 +18711,8 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18440,6 +18875,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18523,6 +18962,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18578,6 +19019,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -18616,6 +19059,8 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18635,6 +19080,8 @@ class lcm_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18809,6 +19256,8 @@ class lcm_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -18866,6 +19315,8 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18902,6 +19353,8 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18945,6 +19398,8 @@ class lcm_fails_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -18984,6 +19439,8 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19005,6 +19462,8 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19241,20 +19700,29 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 27, column 4 to line 44, column 5)", " (in 'lcm-fails2.stan', line 45, column 4 to column 15)", " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -19276,9 +19744,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -19303,18 +19774,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -19377,6 +19852,8 @@ class lcm_fails2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -19514,6 +19991,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19636,6 +20115,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19765,6 +20246,8 @@ class lcm_fails2_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -19864,6 +20347,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19887,6 +20372,8 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20125,22 +20612,26 @@ static constexpr std::array locations_array__ = template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__); +template >, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); +std::decay_t> +baz_lpdf(const T0__& x, std::ostream* pstream__); template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20151,12 +20642,15 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template >, + stan::is_stan_scalar>*> +std::decay_t> +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20169,9 +20663,12 @@ bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { } template >*> -stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +baz_lpdf(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20191,6 +20688,8 @@ class lupdf_inlining_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -20236,6 +20735,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20276,6 +20777,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20323,6 +20826,8 @@ class lupdf_inlining_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -20375,6 +20880,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20394,6 +20901,8 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20648,6 +21157,8 @@ class off_dce_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -20790,6 +21301,8 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20873,6 +21386,8 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20963,6 +21478,8 @@ class off_dce_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -21087,6 +21604,8 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21118,6 +21637,8 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21427,6 +21948,8 @@ class off_small_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -21565,6 +22088,8 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21668,6 +22193,8 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21778,6 +22305,8 @@ class off_small_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -21891,6 +22420,8 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21944,6 +22475,8 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22389,23 +22922,29 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 15, column 8 to column 20)", " (in 'optimizations.stan', line 16, column 8 to column 18)", " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; -template >* = nullptr> + stan::require_all_t, + std::is_integral>>* = nullptr> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__); -int rfun(const int& y, std::ostream* pstream__); +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__); +template >>* = nullptr> +int rfun(const T0__& y, std::ostream* pstream__); template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); -template >*> + stan::require_all_t, + std::is_integral>>*> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22421,9 +22960,13 @@ nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int rfun(const int& y, std::ostream* pstream__) { +template >>*> +int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -22446,6 +22989,8 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22467,6 +23012,8 @@ class optimizations_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -22502,6 +23049,8 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22796,6 +23345,8 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23097,6 +23648,8 @@ class optimizations_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -23159,6 +23712,8 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23203,6 +23758,8 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23474,12 +24031,18 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template >* = nullptr> -stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); -double dumb(const int& x, std::ostream* pstream__); +std::decay_t> +dumb(const T0__& x, std::ostream* pstream__); +template >>* = nullptr> +double dumb(const T0__& x, std::ostream* pstream__); template >*> -stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +dumb(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23493,9 +24056,13 @@ stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -double dumb(const int& x, std::ostream* pstream__) { +template >>*> +double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23518,6 +24085,8 @@ class overloaded_fn_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -23553,6 +24122,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23583,6 +24154,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23620,6 +24193,8 @@ class overloaded_fn_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -23654,6 +24229,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23665,6 +24242,8 @@ class overloaded_fn_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23820,21 +24399,23 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -23853,6 +24434,8 @@ template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23865,10 +24448,12 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { } } template >*> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23891,6 +24476,8 @@ class overloaded_fn2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -23926,6 +24513,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23956,6 +24545,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23993,6 +24584,8 @@ class overloaded_fn2_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24027,6 +24620,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24038,6 +24633,8 @@ class overloaded_fn2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24196,6 +24793,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24271,6 +24872,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24318,6 +24921,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24363,6 +24968,8 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24374,6 +24981,8 @@ class partial_eval_tuple_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24597,6 +25206,8 @@ class partial_eval_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -24734,6 +25345,8 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24821,6 +25434,8 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24915,6 +25530,8 @@ class partial_eval_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24995,6 +25612,8 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25036,6 +25655,8 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25313,6 +25934,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25474,6 +26099,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25547,6 +26174,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -25593,6 +26222,8 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25622,6 +26253,8 @@ class partial_eval_multiply_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25858,6 +26491,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25946,6 +26583,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25977,6 +26616,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26011,6 +26652,8 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26022,6 +26665,8 @@ class partial_eval_zeros_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26218,6 +26863,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26430,6 +27079,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26524,6 +27175,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26598,6 +27251,8 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26646,6 +27301,8 @@ class stalled1_failure_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26911,6 +27568,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27011,6 +27672,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27069,6 +27732,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -27132,6 +27797,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27151,6 +27818,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27355,6 +28024,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27443,6 +28116,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27503,6 +28178,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -27571,6 +28248,8 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27590,6 +28269,8 @@ class unenforce_initialize_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27802,6 +28483,8 @@ class unroll_limit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -27837,6 +28520,8 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27861,6 +28546,8 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27892,6 +28579,8 @@ class unroll_limit_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -27953,6 +28642,8 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27964,6 +28655,8 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 8c97f5dae..748b5bd00 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -28,6 +28,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -150,6 +154,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -218,6 +224,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -308,6 +316,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -329,6 +339,8 @@ class ad_level_deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -665,21 +677,25 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 19, column 4 to column 16)", " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::vector>> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::vector>> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { @@ -687,16 +703,21 @@ struct simple_SIR_functor__ { } }; template , stan::is_stan_scalar, stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector> + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::vector>> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -759,6 +780,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -950,6 +975,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1054,6 +1081,8 @@ class ad_level_failing_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1132,6 +1161,8 @@ class ad_level_failing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1163,6 +1194,8 @@ class ad_level_failing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1393,6 +1426,8 @@ class ad_levels_deep_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -1455,6 +1490,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1496,6 +1533,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1545,6 +1584,8 @@ class ad_levels_deep_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1601,6 +1642,8 @@ class ad_levels_deep_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1622,6 +1665,8 @@ class ad_levels_deep_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1875,6 +1920,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1994,6 +2043,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2069,6 +2120,8 @@ class copy_prop_profile_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -2107,6 +2160,8 @@ class copy_prop_profile_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2128,6 +2183,8 @@ class copy_prop_profile_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2386,20 +2443,29 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 21, column 4 to column 13)", " (in 'copy_fail.stan', line 12, column 36 to line 22, column 3)", " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2421,9 +2487,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2448,18 +2517,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -2525,6 +2598,8 @@ class copy_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -2702,6 +2777,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2888,6 +2965,8 @@ class copy_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3081,6 +3160,8 @@ class copy_fail_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3242,6 +3323,8 @@ class copy_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3267,6 +3350,8 @@ class copy_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3594,6 +3679,8 @@ class dce_fail_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3793,6 +3880,8 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3975,6 +4064,8 @@ class dce_fail_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4164,6 +4255,8 @@ class dce_fail_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4271,6 +4364,8 @@ class dce_fail_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4360,6 +4455,8 @@ class dce_fail_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4785,6 +4882,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4872,6 +4973,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4903,6 +5006,8 @@ class expr_prop_experiment_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4937,6 +5042,8 @@ class expr_prop_experiment_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4948,6 +5055,8 @@ class expr_prop_experiment_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5112,6 +5221,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5198,6 +5311,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5229,6 +5344,8 @@ class expr_prop_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5263,6 +5380,8 @@ class expr_prop_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5274,6 +5393,8 @@ class expr_prop_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5441,6 +5562,8 @@ class expr_prop_fail_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -5509,6 +5632,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5576,6 +5701,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5650,6 +5777,8 @@ class expr_prop_fail_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5699,6 +5828,8 @@ class expr_prop_fail_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5729,6 +5860,8 @@ class expr_prop_fail_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5955,6 +6088,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6067,6 +6204,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6118,6 +6257,8 @@ class expr_prop_fail2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6165,6 +6306,8 @@ class expr_prop_fail2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6193,6 +6336,8 @@ class expr_prop_fail2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6455,6 +6600,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6835,6 +6984,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6974,6 +7125,8 @@ class expr_prop_fail3_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7111,6 +7264,8 @@ class expr_prop_fail3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7182,6 +7337,8 @@ class expr_prop_fail3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7624,6 +7781,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7817,6 +7978,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7890,6 +8053,8 @@ class expr_prop_fail4_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8021,6 +8186,8 @@ class expr_prop_fail4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8046,6 +8213,8 @@ class expr_prop_fail4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8395,20 +8564,29 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 21, column 4 to column 13)", " (in 'expr-prop-fail5.stan', line 12, column 36 to line 22, column 3)", " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -8430,9 +8608,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -8457,18 +8638,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -8532,6 +8717,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8870,6 +9059,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9076,6 +9267,8 @@ class expr_prop_fail5_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9257,6 +9450,8 @@ class expr_prop_fail5_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9290,6 +9485,8 @@ class expr_prop_fail5_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9721,21 +9918,28 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 28, column 36 to line 36, column 3)", " (in 'expr-prop-fail6.stan', line 48, column 47 to line 65, column 3)", " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -9750,9 +9954,12 @@ js_super_lp(const std::vector>& y, const std::vector& const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9774,9 +9981,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9806,13 +10016,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -9868,10 +10080,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -9886,11 +10101,13 @@ js_super_lp(const std::vector>& y, const std::vector& const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, T5__, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, T5__, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& nu = stan::math::to_ref(nu_arg__); @@ -10115,6 +10332,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -10713,6 +10934,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11164,6 +11387,8 @@ class expr_prop_fail6_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -11533,6 +11758,8 @@ class expr_prop_fail6_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11576,6 +11803,8 @@ class expr_prop_fail6_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11995,6 +12224,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12228,6 +12461,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12317,6 +12552,8 @@ class expr_prop_fail7_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -12407,6 +12644,8 @@ class expr_prop_fail7_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12444,6 +12683,8 @@ class expr_prop_fail7_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12730,6 +12971,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12916,6 +13161,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -12996,6 +13243,8 @@ class expr_prop_fail8_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -13077,6 +13326,8 @@ class expr_prop_fail8_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13120,6 +13371,8 @@ class expr_prop_fail8_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13458,20 +13711,29 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 21, column 4 to column 13)", " (in 'fails-test.stan', line 12, column 36 to line 22, column 3)", " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13493,9 +13755,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13520,18 +13785,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -13597,6 +13866,8 @@ class fails_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -13774,6 +14045,8 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -13960,6 +14233,8 @@ class fails_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14153,6 +14428,8 @@ class fails_test_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14314,6 +14591,8 @@ class fails_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14339,6 +14618,8 @@ class fails_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14589,20 +14870,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14617,10 +14900,12 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& phi = stan::math::to_ref(phi_arg__); local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14643,6 +14928,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14744,6 +15033,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14793,6 +15084,8 @@ class function_in_function_inline_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -14827,6 +15120,8 @@ class function_in_function_inline_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -14838,6 +15133,8 @@ class function_in_function_inline_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15000,18 +15297,20 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template >* = nullptr> -stan::promote_args_t +std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); template >*> -stan::promote_args_t +std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -15028,10 +15327,12 @@ do_something(const T0__& x, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& et = stan::math::to_ref(et_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -15069,6 +15370,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15182,6 +15487,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15257,6 +15564,8 @@ class function_in_function_loops_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -15291,6 +15600,8 @@ class function_in_function_loops_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15302,6 +15613,8 @@ class function_in_function_loops_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15460,6 +15773,8 @@ class fuzz_div0_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -15495,6 +15810,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15536,6 +15853,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15584,6 +15903,8 @@ class fuzz_div0_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -15618,6 +15939,8 @@ class fuzz_div0_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15629,6 +15952,8 @@ class fuzz_div0_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15804,6 +16129,8 @@ class initialize_SoA_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -15839,6 +16166,8 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15890,6 +16219,8 @@ class initialize_SoA_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -15953,6 +16284,8 @@ class initialize_SoA_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -16011,6 +16344,8 @@ class initialize_SoA_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16045,6 +16380,8 @@ class initialize_SoA_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16292,20 +16629,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -16323,10 +16662,12 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -16359,6 +16700,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16464,6 +16809,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16548,6 +16895,8 @@ class inline_functions_varmat_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -16630,6 +16979,8 @@ class inline_functions_varmat_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16657,6 +17008,8 @@ class inline_functions_varmat_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -16899,12 +17252,20 @@ static constexpr std::array locations_array__ = " (in 'inline-tdata.stan', line 10, column 3 to column 31)", " (in 'inline-tdata.stan', line 3, column 4 to column 31)", " (in 'inline-tdata.stan', line 2, column 26 to line 4, column 3)"}; +template >, + std::is_integral>>* = nullptr> Eigen::Matrix -foo(const int& N, const int& M, std::ostream* pstream__); +foo(const T0__& N, const T1__& M, std::ostream* pstream__); +template >, + std::is_integral>>*> Eigen::Matrix -foo(const int& N, const int& M, std::ostream* pstream__) { +foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -16931,6 +17292,8 @@ class inline_tdata_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -16992,6 +17355,8 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17028,6 +17393,8 @@ class inline_tdata_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17071,6 +17438,8 @@ class inline_tdata_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -17109,6 +17478,8 @@ class inline_tdata_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17128,6 +17499,8 @@ class inline_tdata_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17299,15 +17672,17 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& oR = stan::math::to_ref(oR_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -17339,6 +17714,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17433,6 +17812,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17492,6 +17873,8 @@ class inliner_same_names_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -17549,6 +17932,8 @@ class inliner_same_names_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17560,6 +17945,8 @@ class inliner_same_names_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -17889,20 +18276,28 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 48, column 47 to line 65, column 3)", " (in 'inlining-fail2.stan', line 79, column 70 to line 137, column 3)", " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -17919,11 +18314,14 @@ jolly_seber_lp(const std::vector>& y, template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -17945,9 +18343,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -17977,13 +18378,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> +Eigen::Matrix, + stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -18039,9 +18442,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, @@ -18055,11 +18462,13 @@ jolly_seber_lp(const std::vector>& y, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); const auto& gamma = stan::math::to_ref(gamma_arg__); @@ -18275,10 +18684,12 @@ jolly_seber_lp(const std::vector>& y, template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& gamma = stan::math::to_ref(gamma_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -18331,6 +18742,8 @@ class inlining_fail2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -18487,6 +18900,8 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -18896,6 +19311,8 @@ class inlining_fail2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19312,6 +19729,8 @@ class inlining_fail2_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -19673,6 +20092,8 @@ class inlining_fail2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -19712,6 +20133,8 @@ class inlining_fail2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20086,6 +20509,8 @@ class lcm_experiment_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -20149,6 +20574,8 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20173,6 +20600,8 @@ class lcm_experiment_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20204,6 +20633,8 @@ class lcm_experiment_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -20238,6 +20669,8 @@ class lcm_experiment_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20249,6 +20682,8 @@ class lcm_experiment_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20411,6 +20846,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20493,6 +20932,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20547,6 +20988,8 @@ class lcm_experiment2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -20585,6 +21028,8 @@ class lcm_experiment2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20604,6 +21049,8 @@ class lcm_experiment2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20778,6 +21225,8 @@ class lcm_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -20835,6 +21284,8 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20870,6 +21321,8 @@ class lcm_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20912,6 +21365,8 @@ class lcm_fails_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -20950,6 +21405,8 @@ class lcm_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20970,6 +21427,8 @@ class lcm_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21205,20 +21664,29 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 21, column 4 to column 13)", " (in 'lcm-fails2.stan', line 12, column 36 to line 22, column 3)", " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; +template >* = nullptr> int first_capture(const std::vector& y_i, std::ostream* pstream__); +template >* = nullptr> int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__); +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +template >*> int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -21240,9 +21708,12 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +template >*> int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -21267,18 +21738,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +template >, + std::is_integral>, + stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>,-1,-1> -prob_uncaptured(const int& nind, const int& n_occasions, const T2__& p_arg__, - const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, - stan::base_type_t>; +Eigen::Matrix, + stan::base_type_t>>,-1,-1> +prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& + p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& p = stan::math::to_ref(p_arg__); const auto& phi = stan::math::to_ref(phi_arg__); static constexpr bool propto__ = true; @@ -21342,6 +21817,8 @@ class lcm_fails2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -21479,6 +21956,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21660,6 +22139,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -21848,6 +22329,8 @@ class lcm_fails2_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22004,6 +22487,8 @@ class lcm_fails2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22027,6 +22512,8 @@ class lcm_fails2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22264,22 +22751,26 @@ static constexpr std::array locations_array__ = template , stan::is_stan_scalar>* = nullptr> -stan::promote_args_t +std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__); +template >, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); +std::decay_t> +baz_lpdf(const T0__& x, std::ostream* pstream__); template , stan::is_stan_scalar>*> -stan::promote_args_t +std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22290,12 +22781,15 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +template >, + stan::is_stan_scalar>*> +std::decay_t> +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22308,9 +22802,12 @@ bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { } template >*> -stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +baz_lpdf(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22330,6 +22827,8 @@ class lupdf_inlining_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -22375,6 +22874,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22437,6 +22938,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22506,6 +23009,8 @@ class lupdf_inlining_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -22579,6 +23084,8 @@ class lupdf_inlining_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22598,6 +23105,8 @@ class lupdf_inlining_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22852,6 +23361,8 @@ class off_dce_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -22994,6 +23505,8 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23075,6 +23588,8 @@ class off_dce_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23163,6 +23678,8 @@ class off_dce_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -23283,6 +23800,8 @@ class off_dce_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23314,6 +23833,8 @@ class off_dce_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23623,6 +24144,8 @@ class off_small_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -23761,6 +24284,8 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23864,6 +24389,8 @@ class off_small_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -23974,6 +24501,8 @@ class off_small_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -24085,6 +24614,8 @@ class off_small_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24136,6 +24667,8 @@ class off_small_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24533,23 +25066,29 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 11, column 8 to column 21)", " (in 'optimizations.stan', line 16, column 8 to column 18)", " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; -template >* = nullptr> + stan::require_all_t, + std::is_integral>>* = nullptr> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__); -int rfun(const int& y, std::ostream* pstream__); +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__); +template >>* = nullptr> +int rfun(const T0__& y, std::ostream* pstream__); template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); -template >*> + stan::require_all_t, + std::is_integral>>*> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24565,9 +25104,13 @@ nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int rfun(const int& y, std::ostream* pstream__) { +template >>*> +int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -24590,6 +25133,8 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24611,6 +25156,8 @@ class optimizations_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -24646,6 +25193,8 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -24975,6 +25524,8 @@ class optimizations_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25313,6 +25864,8 @@ class optimizations_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -25369,6 +25922,8 @@ class optimizations_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25410,6 +25965,8 @@ class optimizations_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25680,12 +26237,18 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template >* = nullptr> -stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); -double dumb(const int& x, std::ostream* pstream__); +std::decay_t> +dumb(const T0__& x, std::ostream* pstream__); +template >>* = nullptr> +double dumb(const T0__& x, std::ostream* pstream__); template >*> -stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +std::decay_t> +dumb(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25699,9 +26262,13 @@ stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -double dumb(const int& x, std::ostream* pstream__) { +template >>*> +double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25724,6 +26291,8 @@ class overloaded_fn_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -25759,6 +26328,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25789,6 +26360,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25826,6 +26399,8 @@ class overloaded_fn_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -25860,6 +26435,8 @@ class overloaded_fn_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -25871,6 +26448,8 @@ class overloaded_fn_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26026,21 +26605,23 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t> +std::decay_t>> foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -stan::promote_args_t> +std::decay_t>> foo(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -26059,6 +26640,8 @@ template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26071,10 +26654,12 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { } } template >*> -Eigen::Matrix,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26097,6 +26682,8 @@ class overloaded_fn2_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -26132,6 +26719,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26163,6 +26752,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26201,6 +26792,8 @@ class overloaded_fn2_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26235,6 +26828,8 @@ class overloaded_fn2_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26246,6 +26841,8 @@ class overloaded_fn2_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26404,6 +27001,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26476,6 +27077,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26520,6 +27123,8 @@ class partial_eval_tuple_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -26565,6 +27170,8 @@ class partial_eval_tuple_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26576,6 +27183,8 @@ class partial_eval_tuple_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26799,6 +27408,8 @@ class partial_eval_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -26936,6 +27547,8 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27023,6 +27636,8 @@ class partial_eval_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27117,6 +27732,8 @@ class partial_eval_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -27196,6 +27813,8 @@ class partial_eval_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27235,6 +27854,8 @@ class partial_eval_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27512,6 +28133,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27663,6 +28288,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27728,6 +28355,8 @@ class partial_eval_multiply_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -27770,6 +28399,8 @@ class partial_eval_multiply_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -27797,6 +28428,8 @@ class partial_eval_multiply_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28033,6 +28666,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28121,6 +28758,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28152,6 +28791,8 @@ class partial_eval_zeros_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -28186,6 +28827,8 @@ class partial_eval_zeros_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28197,6 +28840,8 @@ class partial_eval_zeros_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28393,6 +29038,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28606,6 +29255,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28702,6 +29353,8 @@ class stalled1_failure_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -28773,6 +29426,8 @@ class stalled1_failure_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -28821,6 +29476,8 @@ class stalled1_failure_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29086,6 +29743,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29184,6 +29845,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29240,6 +29903,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -29303,6 +29968,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29322,6 +29989,8 @@ class unenforce_initialize_should_fail_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29525,6 +30194,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29612,6 +30285,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29671,6 +30346,8 @@ class unenforce_initialize_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -29738,6 +30415,8 @@ class unenforce_initialize_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29757,6 +30436,8 @@ class unenforce_initialize_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -29969,6 +30650,8 @@ class unroll_limit_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -30004,6 +30687,8 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30028,6 +30713,8 @@ class unroll_limit_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30059,6 +30746,8 @@ class unroll_limit_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -30120,6 +30809,8 @@ class unroll_limit_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -30131,6 +30822,8 @@ class unroll_limit_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index e128fe1ac..26e1db157 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -61,6 +61,8 @@ class ad_scalar_data_matrix_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -319,6 +323,8 @@ class ad_scalar_data_matrix_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -514,6 +520,8 @@ class ad_scalar_data_matrix_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -562,6 +570,8 @@ class ad_scalar_data_matrix_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -592,6 +602,8 @@ class ad_scalar_data_matrix_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -799,6 +811,8 @@ class complex_fails_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -834,6 +848,8 @@ class complex_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -872,6 +888,8 @@ class complex_fails_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -917,6 +935,8 @@ class complex_fails_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -967,6 +987,8 @@ class complex_fails_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -989,6 +1011,8 @@ class complex_fails_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1325,6 +1349,8 @@ class constraints_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -1585,6 +1611,8 @@ class constraints_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1889,6 +1917,8 @@ class constraints_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2256,6 +2286,8 @@ class constraints_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -2590,6 +2622,8 @@ class constraints_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2746,6 +2780,8 @@ class constraints_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3546,6 +3582,8 @@ class deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3660,6 +3700,8 @@ class deep_dependence_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3746,6 +3788,8 @@ class deep_dependence_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3849,6 +3893,8 @@ class deep_dependence_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3871,6 +3917,8 @@ class deep_dependence_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4285,15 +4333,21 @@ static constexpr std::array locations_array__ = " (in 'indexing.stan', line 2, column 22 to line 4, column 3)", " (in 'indexing.stan', line 6, column 4 to column 13)", " (in 'indexing.stan', line 5, column 27 to line 7, column 3)"}; -int mask_fun(const int& i, std::ostream* pstream__); +template >>* = nullptr> +int mask_fun(const T0__& i, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__); -int mask_fun(const int& i, std::ostream* pstream__) { +template >>*> +int mask_fun(const T0__& i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -4310,10 +4364,12 @@ int mask_fun(const int& i, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix>>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -4343,6 +4399,8 @@ class indexing_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -4540,6 +4598,8 @@ class indexing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4954,6 +5014,8 @@ class indexing_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5417,6 +5479,8 @@ class indexing_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5660,6 +5724,8 @@ class indexing_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5829,6 +5895,8 @@ class indexing_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6758,6 +6826,8 @@ class indexing2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -6817,6 +6887,8 @@ class indexing2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6891,6 +6963,8 @@ class indexing2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6977,6 +7051,8 @@ class indexing2_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7022,6 +7098,8 @@ class indexing2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7048,6 +7126,8 @@ class indexing2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7251,22 +7331,25 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -7285,12 +7368,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -7314,6 +7400,8 @@ class reductions_allowed_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7423,6 +7513,8 @@ class reductions_allowed_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7497,6 +7589,8 @@ class reductions_allowed_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7580,6 +7674,8 @@ class reductions_allowed_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7616,6 +7712,8 @@ class reductions_allowed_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7932,11 +8030,13 @@ Eigen::Matrix empty_user_func(std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__); Eigen::Matrix empty_user_func(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7955,10 +8055,12 @@ Eigen::Matrix empty_user_func(std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& A = stan::math::to_ref(A_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -7983,6 +8085,8 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8087,6 +8193,8 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8166,6 +8274,8 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8257,6 +8367,8 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8286,6 +8398,8 @@ class return_types_and_udfs_demotes_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8610,6 +8724,8 @@ class single_indexing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8707,6 +8825,8 @@ class single_indexing_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8785,6 +8905,8 @@ class single_indexing_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8861,6 +8983,8 @@ class single_indexing_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8890,6 +9014,8 @@ class single_indexing_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9134,22 +9260,25 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& x = stan::math::to_ref(x_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -9168,12 +9297,15 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix>,-1,-1> +Eigen::Matrix>>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -9197,6 +9329,8 @@ class tp_reused_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -9242,6 +9376,8 @@ class tp_reused_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9288,6 +9424,8 @@ class tp_reused_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9341,6 +9479,8 @@ class tp_reused_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9401,6 +9541,8 @@ class tp_reused_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9430,6 +9572,8 @@ class tp_reused_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9693,6 +9837,8 @@ class tuple_test_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -9746,6 +9892,8 @@ class tuple_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9801,6 +9949,8 @@ class tuple_test_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9863,6 +10013,8 @@ class tuple_test_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9943,6 +10095,8 @@ class tuple_test_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9992,6 +10146,8 @@ class tuple_test_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index b02d1d4e4..c017e21a4 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -51,6 +51,8 @@ class arrays_tuples_nested_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -928,6 +932,8 @@ class arrays_tuples_nested_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1185,6 +1191,8 @@ class arrays_tuples_nested_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -1504,6 +1512,8 @@ class arrays_tuples_nested_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -1806,6 +1816,8 @@ class arrays_tuples_nested_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -2934,6 +2946,8 @@ class infer_tuple_ad_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -2969,6 +2983,8 @@ class infer_tuple_ad_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3011,6 +3027,8 @@ class infer_tuple_ad_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3060,6 +3078,8 @@ class infer_tuple_ad_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3098,6 +3118,8 @@ class infer_tuple_ad_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3117,6 +3139,8 @@ class infer_tuple_ad_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3286,6 +3310,8 @@ class simple_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3338,6 +3364,8 @@ class simple_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3362,6 +3390,8 @@ class simple_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3393,6 +3423,8 @@ class simple_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3427,6 +3459,8 @@ class simple_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3438,6 +3472,8 @@ class simple_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3594,6 +3630,8 @@ class simple2_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3651,6 +3689,8 @@ class simple2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3675,6 +3715,8 @@ class simple2_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3706,6 +3748,8 @@ class simple2_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -3740,6 +3784,8 @@ class simple2_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3751,6 +3797,8 @@ class simple2_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -3907,6 +3955,8 @@ class simple3_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -3979,6 +4029,8 @@ class simple3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4003,6 +4055,8 @@ class simple3_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4034,6 +4088,8 @@ class simple3_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4068,6 +4124,8 @@ class simple3_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4079,6 +4137,8 @@ class simple3_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4238,6 +4298,8 @@ class tuple_constraints_data_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4425,6 +4489,8 @@ class tuple_constraints_data_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4456,6 +4522,8 @@ class tuple_constraints_data_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -4490,6 +4558,8 @@ class tuple_constraints_data_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4501,6 +4571,8 @@ class tuple_constraints_data_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4659,6 +4731,8 @@ std::tuple foo(std::ostream* pstream__); std::tuple foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -4683,6 +4757,8 @@ class tuple_constraints_params_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4865,6 +4943,8 @@ class tuple_constraints_params_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -4991,6 +5071,8 @@ class tuple_constraints_params_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5132,6 +5214,8 @@ class tuple_constraints_params_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5260,6 +5344,8 @@ class tuple_constraints_params_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5787,6 +5873,8 @@ double foo(const std::tuple& x, std::ostream* pstream__); double foo(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5809,6 +5897,8 @@ class tuple_dataonly_model final : public model_base_crtp random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -5860,6 +5950,8 @@ class tuple_dataonly_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5890,6 +5982,8 @@ class tuple_dataonly_model final : public model_base_crtp stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5927,6 +6021,8 @@ class tuple_dataonly_model final : public model_base_crtp // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -5961,6 +6057,8 @@ class tuple_dataonly_model final : public model_base_crtp stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -5972,6 +6070,8 @@ class tuple_dataonly_model final : public model_base_crtp using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6108,59 +6208,69 @@ stan::math::profile_map& get_stan_profile_data() { return tuple_dataonly_model_namespace::profiles__; } #endif - $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-foreach.stan + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-dataonly2.stan // Code generated by %%NAME%% %%VERSION%% #include -namespace tuple_foreach_model_namespace { +namespace tuple_dataonly2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-foreach.stan', line 2, column 4 to column 37)", - " (in 'tuple-foreach.stan', line 3, column 4 to line 4, column 5)"}; -class tuple_foreach_model final : public model_base_crtp { + " (in 'tuple-dataonly2.stan', line 7, column 2 to column 34)", + " (in 'tuple-dataonly2.stan', line 3, column 4 to column 18)", + " (in 'tuple-dataonly2.stan', line 2, column 53 to line 4, column 3)"}; +double +tuple_tester(const std::tuple, int>& x, std::ostream* + pstream__); +double +tuple_tester(const std::tuple, int>& x, std::ostream* + pstream__) { + using local_scalar_t__ = double; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 2; + return stan::model::rvalue(std::get<0>(x), "x.1", + stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +class tuple_dataonly2_model final : public model_base_crtp { private: - std::vector> arr; + public: - ~tuple_foreach_model() {} - tuple_foreach_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_dataonly2_model() {} + tuple_dataonly2_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_foreach_model_namespace::tuple_foreach_model"; + "tuple_dataonly2_model_namespace::tuple_dataonly2_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - int pos__ = std::numeric_limits::min(); - pos__ = 1; - current_statement__ = 1; - arr = std::vector>(100, - std::tuple{std::numeric_limits::quiet_NaN( - ), - std::numeric_limits::quiet_NaN()}); - current_statement__ = 2; - for (int sym1__ = 1; sym1__ <= stan::math::size(arr); ++sym1__) { - std::tuple t; - current_statement__ = 2; - stan::model::assign(t, arr[(sym1__ - 1)], "assigning variable t"); - } - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_foreach_model"; + return "tuple_dataonly2_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -6180,13 +6290,27 @@ class tuple_foreach_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_foreach_model_namespace::log_prob"; + "tuple_dataonly2_model_namespace::log_prob"; // suppress unused var warning (void) function__; + try { + current_statement__ = 1; + if (pstream__) { + stan::math::stan_print(pstream__, + tuple_tester( + std::tuple, int>(std::vector{1.0}, 2), + pstream__)); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6204,13 +6328,27 @@ class tuple_foreach_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_foreach_model_namespace::log_prob"; + "tuple_dataonly2_model_namespace::log_prob"; // suppress unused var warning (void) function__; + try { + current_statement__ = 1; + if (pstream__) { + stan::math::stan_print(pstream__, + tuple_tester( + std::tuple, int>(std::vector{1.0}, 2), + pstream__)); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6235,6 +6373,8 @@ class tuple_foreach_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6243,7 +6383,7 @@ class tuple_foreach_model final : public model_base_crtp { // suppress unused var warning (void) jacobian__; static constexpr const char* function__ = - "tuple_foreach_model_namespace::write_array"; + "tuple_dataonly2_model_namespace::write_array"; // suppress unused var warning (void) function__; try { @@ -6269,6 +6409,8 @@ class tuple_foreach_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6280,6 +6422,8 @@ class tuple_foreach_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6403,7 +6547,7 @@ class tuple_foreach_model final : public model_base_crtp { } }; } -using stan_model = tuple_foreach_model_namespace::tuple_foreach_model; +using stan_model = tuple_dataonly2_model_namespace::tuple_dataonly2_model; #ifndef USING_R // Boilerplate stan::model::model_base& @@ -6413,38 +6557,38 @@ new_model(stan::io::var_context& data_context, unsigned int seed, return *m; } stan::math::profile_map& get_stan_profile_data() { - return tuple_foreach_model_namespace::profiles__; + return tuple_dataonly2_model_namespace::profiles__; } #endif - $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-full.stan + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-foreach.stan // Code generated by %%NAME%% %%VERSION%% #include -namespace tuple_full_model_namespace { +namespace tuple_foreach_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-full.stan', line 5, column 2 to column 41)", - " (in 'tuple-full.stan', line 8, column 2 to column 25)", - " (in 'tuple-full.stan', line 10, column 2 to column 41)", - " (in 'tuple-full.stan', line 2, column 2 to column 69)"}; -class tuple_full_model final : public model_base_crtp { + " (in 'tuple-foreach.stan', line 2, column 4 to column 37)", + " (in 'tuple-foreach.stan', line 3, column 4 to line 4, column 5)"}; +class tuple_foreach_model final : public model_base_crtp { private: - std::tuple, std::vector>> ds; + std::vector> arr; public: - ~tuple_full_model() {} - tuple_full_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_foreach_model() {} + tuple_foreach_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_full_model_namespace::tuple_full_model"; + "tuple_foreach_model_namespace::tuple_foreach_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -6453,35 +6597,24 @@ class tuple_full_model final : public model_base_crtp { try { int pos__ = std::numeric_limits::min(); pos__ = 1; - current_statement__ = 4; - context__.validate_dims("data initialization", "ds.1", "int", - std::vector{}); - context__.validate_dims("data initialization", "ds.2.1", "int", - std::vector{static_cast(2)}); - context__.validate_dims("data initialization", "ds.2.2", "int", - std::vector{static_cast(2)}); - ds = std::tuple, std::vector>>{ - std::numeric_limits::min(), - std::tuple, std::vector>{std::vector(2, - std::numeric_limits::min( - )), - std::vector(2, std::numeric_limits::min())}}; - current_statement__ = 4; - std::get<0>(ds) = context__.vals_i("ds.1")[(1 - 1)]; - std::get<0>(std::get<1>(ds)) = context__.vals_i("ds.2.1"); - std::get<1>(std::get<1>(ds)) = context__.vals_i("ds.2.2"); - current_statement__ = 4; - stan::math::check_greater_or_equal(function__, "ds.1", std::get<0>(ds), - 0); - current_statement__ = 4; - stan::math::check_less_or_equal(function__, "ds.1", std::get<0>(ds), 1); + current_statement__ = 1; + arr = std::vector>(100, + std::tuple{std::numeric_limits::quiet_NaN( + ), + std::numeric_limits::quiet_NaN()}); + current_statement__ = 2; + for (int sym1__ = 1; sym1__ <= stan::math::size(arr); ++sym1__) { + std::tuple t; + current_statement__ = 2; + stan::model::assign(t, arr[(sym1__ - 1)], "assigning variable t"); + } } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } - num_params_r__ = (1 + 1); + num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_full_model"; + return "tuple_foreach_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -6501,37 +6634,15 @@ class tuple_full_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_full_model_namespace::log_prob"; + "tuple_foreach_model_namespace::log_prob"; // suppress unused var warning (void) function__; - try { - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = in__.template read_constrain_lb(0, lp__); - current_statement__ = 1; - std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); - { - current_statement__ = 2; - lp_accum__.add(stan::math::bernoulli_lpmf(std::get<0>(ds), - std::get<0>(ps))); - current_statement__ = 3; - lp_accum__.add(((std::get<1>(ps) + - stan::model::rvalue(std::get<0>(std::get<1>(ds)), "ds.2.1", - stan::model::index_uni(1))) + - stan::model::rvalue(std::get<1>(std::get<1>(ds)), "ds.2.2", - stan::model::index_uni(2)))); - } - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6549,37 +6660,15 @@ class tuple_full_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_full_model_namespace::log_prob"; + "tuple_foreach_model_namespace::log_prob"; // suppress unused var warning (void) function__; - try { - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = in__.template read_constrain_lb(0, lp__); - current_statement__ = 1; - std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); - { - current_statement__ = 2; - lp_accum__.add(stan::math::bernoulli_lpmf(std::get<0>(ds), - std::get<0>(ps))); - current_statement__ = 3; - lp_accum__.add(((std::get<1>(ps) + - stan::model::rvalue(std::get<0>(std::get<1>(ds)), "ds.2.1", - stan::model::index_uni(1))) + - stan::model::rvalue(std::get<1>(std::get<1>(ds)), "ds.2.2", - stan::model::index_uni(2)))); - } - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6604,6 +6693,8 @@ class tuple_full_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6612,21 +6703,10 @@ class tuple_full_model final : public model_base_crtp { // suppress unused var warning (void) jacobian__; static constexpr const char* function__ = - "tuple_full_model_namespace::write_array"; + "tuple_foreach_model_namespace::write_array"; // suppress unused var warning (void) function__; try { - std::tuple ps = - std::tuple{std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN()}; - current_statement__ = 1; - std::get<0>(ps) = in__.template read_constrain_lb(0, lp__); - current_statement__ = 1; - std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); - out__.write(std::get<0>(ps)); - out__.write(std::get<1>(ps)); if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { @@ -6649,22 +6729,11 @@ class tuple_full_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = in__.read(); - current_statement__ = 1; - std::get<1>(ps) = in__.read(); - out__.write_free_lb(0, std::get<0>(ps)); - out__.write_free_lb(0, std::get<1>(ps)); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } } template * = nullptr> inline void @@ -6673,34 +6742,17 @@ class tuple_full_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - current_statement__ = 1; - context__.validate_dims("parameter initialization", "ps.1", "double", - std::vector{}); - context__.validate_dims("parameter initialization", "ps.2", "double", - std::vector{}); - int pos__ = std::numeric_limits::min(); - pos__ = 1; - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = context__.vals_r("ps.1")[(1 - 1)]; - std::get<1>(ps) = context__.vals_r("ps.2")[(1 - 1)]; - out__.write_free_lb(0, std::get<0>(ps)); - out__.write_free_lb(0, std::get<1>(ps)); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } } inline void get_param_names(std::vector& names__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - names__ = std::vector{"ps.1", "ps.2"}; + names__ = std::vector{}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -6708,8 +6760,7 @@ class tuple_full_model final : public model_base_crtp { get_dims(std::vector>& dimss__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - dimss__ = std::vector>{std::vector{}, - std::vector{}}; + dimss__ = std::vector>{}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -6717,10 +6768,6 @@ class tuple_full_model final : public model_base_crtp { constrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(2)); if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -6728,18 +6775,14 @@ class tuple_full_model final : public model_base_crtp { unconstrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(2)); if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline std::string get_constrained_sizedtypes() const { - return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); + return std::string("[]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); + return std::string("[]"); } // Begin method overload boilerplate template inline void @@ -6748,7 +6791,7 @@ class tuple_full_model final : public model_base_crtp { emit_transformed_parameters = true, const bool emit_generated_quantities = true, std::ostream* pstream = nullptr) const { - const size_t num_params__ = (1 + 1); + const size_t num_params__ = 0; const size_t num_transformed = emit_transformed_parameters * (0); const size_t num_gen_quantities = emit_generated_quantities * (0); const size_t num_to_write = num_params__ + num_transformed + @@ -6765,7 +6808,7 @@ class tuple_full_model final : public model_base_crtp { emit_transformed_parameters = true, bool emit_generated_quantities = true, std::ostream* pstream = nullptr) const { - const size_t num_params__ = (1 + 1); + const size_t num_params__ = 0; const size_t num_transformed = emit_transformed_parameters * (0); const size_t num_gen_quantities = emit_generated_quantities * (0); const size_t num_to_write = num_params__ + num_transformed + @@ -6824,7 +6867,7 @@ class tuple_full_model final : public model_base_crtp { } }; } -using stan_model = tuple_full_model_namespace::tuple_full_model; +using stan_model = tuple_foreach_model_namespace::tuple_foreach_model; #ifndef USING_R // Boilerplate stan::model::model_base& @@ -6834,36 +6877,40 @@ new_model(stan::io::var_context& data_context, unsigned int seed, return *m; } stan::math::profile_map& get_stan_profile_data() { - return tuple_full_model_namespace::profiles__; + return tuple_foreach_model_namespace::profiles__; } #endif - $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-ix-assign.stan + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-full.stan // Code generated by %%NAME%% %%VERSION%% #include -namespace tuple_ix_assign_model_namespace { +namespace tuple_full_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-ix-assign.stan', line 2, column 2 to column 20)", - " (in 'tuple-ix-assign.stan', line 3, column 2 to column 10)"}; -class tuple_ix_assign_model final : public model_base_crtp { + " (in 'tuple-full.stan', line 5, column 2 to column 41)", + " (in 'tuple-full.stan', line 8, column 2 to column 25)", + " (in 'tuple-full.stan', line 10, column 2 to column 41)", + " (in 'tuple-full.stan', line 2, column 2 to column 69)"}; +class tuple_full_model final : public model_base_crtp { private: - std::tuple x; + std::tuple, std::vector>> ds; public: - ~tuple_ix_assign_model() {} - tuple_ix_assign_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_full_model() {} + tuple_full_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_ix_assign_model_namespace::tuple_ix_assign_model"; + "tuple_full_model_namespace::tuple_full_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -6872,18 +6919,35 @@ class tuple_ix_assign_model final : public model_base_crtp::min(); pos__ = 1; - current_statement__ = 1; - x = std::tuple{std::numeric_limits::min(), - std::numeric_limits::min()}; - current_statement__ = 2; - std::get<0>(x) = 5; + current_statement__ = 4; + context__.validate_dims("data initialization", "ds.1", "int", + std::vector{}); + context__.validate_dims("data initialization", "ds.2.1", "int", + std::vector{static_cast(2)}); + context__.validate_dims("data initialization", "ds.2.2", "int", + std::vector{static_cast(2)}); + ds = std::tuple, std::vector>>{ + std::numeric_limits::min(), + std::tuple, std::vector>{std::vector(2, + std::numeric_limits::min( + )), + std::vector(2, std::numeric_limits::min())}}; + current_statement__ = 4; + std::get<0>(ds) = context__.vals_i("ds.1")[(1 - 1)]; + std::get<0>(std::get<1>(ds)) = context__.vals_i("ds.2.1"); + std::get<1>(std::get<1>(ds)) = context__.vals_i("ds.2.2"); + current_statement__ = 4; + stan::math::check_greater_or_equal(function__, "ds.1", std::get<0>(ds), + 0); + current_statement__ = 4; + stan::math::check_less_or_equal(function__, "ds.1", std::get<0>(ds), 1); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } - num_params_r__ = 0U; + num_params_r__ = (1 + 1); } inline std::string model_name() const final { - return "tuple_ix_assign_model"; + return "tuple_full_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -6903,13 +6967,39 @@ class tuple_ix_assign_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign_model_namespace::log_prob"; + "tuple_full_model_namespace::log_prob"; // suppress unused var warning (void) function__; + try { + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = in__.template read_constrain_lb(0, lp__); + current_statement__ = 1; + std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + { + current_statement__ = 2; + lp_accum__.add(stan::math::bernoulli_lpmf(std::get<0>(ds), + std::get<0>(ps))); + current_statement__ = 3; + lp_accum__.add(((std::get<1>(ps) + + stan::model::rvalue(std::get<0>(std::get<1>(ds)), "ds.2.1", + stan::model::index_uni(1))) + + stan::model::rvalue(std::get<1>(std::get<1>(ds)), "ds.2.2", + stan::model::index_uni(2)))); + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6927,13 +7017,39 @@ class tuple_ix_assign_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign_model_namespace::log_prob"; + "tuple_full_model_namespace::log_prob"; // suppress unused var warning (void) function__; + try { + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = in__.template read_constrain_lb(0, lp__); + current_statement__ = 1; + std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + { + current_statement__ = 2; + lp_accum__.add(stan::math::bernoulli_lpmf(std::get<0>(ds), + std::get<0>(ps))); + current_statement__ = 3; + lp_accum__.add(((std::get<1>(ps) + + stan::model::rvalue(std::get<0>(std::get<1>(ds)), "ds.2.1", + stan::model::index_uni(1))) + + stan::model::rvalue(std::get<1>(std::get<1>(ds)), "ds.2.2", + stan::model::index_uni(2)))); + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -6958,6 +7074,8 @@ class tuple_ix_assign_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -6966,10 +7084,21 @@ class tuple_ix_assign_model final : public model_base_crtp ps = + std::tuple{std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN()}; + current_statement__ = 1; + std::get<0>(ps) = in__.template read_constrain_lb(0, lp__); + current_statement__ = 1; + std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + out__.write(std::get<0>(ps)); + out__.write(std::get<1>(ps)); if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { @@ -6992,9 +7121,24 @@ class tuple_ix_assign_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; + try { + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = in__.read(); + current_statement__ = 1; + std::get<1>(ps) = in__.read(); + out__.write_free_lb(0, std::get<0>(ps)); + out__.write_free_lb(0, std::get<1>(ps)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } } template * = nullptr> inline void @@ -7003,15 +7147,36 @@ class tuple_ix_assign_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "ps.1", "double", + std::vector{}); + context__.validate_dims("parameter initialization", "ps.2", "double", + std::vector{}); + int pos__ = std::numeric_limits::min(); + pos__ = 1; + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = context__.vals_r("ps.1")[(1 - 1)]; + std::get<1>(ps) = context__.vals_r("ps.2")[(1 - 1)]; + out__.write_free_lb(0, std::get<0>(ps)); + out__.write_free_lb(0, std::get<1>(ps)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } } inline void get_param_names(std::vector& names__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - names__ = std::vector{}; + names__ = std::vector{"ps.1", "ps.2"}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -7019,7 +7184,8 @@ class tuple_ix_assign_model final : public model_base_crtp>& dimss__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - dimss__ = std::vector>{}; + dimss__ = std::vector>{std::vector{}, + std::vector{}}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -7027,6 +7193,10 @@ class tuple_ix_assign_model final : public model_base_crtp& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(2)); if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -7034,14 +7204,18 @@ class tuple_ix_assign_model final : public model_base_crtp& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(2)); if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline std::string get_constrained_sizedtypes() const { - return std::string("[]"); + return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[]"); + return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); } // Begin method overload boilerplate template inline void @@ -7050,7 +7224,7 @@ class tuple_ix_assign_model final : public model_base_crtp -namespace tuple_ix_assign2_model_namespace { +namespace tuple_ix_assign_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-ix-assign2.stan', line 2, column 2 to column 30)", - " (in 'tuple-ix-assign2.stan', line 3, column 2 to column 13)"}; -class tuple_ix_assign2_model final : public model_base_crtp { + " (in 'tuple-ix-assign.stan', line 2, column 2 to column 20)", + " (in 'tuple-ix-assign.stan', line 3, column 2 to column 10)"}; +class tuple_ix_assign_model final : public model_base_crtp { private: - std::tuple, int> x; + std::tuple x; public: - ~tuple_ix_assign2_model() {} - tuple_ix_assign2_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_ix_assign_model() {} + tuple_ix_assign_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_ix_assign2_model_namespace::tuple_ix_assign2_model"; + "tuple_ix_assign_model_namespace::tuple_ix_assign_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -7175,19 +7351,17 @@ class tuple_ix_assign2_model final : public model_base_crtp::min(); pos__ = 1; current_statement__ = 1; - x = std::tuple, int>{std::vector(10, - std::numeric_limits::min()), + x = std::tuple{std::numeric_limits::min(), std::numeric_limits::min()}; current_statement__ = 2; - stan::model::assign(std::get<0>(x), 5, "assigning variable x.1", - stan::model::index_uni(1)); + std::get<0>(x) = 5; } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_ix_assign2_model"; + return "tuple_ix_assign_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -7207,11 +7381,13 @@ class tuple_ix_assign2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign2_model_namespace::log_prob"; + "tuple_ix_assign_model_namespace::log_prob"; // suppress unused var warning (void) function__; lp_accum__.add(lp__); @@ -7231,11 +7407,13 @@ class tuple_ix_assign2_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign2_model_namespace::log_prob"; + "tuple_ix_assign_model_namespace::log_prob"; // suppress unused var warning (void) function__; lp_accum__.add(lp__); @@ -7262,6 +7440,8 @@ class tuple_ix_assign2_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7270,7 +7450,7 @@ class tuple_ix_assign2_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7307,6 +7489,8 @@ class tuple_ix_assign2_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7430,7 +7614,7 @@ class tuple_ix_assign2_model final : public model_base_crtp -namespace tuple_ix_assign3_model_namespace { +namespace tuple_ix_assign2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-ix-assign3.stan', line 2, column 2 to column 30)", - " (in 'tuple-ix-assign3.stan', line 3, column 2 to column 13)"}; -class tuple_ix_assign3_model final : public model_base_crtp { + " (in 'tuple-ix-assign2.stan', line 2, column 2 to column 30)", + " (in 'tuple-ix-assign2.stan', line 3, column 2 to column 13)"}; +class tuple_ix_assign2_model final : public model_base_crtp { private: - std::vector> x; + std::tuple, int> x; public: - ~tuple_ix_assign3_model() {} - tuple_ix_assign3_model(stan::io::var_context& context__, unsigned int + ~tuple_ix_assign2_model() {} + tuple_ix_assign2_model(stan::io::var_context& context__, unsigned int random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_ix_assign3_model_namespace::tuple_ix_assign3_model"; + "tuple_ix_assign2_model_namespace::tuple_ix_assign2_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -7479,18 +7665,19 @@ class tuple_ix_assign3_model final : public model_base_crtp::min(); pos__ = 1; current_statement__ = 1; - x = std::vector>(10, - std::tuple{std::numeric_limits::min(), - std::numeric_limits::min()}); + x = std::tuple, int>{std::vector(10, + std::numeric_limits::min()), + std::numeric_limits::min()}; current_statement__ = 2; - std::get<0>(x[(1 - 1)]) = 5; + stan::model::assign(std::get<0>(x), 5, "assigning variable x.1", + stan::model::index_uni(1)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_ix_assign3_model"; + return "tuple_ix_assign2_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -7510,11 +7697,13 @@ class tuple_ix_assign3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign3_model_namespace::log_prob"; + "tuple_ix_assign2_model_namespace::log_prob"; // suppress unused var warning (void) function__; lp_accum__.add(lp__); @@ -7534,11 +7723,13 @@ class tuple_ix_assign3_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign3_model_namespace::log_prob"; + "tuple_ix_assign2_model_namespace::log_prob"; // suppress unused var warning (void) function__; lp_accum__.add(lp__); @@ -7565,6 +7756,8 @@ class tuple_ix_assign3_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7573,7 +7766,7 @@ class tuple_ix_assign3_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7610,6 +7805,8 @@ class tuple_ix_assign3_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7733,7 +7930,7 @@ class tuple_ix_assign3_model final : public model_base_crtp -namespace tuple_ix_assign4_model_namespace { +namespace tuple_ix_assign3_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-ix-assign4.stan', line 2, column 2 to column 54)", - " (in 'tuple-ix-assign4.stan', line 3, column 2 to column 15)"}; -class tuple_ix_assign4_model final : public model_base_crtp { + " (in 'tuple-ix-assign3.stan', line 2, column 2 to column 30)", + " (in 'tuple-ix-assign3.stan', line 3, column 2 to column 13)"}; +class tuple_ix_assign3_model final : public model_base_crtp { private: - std::tuple>>, int> x; + std::vector> x; public: - ~tuple_ix_assign4_model() {} - tuple_ix_assign4_model(stan::io::var_context& context__, unsigned int + ~tuple_ix_assign3_model() {} + tuple_ix_assign3_model(stan::io::var_context& context__, unsigned int random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_ix_assign4_model_namespace::tuple_ix_assign4_model"; + "tuple_ix_assign3_model_namespace::tuple_ix_assign3_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -7782,22 +7981,18 @@ class tuple_ix_assign4_model final : public model_base_crtp::min(); pos__ = 1; current_statement__ = 1; - x = std::tuple>>, int>{ - std::vector>>(10, - std::tuple>{std::numeric_limits::min( - ), - std::vector(100, - std::numeric_limits::quiet_NaN())}), - std::numeric_limits::min()}; + x = std::vector>(10, + std::tuple{std::numeric_limits::min(), + std::numeric_limits::min()}); current_statement__ = 2; - std::get<0>(std::get<0>(x)[(1 - 1)]) = 5; + std::get<0>(x[(1 - 1)]) = 5; } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_ix_assign4_model"; + return "tuple_ix_assign3_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -7817,11 +8012,13 @@ class tuple_ix_assign4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign4_model_namespace::log_prob"; + "tuple_ix_assign3_model_namespace::log_prob"; // suppress unused var warning (void) function__; lp_accum__.add(lp__); @@ -7841,11 +8038,13 @@ class tuple_ix_assign4_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_ix_assign4_model_namespace::log_prob"; + "tuple_ix_assign3_model_namespace::log_prob"; // suppress unused var warning (void) function__; lp_accum__.add(lp__); @@ -7872,6 +8071,8 @@ class tuple_ix_assign4_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -7880,7 +8081,7 @@ class tuple_ix_assign4_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -7917,6 +8120,8 @@ class tuple_ix_assign4_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8040,7 +8245,7 @@ class tuple_ix_assign4_model final : public model_base_crtp -namespace tuple_nested_param_model_namespace { +namespace tuple_ix_assign4_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-nested-param.stan', line 2, column 2 to column 23)", - " (in 'tuple-nested-param.stan', line 3, column 2 to column 47)"}; -class tuple_nested_param_model final : public model_base_crtp { + " (in 'tuple-ix-assign4.stan', line 2, column 2 to column 54)", + " (in 'tuple-ix-assign4.stan', line 3, column 2 to column 15)"}; +class tuple_ix_assign4_model final : public model_base_crtp { private: - + std::tuple>>, int> x; public: - ~tuple_nested_param_model() {} - tuple_nested_param_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* - pstream__ = nullptr) : model_base_crtp(0) { + ~tuple_ix_assign4_model() {} + tuple_ix_assign4_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) + : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_nested_param_model_namespace::tuple_nested_param_model"; + "tuple_ix_assign4_model_namespace::tuple_ix_assign4_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - num_params_r__ = (1 + 1) + (1 + (1 + (10 * 10))); + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 1; + x = std::tuple>>, int>{ + std::vector>>(10, + std::tuple>{std::numeric_limits::min( + ), + std::vector(100, + std::numeric_limits::quiet_NaN())}), + std::numeric_limits::min()}; + current_statement__ = 2; + std::get<0>(std::get<0>(x)[(1 - 1)]) = 5; + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_nested_param_model"; + return "tuple_ix_assign4_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -8108,40 +8331,15 @@ class tuple_nested_param_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_nested_param_model_namespace::log_prob"; + "tuple_ix_assign4_model_namespace::log_prob"; // suppress unused var warning (void) function__; - try { - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = in__.template read(); - current_statement__ = 1; - std::get<1>(ps) = in__.template read(); - std::tuple>> - ps2 = - std::tuple>>{DUMMY_VAR__, - std::tuple>{DUMMY_VAR__, - Eigen::Matrix::Constant(10, 10, - DUMMY_VAR__)}}; - current_statement__ = 2; - std::get<0>(ps2) = in__.template read(); - current_statement__ = 2; - std::get<0>(std::get<1>(ps2)) = in__.template read(); - current_statement__ = 2; - std::get<1>(std::get<1>(ps2)) = in__.template read< - Eigen::Matrix>(10, - 10); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8159,40 +8357,15 @@ class tuple_nested_param_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_nested_param_model_namespace::log_prob"; + "tuple_ix_assign4_model_namespace::log_prob"; // suppress unused var warning (void) function__; - try { - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = in__.template read(); - current_statement__ = 1; - std::get<1>(ps) = in__.template read(); - std::tuple>> - ps2 = - std::tuple>>{DUMMY_VAR__, - std::tuple>{DUMMY_VAR__, - Eigen::Matrix::Constant(10, 10, - DUMMY_VAR__)}}; - current_statement__ = 2; - std::get<0>(ps2) = in__.template read(); - current_statement__ = 2; - std::get<0>(std::get<1>(ps2)) = in__.template read(); - current_statement__ = 2; - std::get<1>(std::get<1>(ps2)) = in__.template read< - Eigen::Matrix>(10, - 10); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -8217,6 +8390,8 @@ class tuple_nested_param_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8225,38 +8400,10 @@ class tuple_nested_param_model final : public model_base_crtp ps = - std::tuple{std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN()}; - current_statement__ = 1; - std::get<0>(ps) = in__.template read(); - current_statement__ = 1; - std::get<1>(ps) = in__.template read(); - std::tuple>> - ps2 = - std::tuple>>{ - std::numeric_limits::quiet_NaN(), - std::tuple>{std::numeric_limits::quiet_NaN( - ), - Eigen::Matrix::Constant(10, 10, - std::numeric_limits::quiet_NaN())}}; - current_statement__ = 2; - std::get<0>(ps2) = in__.template read(); - current_statement__ = 2; - std::get<0>(std::get<1>(ps2)) = in__.template read(); - current_statement__ = 2; - std::get<1>(std::get<1>(ps2)) = in__.template read< - Eigen::Matrix>(10, - 10); - out__.write(std::get<0>(ps)); - out__.write(std::get<1>(ps)); - out__.write(std::get<0>(ps2)); - out__.write(std::get<0>(std::get<1>(ps2))); - out__.write(std::get<1>(std::get<1>(ps2))); if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { @@ -8279,41 +8426,11 @@ class tuple_nested_param_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = in__.read(); - current_statement__ = 1; - std::get<1>(ps) = in__.read(); - out__.write(std::get<0>(ps)); - out__.write(std::get<1>(ps)); - std::tuple>> - ps2 = - std::tuple>>{DUMMY_VAR__, - std::tuple>{DUMMY_VAR__, - Eigen::Matrix::Constant(10, 10, - DUMMY_VAR__)}}; - current_statement__ = 2; - std::get<0>(ps2) = in__.read(); - current_statement__ = 2; - std::get<0>(std::get<1>(ps2)) = in__.read(); - current_statement__ = 2; - stan::model::assign(std::get<1>(std::get<1>(ps2)), - in__.read>(10, 10), - "assigning variable ps2.2.2"); - out__.write(std::get<0>(ps2)); - out__.write(std::get<0>(std::get<1>(ps2))); - out__.write(std::get<1>(std::get<1>(ps2))); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } } template * = nullptr> inline void @@ -8322,71 +8439,17 @@ class tuple_nested_param_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - current_statement__ = 1; - context__.validate_dims("parameter initialization", "ps.1", "double", - std::vector{}); - context__.validate_dims("parameter initialization", "ps.2", "double", - std::vector{}); - current_statement__ = 2; - context__.validate_dims("parameter initialization", "ps2.1", "double", - std::vector{}); - context__.validate_dims("parameter initialization", "ps2.2.1", - "double", std::vector{}); - context__.validate_dims("parameter initialization", "ps2.2.2", - "double", - std::vector{static_cast(10), static_cast(10)}); - int pos__ = std::numeric_limits::min(); - pos__ = 1; - std::tuple ps = - std::tuple{DUMMY_VAR__, - DUMMY_VAR__}; - current_statement__ = 1; - std::get<0>(ps) = context__.vals_r("ps.1")[(1 - 1)]; - std::get<1>(ps) = context__.vals_r("ps.2")[(1 - 1)]; - out__.write(std::get<0>(ps)); - out__.write(std::get<1>(ps)); - std::tuple>> - ps2 = - std::tuple>>{DUMMY_VAR__, - std::tuple>{DUMMY_VAR__, - Eigen::Matrix::Constant(10, 10, - DUMMY_VAR__)}}; - current_statement__ = 2; - std::get<0>(ps2) = context__.vals_r("ps2.1")[(1 - 1)]; - std::get<0>(std::get<1>(ps2)) = context__.vals_r("ps2.2.1")[(1 - 1)]; - { - std::vector ps2_dot_2_dot_2_flat__; - ps2_dot_2_dot_2_flat__ = context__.vals_r("ps2.2.2"); - pos__ = 1; - for (int sym1__ = 1; sym1__ <= 10; ++sym1__) { - for (int sym2__ = 1; sym2__ <= 10; ++sym2__) { - stan::model::assign(std::get<1>(std::get<1>(ps2)), - ps2_dot_2_dot_2_flat__[(pos__ - 1)], - "assigning variable ps2.2.2", stan::model::index_uni(sym2__), - stan::model::index_uni(sym1__)); - pos__ = (pos__ + 1); - } - } - } - out__.write(std::get<0>(ps2)); - out__.write(std::get<0>(std::get<1>(ps2))); - out__.write(std::get<1>(std::get<1>(ps2))); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } } inline void get_param_names(std::vector& names__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - names__ = std::vector{"ps.1", "ps.2", "ps2.1", "ps2.2.1", - "ps2.2.2"}; + names__ = std::vector{}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -8394,11 +8457,7 @@ class tuple_nested_param_model final : public model_base_crtp>& dimss__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - dimss__ = std::vector>{std::vector{}, - std::vector{}, std::vector{}, - std::vector{}, - std::vector{static_cast(10), - static_cast(10)}}; + dimss__ = std::vector>{}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -8406,21 +8465,6 @@ class tuple_nested_param_model final : public model_base_crtp& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(2)); - param_names__.emplace_back(std::string() + "ps2" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "ps2" + ':' + - std::to_string(2) + ':' + std::to_string(1)); - for (int sym1__ = 1; sym1__ <= 10; ++sym1__) { - for (int sym2__ = 1; sym2__ <= 10; ++sym2__) { - param_names__.emplace_back(std::string() + "ps2" + ':' + - std::to_string(2) + ':' + std::to_string(2) + '.' + - std::to_string(sym2__) + '.' + std::to_string(sym1__)); - } - } if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -8428,29 +8472,14 @@ class tuple_nested_param_model final : public model_base_crtp& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "ps" + ':' + - std::to_string(2)); - param_names__.emplace_back(std::string() + "ps2" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "ps2" + ':' + - std::to_string(2) + ':' + std::to_string(1)); - for (int sym1__ = 1; sym1__ <= 10; ++sym1__) { - for (int sym2__ = 1; sym2__ <= 10; ++sym2__) { - param_names__.emplace_back(std::string() + "ps2" + ':' + - std::to_string(2) + ':' + std::to_string(2) + '.' + - std::to_string(sym2__) + '.' + std::to_string(sym1__)); - } - } if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline std::string get_constrained_sizedtypes() const { - return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"},{\"name\":\"ps2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"matrix\",\"rows\":" + std::to_string(10) + ",\"cols\":" + std::to_string(10) + "}]}]},\"block\":\"parameters\"}]"); + return std::string("[]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"},{\"name\":\"ps2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"matrix\",\"rows\":" + std::to_string(10) + ",\"cols\":" + std::to_string(10) + "}]}]},\"block\":\"parameters\"}]"); + return std::string("[]"); } // Begin method overload boilerplate template inline void @@ -8459,7 +8488,7 @@ class tuple_nested_param_model final : public model_base_crtp -namespace tuple_params_model_namespace { +namespace tuple_nested_param_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-params.stan', line 2, column 2 to column 32)"}; -class tuple_params_model final : public model_base_crtp { + " (in 'tuple-nested-param.stan', line 2, column 2 to column 23)", + " (in 'tuple-nested-param.stan', line 3, column 2 to column 47)"}; +class tuple_nested_param_model final : public model_base_crtp { private: public: - ~tuple_params_model() {} - tuple_params_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) - : model_base_crtp(0) { + ~tuple_nested_param_model() {} + tuple_nested_param_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* + pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_params_model_namespace::tuple_params_model"; + "tuple_nested_param_model_namespace::tuple_nested_param_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - num_params_r__ = (1 + 1); + num_params_r__ = (1 + 1) + (1 + (1 + (10 * 10))); } inline std::string model_name() const final { - return "tuple_params_model"; + return "tuple_nested_param_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -8602,11 +8634,13 @@ class tuple_params_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_params_model_namespace::log_prob"; + "tuple_nested_param_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { @@ -8616,8 +8650,23 @@ class tuple_params_model final : public model_base_crtp { current_statement__ = 1; std::get<0>(ps) = in__.template read(); current_statement__ = 1; - std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + std::get<1>(ps) = in__.template read(); + std::tuple>> + ps2 = + std::tuple>>{DUMMY_VAR__, + std::tuple>{DUMMY_VAR__, + Eigen::Matrix::Constant(10, 10, + DUMMY_VAR__)}}; + current_statement__ = 2; + std::get<0>(ps2) = in__.template read(); + current_statement__ = 2; + std::get<0>(std::get<1>(ps2)) = in__.template read(); + current_statement__ = 2; + std::get<1>(std::get<1>(ps2)) = in__.template read< + Eigen::Matrix>(10, + 10); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -8638,11 +8687,13 @@ class tuple_params_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_params_model_namespace::log_prob"; + "tuple_nested_param_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { @@ -8652,8 +8703,23 @@ class tuple_params_model final : public model_base_crtp { current_statement__ = 1; std::get<0>(ps) = in__.template read(); current_statement__ = 1; - std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + std::get<1>(ps) = in__.template read(); + std::tuple>> + ps2 = + std::tuple>>{DUMMY_VAR__, + std::tuple>{DUMMY_VAR__, + Eigen::Matrix::Constant(10, 10, + DUMMY_VAR__)}}; + current_statement__ = 2; + std::get<0>(ps2) = in__.template read(); + current_statement__ = 2; + std::get<0>(std::get<1>(ps2)) = in__.template read(); + current_statement__ = 2; + std::get<1>(std::get<1>(ps2)) = in__.template read< + Eigen::Matrix>(10, + 10); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -8681,6 +8747,8 @@ class tuple_params_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -8689,7 +8757,7 @@ class tuple_params_model final : public model_base_crtp { // suppress unused var warning (void) jacobian__; static constexpr const char* function__ = - "tuple_params_model_namespace::write_array"; + "tuple_nested_param_model_namespace::write_array"; // suppress unused var warning (void) function__; try { @@ -8699,10 +8767,28 @@ class tuple_params_model final : public model_base_crtp { current_statement__ = 1; std::get<0>(ps) = in__.template read(); current_statement__ = 1; - std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + std::get<1>(ps) = in__.template read(); + std::tuple>> + ps2 = + std::tuple>>{ + std::numeric_limits::quiet_NaN(), + std::tuple>{std::numeric_limits::quiet_NaN( + ), + Eigen::Matrix::Constant(10, 10, + std::numeric_limits::quiet_NaN())}}; + current_statement__ = 2; + std::get<0>(ps2) = in__.template read(); + current_statement__ = 2; + std::get<0>(std::get<1>(ps2)) = in__.template read(); + current_statement__ = 2; + std::get<1>(std::get<1>(ps2)) = in__.template read< + Eigen::Matrix>(10, + 10); out__.write(std::get<0>(ps)); out__.write(std::get<1>(ps)); + out__.write(std::get<0>(ps2)); + out__.write(std::get<0>(std::get<1>(ps2))); + out__.write(std::get<1>(std::get<1>(ps2))); if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { @@ -8725,6 +8811,8 @@ class tuple_params_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -8737,27 +8825,56 @@ class tuple_params_model final : public model_base_crtp { current_statement__ = 1; std::get<1>(ps) = in__.read(); out__.write(std::get<0>(ps)); - out__.write_free_lb(0, std::get<1>(ps)); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } - } - template * = nullptr> - inline void - transform_inits_impl(const stan::io::var_context& context__, VecVar& - vars__, std::ostream* pstream__ = nullptr) const { - using local_scalar_t__ = double; - stan::io::serializer out__(vars__); - int current_statement__ = 0; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; - try { - current_statement__ = 1; - context__.validate_dims("parameter initialization", "ps.1", "double", - std::vector{}); + out__.write(std::get<1>(ps)); + std::tuple>> + ps2 = + std::tuple>>{DUMMY_VAR__, + std::tuple>{DUMMY_VAR__, + Eigen::Matrix::Constant(10, 10, + DUMMY_VAR__)}}; + current_statement__ = 2; + std::get<0>(ps2) = in__.read(); + current_statement__ = 2; + std::get<0>(std::get<1>(ps2)) = in__.read(); + current_statement__ = 2; + stan::model::assign(std::get<1>(std::get<1>(ps2)), + in__.read>(10, 10), + "assigning variable ps2.2.2"); + out__.write(std::get<0>(ps2)); + out__.write(std::get<0>(std::get<1>(ps2))); + out__.write(std::get<1>(std::get<1>(ps2))); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr> + inline void + transform_inits_impl(const stan::io::var_context& context__, VecVar& + vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "ps.1", "double", + std::vector{}); context__.validate_dims("parameter initialization", "ps.2", "double", std::vector{}); + current_statement__ = 2; + context__.validate_dims("parameter initialization", "ps2.1", "double", + std::vector{}); + context__.validate_dims("parameter initialization", "ps2.2.1", + "double", std::vector{}); + context__.validate_dims("parameter initialization", "ps2.2.2", + "double", + std::vector{static_cast(10), static_cast(10)}); int pos__ = std::numeric_limits::min(); pos__ = 1; std::tuple ps = @@ -8767,7 +8884,35 @@ class tuple_params_model final : public model_base_crtp { std::get<0>(ps) = context__.vals_r("ps.1")[(1 - 1)]; std::get<1>(ps) = context__.vals_r("ps.2")[(1 - 1)]; out__.write(std::get<0>(ps)); - out__.write_free_lb(0, std::get<1>(ps)); + out__.write(std::get<1>(ps)); + std::tuple>> + ps2 = + std::tuple>>{DUMMY_VAR__, + std::tuple>{DUMMY_VAR__, + Eigen::Matrix::Constant(10, 10, + DUMMY_VAR__)}}; + current_statement__ = 2; + std::get<0>(ps2) = context__.vals_r("ps2.1")[(1 - 1)]; + std::get<0>(std::get<1>(ps2)) = context__.vals_r("ps2.2.1")[(1 - 1)]; + { + std::vector ps2_dot_2_dot_2_flat__; + ps2_dot_2_dot_2_flat__ = context__.vals_r("ps2.2.2"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 10; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 10; ++sym2__) { + stan::model::assign(std::get<1>(std::get<1>(ps2)), + ps2_dot_2_dot_2_flat__[(pos__ - 1)], + "assigning variable ps2.2.2", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + out__.write(std::get<0>(ps2)); + out__.write(std::get<0>(std::get<1>(ps2))); + out__.write(std::get<1>(std::get<1>(ps2))); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -8776,7 +8921,8 @@ class tuple_params_model final : public model_base_crtp { get_param_names(std::vector& names__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - names__ = std::vector{"ps.1", "ps.2"}; + names__ = std::vector{"ps.1", "ps.2", "ps2.1", "ps2.2.1", + "ps2.2.2"}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -8785,7 +8931,10 @@ class tuple_params_model final : public model_base_crtp { emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { dimss__ = std::vector>{std::vector{}, - std::vector{}}; + std::vector{}, std::vector{}, + std::vector{}, + std::vector{static_cast(10), + static_cast(10)}}; if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -8797,6 +8946,17 @@ class tuple_params_model final : public model_base_crtp { std::to_string(1)); param_names__.emplace_back(std::string() + "ps" + ':' + std::to_string(2)); + param_names__.emplace_back(std::string() + "ps2" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "ps2" + ':' + + std::to_string(2) + ':' + std::to_string(1)); + for (int sym1__ = 1; sym1__ <= 10; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 10; ++sym2__) { + param_names__.emplace_back(std::string() + "ps2" + ':' + + std::to_string(2) + ':' + std::to_string(2) + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } @@ -8808,14 +8968,25 @@ class tuple_params_model final : public model_base_crtp { std::to_string(1)); param_names__.emplace_back(std::string() + "ps" + ':' + std::to_string(2)); + param_names__.emplace_back(std::string() + "ps2" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "ps2" + ':' + + std::to_string(2) + ':' + std::to_string(1)); + for (int sym1__ = 1; sym1__ <= 10; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 10; ++sym2__) { + param_names__.emplace_back(std::string() + "ps2" + ':' + + std::to_string(2) + ':' + std::to_string(2) + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline std::string get_constrained_sizedtypes() const { - return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); + return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"},{\"name\":\"ps2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"matrix\",\"rows\":" + std::to_string(10) + ",\"cols\":" + std::to_string(10) + "}]}]},\"block\":\"parameters\"}]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); + return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"},{\"name\":\"ps2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"matrix\",\"rows\":" + std::to_string(10) + ",\"cols\":" + std::to_string(10) + "}]}]},\"block\":\"parameters\"}]"); } // Begin method overload boilerplate template inline void @@ -8824,7 +8995,7 @@ class tuple_params_model final : public model_base_crtp { emit_transformed_parameters = true, const bool emit_generated_quantities = true, std::ostream* pstream = nullptr) const { - const size_t num_params__ = (1 + 1); + const size_t num_params__ = ((1 + 1) + (1 + (1 + (10 * 10)))); const size_t num_transformed = emit_transformed_parameters * (0); const size_t num_gen_quantities = emit_generated_quantities * (0); const size_t num_to_write = num_params__ + num_transformed + @@ -8841,7 +9012,7 @@ class tuple_params_model final : public model_base_crtp { emit_transformed_parameters = true, bool emit_generated_quantities = true, std::ostream* pstream = nullptr) const { - const size_t num_params__ = (1 + 1); + const size_t num_params__ = ((1 + 1) + (1 + (1 + (10 * 10)))); const size_t num_transformed = emit_transformed_parameters * (0); const size_t num_gen_quantities = emit_generated_quantities * (0); const size_t num_to_write = num_params__ + num_transformed + @@ -8900,7 +9071,7 @@ class tuple_params_model final : public model_base_crtp { } }; } -using stan_model = tuple_params_model_namespace::tuple_params_model; +using stan_model = tuple_nested_param_model_namespace::tuple_nested_param_model; #ifndef USING_R // Boilerplate stan::model::model_base& @@ -8910,208 +9081,94 @@ new_model(stan::io::var_context& data_context, unsigned int seed, return *m; } stan::math::profile_map& get_stan_profile_data() { - return tuple_params_model_namespace::profiles__; + return tuple_nested_param_model_namespace::profiles__; } #endif - $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-promotion.stan + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-params.stan // Code generated by %%NAME%% %%VERSION%% #include -namespace tuple_promotion_model_namespace { +namespace tuple_params_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-promotion.stan', line 24, column 2 to column 51)", - " (in 'tuple-promotion.stan', line 25, column 2 to column 33)", - " (in 'tuple-promotion.stan', line 27, column 2 to column 54)", - " (in 'tuple-promotion.stan', line 29, column 2 to column 86)", - " (in 'tuple-promotion.stan', line 30, column 2 to column 77)", - " (in 'tuple-promotion.stan', line 34, column 2 to column 12)", - " (in 'tuple-promotion.stan', line 35, column 2 to column 31)", - " (in 'tuple-promotion.stan', line 36, column 2 to column 29)", - " (in 'tuple-promotion.stan', line 37, column 2 to column 30)", - " (in 'tuple-promotion.stan', line 31, column 2 to column 19)", - " (in 'tuple-promotion.stan', line 7, column 2 to column 14)", - " (in 'tuple-promotion.stan', line 8, column 2 to column 38)", - " (in 'tuple-promotion.stan', line 11, column 2 to column 41)", - " (in 'tuple-promotion.stan', line 13, column 2 to column 69)", - " (in 'tuple-promotion.stan', line 15, column 2 to column 52)", - " (in 'tuple-promotion.stan', line 17, column 2 to column 45)", - " (in 'tuple-promotion.stan', line 18, column 2 to column 36)", - " (in 'tuple-promotion.stan', line 19, column 2 to column 10)", - " (in 'tuple-promotion.stan', line 21, column 2 to column 20)", - " (in 'tuple-promotion.stan', line 3, column 4 to column 37)", - " (in 'tuple-promotion.stan', line 2, column 53 to line 4, column 3)"}; -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -dummy(const std::tuple, std::vector>& test, - std::ostream* pstream__); -template , - stan::is_stan_scalar>*> -stan::promote_args_t -dummy(const std::tuple, std::vector>& test, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; - int current_statement__ = 0; - static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; - try { - current_statement__ = 20; - return (stan::math::sum(std::get<0>(test)) + - stan::math::sum(std::get<1>(test))); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } -} -class tuple_promotion_model final : public model_base_crtp { + " (in 'tuple-params.stan', line 2, column 2 to column 32)"}; +class tuple_params_model final : public model_base_crtp { private: - Eigen::Matrix V_data__; - std::tuple, std::vector> d; - std::vector>> arrs; - std::tuple>, int, - std::tuple, int>> nested; - std::tuple, std::complex> basic; - std::tuple,-1,1>, double> CV; - std::tuple, int> V2; - double t; - Eigen::Map> V{nullptr, 0}; + public: - ~tuple_promotion_model() {} - tuple_promotion_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_params_model() {} + tuple_params_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_promotion_model_namespace::tuple_promotion_model"; + "tuple_params_model_namespace::tuple_params_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; + num_params_r__ = (1 + 1); + } + inline std::string model_name() const final { + return "tuple_params_model"; + } + inline std::vector model_compile_info() const noexcept { + return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", + "stancflags = -fsoa --print-cpp"}; + } + // Base log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_not_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_params_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; try { - int pos__ = std::numeric_limits::min(); - pos__ = 1; - current_statement__ = 11; - context__.validate_dims("data initialization", "V", "double", - std::vector{static_cast(3)}); - V_data__ = Eigen::Matrix::Constant(3, - std::numeric_limits::quiet_NaN()); - new (&V) Eigen::Map>(V_data__.data(), 3); - { - std::vector V_flat__; - current_statement__ = 11; - V_flat__ = context__.vals_r("V"); - pos__ = 1; - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - stan::model::assign(V, V_flat__[(pos__ - 1)], - "assigning variable V", stan::model::index_uni(sym1__)); - pos__ = (pos__ + 1); - } - } - current_statement__ = 12; - context__.validate_dims("data initialization", "d.1", "int", - std::vector{static_cast(3)}); - context__.validate_dims("data initialization", "d.2", "int", - std::vector{static_cast(3)}); - d = std::tuple, std::vector>{std::vector(3, - std::numeric_limits::min( - )), - std::vector(3, std::numeric_limits::min())}; - current_statement__ = 12; - std::get<0>(d) = context__.vals_i("d.1"); - std::get<1>(d) = context__.vals_i("d.2"); - current_statement__ = 13; - arrs = std::vector>>(4, - std::tuple>{std::numeric_limits::min( - ), - std::vector(2, std::numeric_limits::min())}); - current_statement__ = 14; - nested = std::tuple>, int, - std::tuple, int>>{std::tuple>{ - std::numeric_limits::min( - ), - std::vector< - int>(2, - std::numeric_limits::min( - ))}, - std::numeric_limits::min(), - std::tuple, int>{Eigen::Matrix::Constant(3, - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::min()}}; - current_statement__ = 15; - basic = std::tuple, std::complex>{std::vector< - double>(2, - std::numeric_limits::quiet_NaN( - )), - std::complex(std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN())}; - current_statement__ = 15; - stan::model::assign(basic, - std::tuple, std::complex>(std::vector< - double>{1, 2}, - stan::math::to_complex(3, 0)), "assigning variable basic"); - current_statement__ = 16; - CV = std::tuple,-1,1>, double>{ - Eigen::Matrix,-1,1>::Constant(3, - std::complex(std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN())), - std::numeric_limits::quiet_NaN()}; - current_statement__ = 16; - stan::model::assign(CV, - std::tuple,-1,1>, double>( - stan::math::promote_scalar>(V), 2), - "assigning variable CV"); - current_statement__ = 17; - V2 = std::tuple, int>{Eigen::Matrix::Constant(3, - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::min()}; - current_statement__ = 17; - stan::model::assign(V2, - std::tuple, int>(V, 2), - "assigning variable V2"); - current_statement__ = 18; - stan::model::assign(CV, - stan::math::promote_scalar, double>>( - V2), "assigning variable CV"); - current_statement__ = 19; - t = std::numeric_limits::quiet_NaN(); - current_statement__ = 19; - t = dummy(stan::math::promote_scalar>(d), - pstream__); + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = in__.template read(); + current_statement__ = 1; + std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } - num_params_r__ = 0U; - } - inline std::string model_name() const final { - return "tuple_promotion_model"; - } - inline std::vector model_compile_info() const noexcept { - return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", - "stancflags = -fsoa --print-cpp"}; + lp_accum__.add(lp__); + return lp_accum__.sum(); } - // Base log prob + // Reverse mode autodiff log prob template * = nullptr, stan::require_vector_like_vt* = nullptr, - stan::require_not_st_var* = nullptr> + stan::require_st_var* = nullptr> inline stan::scalar_type_t log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* pstream__ = nullptr) const { @@ -9121,165 +9178,665 @@ class tuple_promotion_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_promotion_model_namespace::log_prob"; + "tuple_params_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { - std::tuple>, - std::vector>> d2 = - std::tuple>, - std::vector>>{std::vector< - std::complex>(3, - std::complex(DUMMY_VAR__, - DUMMY_VAR__)), - std::vector>(3, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}; - current_statement__ = 1; - stan::model::assign(d2, - stan::math::promote_scalar< - std::tuple, - std::complex>>(d), "assigning variable d2"); - std::tuple, local_scalar_t__> V3 = - std::tuple, local_scalar_t__>{ - Eigen::Matrix::Constant(3, DUMMY_VAR__), + std::tuple ps = + std::tuple{DUMMY_VAR__, DUMMY_VAR__}; - current_statement__ = 2; - stan::model::assign(V3, - stan::math::promote_scalar< - std::tuple>(V2), - "assigning variable V3"); - std::vector< - std::tuple>>> arrs2 = - std::vector< - std::tuple>>>(4, - std::tuple>>{DUMMY_VAR__, - std::vector>(2, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}); - current_statement__ = 3; - stan::model::assign(arrs2, - stan::math::promote_scalar< - std::tuple>>(arrs), - "assigning variable arrs2"); - std::tuple< - std::tuple>>, - local_scalar_t__, - std::tuple, local_scalar_t__>> - nested2 = - std::tuple< - std::tuple>>, - local_scalar_t__, - std::tuple, local_scalar_t__>>{ - std::tuple>>{DUMMY_VAR__, - std::vector>(2, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}, - DUMMY_VAR__, - std::tuple, local_scalar_t__>{ - Eigen::Matrix::Constant(3, DUMMY_VAR__), - DUMMY_VAR__}}; - current_statement__ = 4; - stan::model::assign(nested2, - stan::math::promote_scalar< - std::tuple< - std::tuple>, - local_scalar_t__, std::tuple>>( - nested), "assigning variable nested2"); - std::tuple< - std::tuple>>, - local_scalar_t__, - std::tuple, local_scalar_t__>> - nested3 = - std::tuple< - std::tuple>>, - local_scalar_t__, - std::tuple, local_scalar_t__>>{ - std::tuple>>{DUMMY_VAR__, - std::vector>(2, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}, - DUMMY_VAR__, - std::tuple, local_scalar_t__>{ - Eigen::Matrix::Constant(3, DUMMY_VAR__), - DUMMY_VAR__}}; - current_statement__ = 10; - stan::model::assign(nested3, - stan::math::promote_scalar< - std::tuple< - std::tuple>, - local_scalar_t__, std::tuple>>( - nested), "assigning variable nested3"); + current_statement__ = 1; + std::get<0>(ps) = in__.template read(); + current_statement__ = 1; + std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } lp_accum__.add(lp__); return lp_accum__.sum(); } - // Reverse mode autodiff log prob - template * = nullptr, - stan::require_vector_like_vt* = nullptr, - stan::require_st_var* = nullptr> - inline stan::scalar_type_t - log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* - pstream__ = nullptr) const { - using T__ = stan::scalar_type_t; - using local_scalar_t__ = T__; - T__ lp__(0.0); - stan::math::accumulator lp_accum__; + template * = nullptr, stan::require_vector_like_vt* = nullptr, stan::require_vector_vt* = nullptr> + inline void + write_array_impl(RNG& base_rng__, VecR& params_r__, VecI& params_i__, + VecVar& vars__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true, std::ostream* + pstream__ = nullptr) const { + using local_scalar_t__ = double; stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + double lp__ = 0.0; + // suppress unused var warning + (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; + constexpr bool jacobian__ = false; + // suppress unused var warning + (void) jacobian__; static constexpr const char* function__ = - "tuple_promotion_model_namespace::log_prob"; + "tuple_params_model_namespace::write_array"; // suppress unused var warning (void) function__; try { - std::tuple>, - std::vector>> d2 = - std::tuple>, - std::vector>>{std::vector< - std::complex>(3, - std::complex(DUMMY_VAR__, - DUMMY_VAR__)), - std::vector>(3, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}; + std::tuple ps = + std::tuple{std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN()}; current_statement__ = 1; - stan::model::assign(d2, - stan::math::promote_scalar< - std::tuple, - std::complex>>(d), "assigning variable d2"); - std::tuple, local_scalar_t__> V3 = - std::tuple, local_scalar_t__>{ - Eigen::Matrix::Constant(3, DUMMY_VAR__), - DUMMY_VAR__}; - current_statement__ = 2; - stan::model::assign(V3, - stan::math::promote_scalar< - std::tuple>(V2), - "assigning variable V3"); - std::vector< - std::tuple>>> arrs2 = - std::vector< - std::tuple>>>(4, - std::tuple>>{DUMMY_VAR__, - std::vector>(2, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}); + std::get<0>(ps) = in__.template read(); + current_statement__ = 1; + std::get<1>(ps) = in__.template read_constrain_lb(0, lp__); + out__.write(std::get<0>(ps)); + out__.write(std::get<1>(ps)); + if (stan::math::logical_negation( + (stan::math::primitive_value(emit_transformed_parameters__) || + stan::math::primitive_value(emit_generated_quantities__)))) { + return ; + } + if (stan::math::logical_negation(emit_generated_quantities__)) { + return ; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr, + stan::require_vector_like_vt* = nullptr> + inline void + unconstrain_array_impl(const VecVar& params_r__, const VecI& params_i__, + VecVar& vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = in__.read(); + current_statement__ = 1; + std::get<1>(ps) = in__.read(); + out__.write(std::get<0>(ps)); + out__.write_free_lb(0, std::get<1>(ps)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr> + inline void + transform_inits_impl(const stan::io::var_context& context__, VecVar& + vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "ps.1", "double", + std::vector{}); + context__.validate_dims("parameter initialization", "ps.2", "double", + std::vector{}); + int pos__ = std::numeric_limits::min(); + pos__ = 1; + std::tuple ps = + std::tuple{DUMMY_VAR__, + DUMMY_VAR__}; + current_statement__ = 1; + std::get<0>(ps) = context__.vals_r("ps.1")[(1 - 1)]; + std::get<1>(ps) = context__.vals_r("ps.2")[(1 - 1)]; + out__.write(std::get<0>(ps)); + out__.write_free_lb(0, std::get<1>(ps)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + inline void + get_param_names(std::vector& names__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + names__ = std::vector{"ps.1", "ps.2"}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + get_dims(std::vector>& dimss__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + dimss__ = std::vector>{std::vector{}, + std::vector{}}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + constrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(2)); + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + unconstrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "ps" + ':' + + std::to_string(2)); + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline std::string get_constrained_sizedtypes() const { + return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); + } + inline std::string get_unconstrained_sizedtypes() const { + return std::string("[{\"name\":\"ps\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"parameters\"}]"); + } + // Begin method overload boilerplate + template inline void + write_array(RNG& base_rng, Eigen::Matrix& params_r, + Eigen::Matrix& vars, const bool + emit_transformed_parameters = true, const bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = (1 + 1); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + std::vector params_i; + vars = Eigen::Matrix::Constant(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline void + write_array(RNG& base_rng, std::vector& params_r, std::vector& + params_i, std::vector& vars, bool + emit_transformed_parameters = true, bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = (1 + 1); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + vars = std::vector(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline T_ + log_prob(Eigen::Matrix& params_r, std::ostream* pstream = nullptr) const { + Eigen::Matrix params_i; + return log_prob_impl(params_r, params_i, pstream); + } + template inline T_ + log_prob(std::vector& params_r, std::vector& params_i, + std::ostream* pstream = nullptr) const { + return log_prob_impl(params_r, params_i, pstream); + } + inline void + transform_inits(const stan::io::var_context& context, + Eigen::Matrix& params_r, std::ostream* + pstream = nullptr) const final { + std::vector params_r_vec(params_r.size()); + std::vector params_i; + transform_inits(context, params_i, params_r_vec, pstream); + params_r = Eigen::Map>(params_r_vec.data(), + params_r_vec.size()); + } + inline void + transform_inits(const stan::io::var_context& context, std::vector& + params_i, std::vector& vars, std::ostream* + pstream__ = nullptr) const { + vars.resize(num_params_r__); + transform_inits_impl(context, vars, pstream__); + } + inline void + unconstrain_array(const std::vector& params_constrained, + std::vector& params_unconstrained, std::ostream* + pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = std::vector(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } + inline void + unconstrain_array(const Eigen::Matrix& params_constrained, + Eigen::Matrix& params_unconstrained, + std::ostream* pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = Eigen::Matrix::Constant(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } +}; +} +using stan_model = tuple_params_model_namespace::tuple_params_model; +#ifndef USING_R +// Boilerplate +stan::model::model_base& +new_model(stan::io::var_context& data_context, unsigned int seed, + std::ostream* msg_stream) { + stan_model* m = new stan_model(data_context, seed, msg_stream); + return *m; +} +stan::math::profile_map& get_stan_profile_data() { + return tuple_params_model_namespace::profiles__; +} +#endif + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-promotion.stan +// Code generated by %%NAME%% %%VERSION%% +#include +namespace tuple_promotion_model_namespace { +using stan::model::model_base_crtp; +using namespace stan::math; +stan::math::profile_map profiles__; +static constexpr std::array locations_array__ = + {" (found before start of program)", + " (in 'tuple-promotion.stan', line 24, column 2 to column 51)", + " (in 'tuple-promotion.stan', line 25, column 2 to column 33)", + " (in 'tuple-promotion.stan', line 27, column 2 to column 54)", + " (in 'tuple-promotion.stan', line 29, column 2 to column 86)", + " (in 'tuple-promotion.stan', line 30, column 2 to column 77)", + " (in 'tuple-promotion.stan', line 34, column 2 to column 12)", + " (in 'tuple-promotion.stan', line 35, column 2 to column 31)", + " (in 'tuple-promotion.stan', line 36, column 2 to column 29)", + " (in 'tuple-promotion.stan', line 37, column 2 to column 30)", + " (in 'tuple-promotion.stan', line 31, column 2 to column 19)", + " (in 'tuple-promotion.stan', line 7, column 2 to column 14)", + " (in 'tuple-promotion.stan', line 8, column 2 to column 38)", + " (in 'tuple-promotion.stan', line 11, column 2 to column 41)", + " (in 'tuple-promotion.stan', line 13, column 2 to column 69)", + " (in 'tuple-promotion.stan', line 15, column 2 to column 52)", + " (in 'tuple-promotion.stan', line 17, column 2 to column 45)", + " (in 'tuple-promotion.stan', line 18, column 2 to column 36)", + " (in 'tuple-promotion.stan', line 19, column 2 to column 10)", + " (in 'tuple-promotion.stan', line 21, column 2 to column 20)", + " (in 'tuple-promotion.stan', line 3, column 4 to column 37)", + " (in 'tuple-promotion.stan', line 2, column 53 to line 4, column 3)"}; +template , + stan::is_stan_scalar>* = nullptr> +std::decay_t> +dummy(const std::tuple, std::vector>& test, + std::ostream* pstream__); +template , + stan::is_stan_scalar>*> +std::decay_t> +dummy(const std::tuple, std::vector>& test, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 20; + return (stan::math::sum(std::get<0>(test)) + + stan::math::sum(std::get<1>(test))); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +class tuple_promotion_model final : public model_base_crtp { + private: + Eigen::Matrix V_data__; + std::tuple, std::vector> d; + std::vector>> arrs; + std::tuple>, int, + std::tuple, int>> nested; + std::tuple, std::complex> basic; + std::tuple,-1,1>, double> CV; + std::tuple, int> V2; + double t; + Eigen::Map> V{nullptr, 0}; + public: + ~tuple_promotion_model() {} + tuple_promotion_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) + : model_base_crtp(0) { + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + using local_scalar_t__ = double; + boost::ecuyer1988 base_rng__ = + stan::services::util::create_rng(random_seed__, 0); + // suppress unused var warning + (void) base_rng__; + static constexpr const char* function__ = + "tuple_promotion_model_namespace::tuple_promotion_model"; + // suppress unused var warning + (void) function__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 11; + context__.validate_dims("data initialization", "V", "double", + std::vector{static_cast(3)}); + V_data__ = Eigen::Matrix::Constant(3, + std::numeric_limits::quiet_NaN()); + new (&V) Eigen::Map>(V_data__.data(), 3); + { + std::vector V_flat__; + current_statement__ = 11; + V_flat__ = context__.vals_r("V"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + stan::model::assign(V, V_flat__[(pos__ - 1)], + "assigning variable V", stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + current_statement__ = 12; + context__.validate_dims("data initialization", "d.1", "int", + std::vector{static_cast(3)}); + context__.validate_dims("data initialization", "d.2", "int", + std::vector{static_cast(3)}); + d = std::tuple, std::vector>{std::vector(3, + std::numeric_limits::min( + )), + std::vector(3, std::numeric_limits::min())}; + current_statement__ = 12; + std::get<0>(d) = context__.vals_i("d.1"); + std::get<1>(d) = context__.vals_i("d.2"); + current_statement__ = 13; + arrs = std::vector>>(4, + std::tuple>{std::numeric_limits::min( + ), + std::vector(2, std::numeric_limits::min())}); + current_statement__ = 14; + nested = std::tuple>, int, + std::tuple, int>>{std::tuple>{ + std::numeric_limits::min( + ), + std::vector< + int>(2, + std::numeric_limits::min( + ))}, + std::numeric_limits::min(), + std::tuple, int>{Eigen::Matrix::Constant(3, + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::min()}}; + current_statement__ = 15; + basic = std::tuple, std::complex>{std::vector< + double>(2, + std::numeric_limits::quiet_NaN( + )), + std::complex(std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN())}; + current_statement__ = 15; + stan::model::assign(basic, + std::tuple, std::complex>(std::vector< + double>{1, 2}, + stan::math::to_complex(3, 0)), "assigning variable basic"); + current_statement__ = 16; + CV = std::tuple,-1,1>, double>{ + Eigen::Matrix,-1,1>::Constant(3, + std::complex(std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN())), + std::numeric_limits::quiet_NaN()}; + current_statement__ = 16; + stan::model::assign(CV, + std::tuple,-1,1>, double>( + stan::math::promote_scalar>(V), 2), + "assigning variable CV"); + current_statement__ = 17; + V2 = std::tuple, int>{Eigen::Matrix::Constant(3, + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::min()}; + current_statement__ = 17; + stan::model::assign(V2, + std::tuple, int>(V, 2), + "assigning variable V2"); + current_statement__ = 18; + stan::model::assign(CV, + stan::math::promote_scalar, double>>( + V2), "assigning variable CV"); + current_statement__ = 19; + t = std::numeric_limits::quiet_NaN(); + current_statement__ = 19; + t = dummy(stan::math::promote_scalar>(d), + pstream__); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + num_params_r__ = 0U; + } + inline std::string model_name() const final { + return "tuple_promotion_model"; + } + inline std::vector model_compile_info() const noexcept { + return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", + "stancflags = -fsoa --print-cpp"}; + } + // Base log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_not_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_promotion_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + std::tuple>, + std::vector>> d2 = + std::tuple>, + std::vector>>{std::vector< + std::complex>(3, + std::complex(DUMMY_VAR__, + DUMMY_VAR__)), + std::vector>(3, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}; + current_statement__ = 1; + stan::model::assign(d2, + stan::math::promote_scalar< + std::tuple, + std::complex>>(d), "assigning variable d2"); + std::tuple, local_scalar_t__> V3 = + std::tuple, local_scalar_t__>{ + Eigen::Matrix::Constant(3, DUMMY_VAR__), + DUMMY_VAR__}; + current_statement__ = 2; + stan::model::assign(V3, + stan::math::promote_scalar< + std::tuple>(V2), + "assigning variable V3"); + std::vector< + std::tuple>>> arrs2 = + std::vector< + std::tuple>>>(4, + std::tuple>>{DUMMY_VAR__, + std::vector>(2, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}); + current_statement__ = 3; + stan::model::assign(arrs2, + stan::math::promote_scalar< + std::tuple>>(arrs), + "assigning variable arrs2"); + std::tuple< + std::tuple>>, + local_scalar_t__, + std::tuple, local_scalar_t__>> + nested2 = + std::tuple< + std::tuple>>, + local_scalar_t__, + std::tuple, local_scalar_t__>>{ + std::tuple>>{DUMMY_VAR__, + std::vector>(2, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}, + DUMMY_VAR__, + std::tuple, local_scalar_t__>{ + Eigen::Matrix::Constant(3, DUMMY_VAR__), + DUMMY_VAR__}}; + current_statement__ = 4; + stan::model::assign(nested2, + stan::math::promote_scalar< + std::tuple< + std::tuple>, + local_scalar_t__, std::tuple>>( + nested), "assigning variable nested2"); + std::tuple< + std::tuple>>, + local_scalar_t__, + std::tuple, local_scalar_t__>> + nested3 = + std::tuple< + std::tuple>>, + local_scalar_t__, + std::tuple, local_scalar_t__>>{ + std::tuple>>{DUMMY_VAR__, + std::vector>(2, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}, + DUMMY_VAR__, + std::tuple, local_scalar_t__>{ + Eigen::Matrix::Constant(3, DUMMY_VAR__), + DUMMY_VAR__}}; + current_statement__ = 10; + stan::model::assign(nested3, + stan::math::promote_scalar< + std::tuple< + std::tuple>, + local_scalar_t__, std::tuple>>( + nested), "assigning variable nested3"); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + // Reverse mode autodiff log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_promotion_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + std::tuple>, + std::vector>> d2 = + std::tuple>, + std::vector>>{std::vector< + std::complex>(3, + std::complex(DUMMY_VAR__, + DUMMY_VAR__)), + std::vector>(3, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}; + current_statement__ = 1; + stan::model::assign(d2, + stan::math::promote_scalar< + std::tuple, + std::complex>>(d), "assigning variable d2"); + std::tuple, local_scalar_t__> V3 = + std::tuple, local_scalar_t__>{ + Eigen::Matrix::Constant(3, DUMMY_VAR__), + DUMMY_VAR__}; + current_statement__ = 2; + stan::model::assign(V3, + stan::math::promote_scalar< + std::tuple>(V2), + "assigning variable V3"); + std::vector< + std::tuple>>> arrs2 = + std::vector< + std::tuple>>>(4, + std::tuple>>{DUMMY_VAR__, + std::vector>(2, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}); current_statement__ = 3; stan::model::assign(arrs2, stan::math::promote_scalar< @@ -9311,35 +9868,1019 @@ class tuple_promotion_model final : public model_base_crtp>, local_scalar_t__, std::tuple>>( nested), "assigning variable nested2"); - std::tuple< - std::tuple>>, - local_scalar_t__, - std::tuple, local_scalar_t__>> - nested3 = - std::tuple< - std::tuple>>, - local_scalar_t__, - std::tuple, local_scalar_t__>>{ - std::tuple>>{DUMMY_VAR__, - std::vector>(2, - std::complex(DUMMY_VAR__, DUMMY_VAR__))}, - DUMMY_VAR__, - std::tuple, local_scalar_t__>{ - Eigen::Matrix::Constant(3, DUMMY_VAR__), - DUMMY_VAR__}}; + std::tuple< + std::tuple>>, + local_scalar_t__, + std::tuple, local_scalar_t__>> + nested3 = + std::tuple< + std::tuple>>, + local_scalar_t__, + std::tuple, local_scalar_t__>>{ + std::tuple>>{DUMMY_VAR__, + std::vector>(2, + std::complex(DUMMY_VAR__, DUMMY_VAR__))}, + DUMMY_VAR__, + std::tuple, local_scalar_t__>{ + Eigen::Matrix::Constant(3, DUMMY_VAR__), + DUMMY_VAR__}}; + current_statement__ = 10; + stan::model::assign(nested3, + stan::math::promote_scalar< + std::tuple< + std::tuple>, + local_scalar_t__, std::tuple>>( + nested), "assigning variable nested3"); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + template * = nullptr, stan::require_vector_like_vt* = nullptr, stan::require_vector_vt* = nullptr> + inline void + write_array_impl(RNG& base_rng__, VecR& params_r__, VecI& params_i__, + VecVar& vars__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true, std::ostream* + pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + double lp__ = 0.0; + // suppress unused var warning + (void) lp__; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + stan::math::accumulator lp_accum__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + constexpr bool jacobian__ = false; + // suppress unused var warning + (void) jacobian__; + static constexpr const char* function__ = + "tuple_promotion_model_namespace::write_array"; + // suppress unused var warning + (void) function__; + try { + std::tuple>, + std::vector>> d2 = + std::tuple>, + std::vector>>{std::vector< + std::complex>(3, + std::complex(std::numeric_limits::quiet_NaN( + ), + std::numeric_limits::quiet_NaN( + ))), + std::vector>(3, + std::complex(std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN()))}; + std::tuple, double> V3 = + std::tuple, double>{Eigen::Matrix::Constant(3, + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::quiet_NaN()}; + std::vector>>> + arrs2 = + std::vector>>>(4, + std::tuple>>{std::numeric_limits::quiet_NaN( + ), + std::vector>(2, + std::complex(std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN()))}); + std::tuple>>, + double, std::tuple, double>> nested2 = + std::tuple>>, + double, std::tuple, double>>{std::tuple< + double, + std::vector< + std::complex>>{ + std::numeric_limits::quiet_NaN( + ), + std::vector< + std::complex>(2, + std::complex( + std::numeric_limits::quiet_NaN( + ), + std::numeric_limits::quiet_NaN( + )))}, + std::numeric_limits::quiet_NaN(), + std::tuple, double>{Eigen::Matrix::Constant(3, + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::quiet_NaN()}}; + std::tuple>>, + double, std::tuple, double>> nested3 = + std::tuple>>, + double, std::tuple, double>>{std::tuple< + double, + std::vector< + std::complex>>{ + std::numeric_limits::quiet_NaN( + ), + std::vector< + std::complex>(2, + std::complex( + std::numeric_limits::quiet_NaN( + ), + std::numeric_limits::quiet_NaN( + )))}, + std::numeric_limits::quiet_NaN(), + std::tuple, double>{Eigen::Matrix::Constant(3, + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::quiet_NaN()}}; + if (stan::math::logical_negation( + (stan::math::primitive_value(emit_transformed_parameters__) || + stan::math::primitive_value(emit_generated_quantities__)))) { + return ; + } + current_statement__ = 1; + stan::model::assign(d2, + stan::math::promote_scalar< + std::tuple, + std::complex>>(d), "assigning variable d2"); + current_statement__ = 2; + stan::model::assign(V3, + stan::math::promote_scalar< + std::tuple>(V2), + "assigning variable V3"); + current_statement__ = 3; + stan::model::assign(arrs2, + stan::math::promote_scalar< + std::tuple>>(arrs), + "assigning variable arrs2"); + current_statement__ = 4; + stan::model::assign(nested2, + stan::math::promote_scalar< + std::tuple< + std::tuple>, + local_scalar_t__, std::tuple>>( + nested), "assigning variable nested2"); + current_statement__ = 10; + stan::model::assign(nested3, + stan::math::promote_scalar< + std::tuple< + std::tuple>, + local_scalar_t__, std::tuple>>( + nested), "assigning variable nested3"); + if (emit_transformed_parameters__) { + current_statement__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + out__.write(std::get<0>(d2)[(sym1__ - 1)]); + } + current_statement__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + out__.write(std::get<1>(d2)[(sym1__ - 1)]); + } + out__.write(std::get<0>(V3)); + out__.write(std::get<1>(V3)); + current_statement__ = 3; + for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { + out__.write(std::get<0>(arrs2[(sym1__ - 1)])); + current_statement__ = 3; + for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { + out__.write(std::get<1>(arrs2[(sym1__ - 1)])[(sym2__ - 1)]); + } + } + out__.write(std::get<0>(std::get<0>(nested2))); + current_statement__ = 4; + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + out__.write(std::get<1>(std::get<0>(nested2))[(sym1__ - 1)]); + } + out__.write(std::get<1>(nested2)); + out__.write(std::get<0>(std::get<2>(nested2))); + out__.write(std::get<1>(std::get<2>(nested2))); + out__.write(std::get<0>(std::get<0>(nested3))); + current_statement__ = 5; + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + out__.write(std::get<1>(std::get<0>(nested3))[(sym1__ - 1)]); + } + out__.write(std::get<1>(nested3)); + out__.write(std::get<0>(std::get<2>(nested3))); + out__.write(std::get<1>(std::get<2>(nested3))); + } + if (stan::math::logical_negation(emit_generated_quantities__)) { + return ; + } + int y = std::numeric_limits::min(); + current_statement__ = 6; + y = 1; + std::tuple x = + std::tuple{std::numeric_limits::quiet_NaN(), + std::numeric_limits::quiet_NaN()}; + current_statement__ = 7; + stan::model::assign(x, std::forward_as_tuple(y, 3), + "assigning variable x"); + std::tuple, double> z = + std::tuple, double>{std::complex( + std::numeric_limits::quiet_NaN( + ), + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::quiet_NaN()}; + current_statement__ = 8; + stan::model::assign(z, + stan::math::promote_scalar, double>>( + x), "assigning variable z"); + std::tuple, double> z2 = + std::tuple, double>{std::complex( + std::numeric_limits::quiet_NaN( + ), + std::numeric_limits::quiet_NaN( + )), + std::numeric_limits::quiet_NaN()}; + current_statement__ = 9; + stan::model::assign(z2, z, "assigning variable z2"); + out__.write(y); + out__.write(std::get<0>(x)); + out__.write(std::get<1>(x)); + out__.write(std::get<0>(z)); + out__.write(std::get<1>(z)); + out__.write(std::get<0>(z2)); + out__.write(std::get<1>(z2)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr, + stan::require_vector_like_vt* = nullptr> + inline void + unconstrain_array_impl(const VecVar& params_r__, const VecI& params_i__, + VecVar& vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + } + template * = nullptr> + inline void + transform_inits_impl(const stan::io::var_context& context__, VecVar& + vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + } + inline void + get_param_names(std::vector& names__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + names__ = std::vector{}; + if (emit_transformed_parameters__) { + std::vector + temp{"d2.1", "d2.2", "V3.1", "V3.2", "arrs2.1", "arrs2.2", + "nested2.1.1", "nested2.1.2", "nested2.2", "nested2.3.1", + "nested2.3.2", "nested3.1.1", "nested3.1.2", "nested3.2", + "nested3.3.1", "nested3.3.2"}; + names__.reserve(names__.size() + temp.size()); + names__.insert(names__.end(), temp.begin(), temp.end()); + } + if (emit_generated_quantities__) { + std::vector + temp{"y", "x.1", "x.2", "z.1", "z.2", "z2.1", "z2.2"}; + names__.reserve(names__.size() + temp.size()); + names__.insert(names__.end(), temp.begin(), temp.end()); + } + } + inline void + get_dims(std::vector>& dimss__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + dimss__ = std::vector>{}; + if (emit_transformed_parameters__) { + std::vector> + temp{std::vector{static_cast(3), + static_cast(2)}, + std::vector{static_cast(3), + static_cast(2)}, + std::vector{static_cast(3)}, + std::vector{}, + std::vector{static_cast(4)}, + std::vector{static_cast(4), + static_cast(2), static_cast(2)}, + std::vector{}, + std::vector{static_cast(2), + static_cast(2)}, std::vector{}, + std::vector{static_cast(3)}, + std::vector{}, std::vector{}, + std::vector{static_cast(2), + static_cast(2)}, std::vector{}, + std::vector{static_cast(3)}, + std::vector{}}; + dimss__.reserve(dimss__.size() + temp.size()); + dimss__.insert(dimss__.end(), temp.begin(), temp.end()); + } + if (emit_generated_quantities__) { + std::vector> + temp{std::vector{}, std::vector{}, + std::vector{}, + std::vector{static_cast(2)}, + std::vector{}, + std::vector{static_cast(2)}, + std::vector{}}; + dimss__.reserve(dimss__.size() + temp.size()); + dimss__.insert(dimss__.end(), temp.begin(), temp.end()); + } + } + inline void + constrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + if (emit_transformed_parameters__) { + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "imag"); + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "imag"); + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "V3" + ':' + + std::to_string(1) + '.' + std::to_string(sym1__)); + } + param_names__.emplace_back(std::string() + "V3" + ':' + + std::to_string(2)); + for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { + param_names__.emplace_back(std::string() + "arrs2" + '.' + + std::to_string(sym1__) + ':' + std::to_string(1)); + for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { + param_names__.emplace_back(std::string() + "arrs2" + '.' + + std::to_string(sym1__) + ':' + std::to_string(2) + '.' + + std::to_string(sym2__) + '.' + "real"); + param_names__.emplace_back(std::string() + "arrs2" + '.' + + std::to_string(sym1__) + ':' + std::to_string(2) + '.' + + std::to_string(sym2__) + '.' + "imag"); + } + } + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(1) + ':' + std::to_string(1)); + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "imag"); + } + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(2)); + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(3) + ':' + std::to_string(1) + '.' + + std::to_string(sym1__)); + } + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(3) + ':' + std::to_string(2)); + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(1) + ':' + std::to_string(1)); + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "imag"); + } + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(2)); + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(3) + ':' + std::to_string(1) + '.' + + std::to_string(sym1__)); + } + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(3) + ':' + std::to_string(2)); + } + if (emit_generated_quantities__) { + param_names__.emplace_back(std::string() + "y"); + param_names__.emplace_back(std::string() + "x" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "x" + ':' + + std::to_string(2)); + param_names__.emplace_back(std::string() + "z" + ':' + + std::to_string(1) + '.' + "real"); + param_names__.emplace_back(std::string() + "z" + ':' + + std::to_string(1) + '.' + "imag"); + param_names__.emplace_back(std::string() + "z" + ':' + + std::to_string(2)); + param_names__.emplace_back(std::string() + "z2" + ':' + + std::to_string(1) + '.' + "real"); + param_names__.emplace_back(std::string() + "z2" + ':' + + std::to_string(1) + '.' + "imag"); + param_names__.emplace_back(std::string() + "z2" + ':' + + std::to_string(2)); + } + } + inline void + unconstrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + if (emit_transformed_parameters__) { + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "imag"); + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "d2" + ':' + + std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "imag"); + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "V3" + ':' + + std::to_string(1) + '.' + std::to_string(sym1__)); + } + param_names__.emplace_back(std::string() + "V3" + ':' + + std::to_string(2)); + for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { + param_names__.emplace_back(std::string() + "arrs2" + '.' + + std::to_string(sym1__) + ':' + std::to_string(1)); + for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { + param_names__.emplace_back(std::string() + "arrs2" + '.' + + std::to_string(sym1__) + ':' + std::to_string(2) + '.' + + std::to_string(sym2__) + '.' + "real"); + param_names__.emplace_back(std::string() + "arrs2" + '.' + + std::to_string(sym1__) + ':' + std::to_string(2) + '.' + + std::to_string(sym2__) + '.' + "imag"); + } + } + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(1) + ':' + std::to_string(1)); + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "imag"); + } + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(2)); + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(3) + ':' + std::to_string(1) + '.' + + std::to_string(sym1__)); + } + param_names__.emplace_back(std::string() + "nested2" + ':' + + std::to_string(3) + ':' + std::to_string(2)); + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(1) + ':' + std::to_string(1)); + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "real"); + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(1) + ':' + std::to_string(2) + '.' + + std::to_string(sym1__) + '.' + "imag"); + } + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(2)); + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(3) + ':' + std::to_string(1) + '.' + + std::to_string(sym1__)); + } + param_names__.emplace_back(std::string() + "nested3" + ':' + + std::to_string(3) + ':' + std::to_string(2)); + } + if (emit_generated_quantities__) { + param_names__.emplace_back(std::string() + "y"); + param_names__.emplace_back(std::string() + "x" + ':' + + std::to_string(1)); + param_names__.emplace_back(std::string() + "x" + ':' + + std::to_string(2)); + param_names__.emplace_back(std::string() + "z" + ':' + + std::to_string(1) + '.' + "real"); + param_names__.emplace_back(std::string() + "z" + ':' + + std::to_string(1) + '.' + "imag"); + param_names__.emplace_back(std::string() + "z" + ':' + + std::to_string(2)); + param_names__.emplace_back(std::string() + "z2" + ':' + + std::to_string(1) + '.' + "real"); + param_names__.emplace_back(std::string() + "z2" + ':' + + std::to_string(1) + '.' + "imag"); + param_names__.emplace_back(std::string() + "z2" + ':' + + std::to_string(2)); + } + } + inline std::string get_constrained_sizedtypes() const { + return std::string("[{\"name\":\"d2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}},{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}}]},\"block\":\"transformed_parameters\"},{\"name\":\"V3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]},\"block\":\"transformed_parameters\"},{\"name\":\"arrs2\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(4) + ",\"element_type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]}},\"block\":\"transformed_parameters\"},{\"name\":\"nested2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"nested3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"y\",\"type\":{\"name\":\"int\"},\"block\":\"generated_quantities\"},{\"name\":\"x\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"}]"); + } + inline std::string get_unconstrained_sizedtypes() const { + return std::string("[{\"name\":\"d2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}},{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}}]},\"block\":\"transformed_parameters\"},{\"name\":\"V3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]},\"block\":\"transformed_parameters\"},{\"name\":\"arrs2\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(4) + ",\"element_type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]}},\"block\":\"transformed_parameters\"},{\"name\":\"nested2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"nested3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"y\",\"type\":{\"name\":\"int\"},\"block\":\"generated_quantities\"},{\"name\":\"x\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"}]"); + } + // Begin method overload boilerplate + template inline void + write_array(RNG& base_rng, Eigen::Matrix& params_r, + Eigen::Matrix& vars, const bool + emit_transformed_parameters = true, const bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = 0; + const size_t num_transformed = emit_transformed_parameters * (((((((3 * + 2) + (3 * 2)) + (3 + 1)) + (4 * (1 + (2 * 2)))) + (((1 + (2 * 2)) + 1) + + (3 + 1))) + (((1 + (2 * 2)) + 1) + (3 + 1)))); + const size_t num_gen_quantities = emit_generated_quantities * ((((1 + (1 + + 1)) + (2 + 1)) + (2 + 1))); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + std::vector params_i; + vars = Eigen::Matrix::Constant(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline void + write_array(RNG& base_rng, std::vector& params_r, std::vector& + params_i, std::vector& vars, bool + emit_transformed_parameters = true, bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = 0; + const size_t num_transformed = emit_transformed_parameters * (((((((3 * + 2) + (3 * 2)) + (3 + 1)) + (4 * (1 + (2 * 2)))) + (((1 + (2 * 2)) + 1) + + (3 + 1))) + (((1 + (2 * 2)) + 1) + (3 + 1)))); + const size_t num_gen_quantities = emit_generated_quantities * ((((1 + (1 + + 1)) + (2 + 1)) + (2 + 1))); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + vars = std::vector(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline T_ + log_prob(Eigen::Matrix& params_r, std::ostream* pstream = nullptr) const { + Eigen::Matrix params_i; + return log_prob_impl(params_r, params_i, pstream); + } + template inline T_ + log_prob(std::vector& params_r, std::vector& params_i, + std::ostream* pstream = nullptr) const { + return log_prob_impl(params_r, params_i, pstream); + } + inline void + transform_inits(const stan::io::var_context& context, + Eigen::Matrix& params_r, std::ostream* + pstream = nullptr) const final { + std::vector params_r_vec(params_r.size()); + std::vector params_i; + transform_inits(context, params_i, params_r_vec, pstream); + params_r = Eigen::Map>(params_r_vec.data(), + params_r_vec.size()); + } + inline void + transform_inits(const stan::io::var_context& context, std::vector& + params_i, std::vector& vars, std::ostream* + pstream__ = nullptr) const { + vars.resize(num_params_r__); + transform_inits_impl(context, vars, pstream__); + } + inline void + unconstrain_array(const std::vector& params_constrained, + std::vector& params_unconstrained, std::ostream* + pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = std::vector(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } + inline void + unconstrain_array(const Eigen::Matrix& params_constrained, + Eigen::Matrix& params_unconstrained, + std::ostream* pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = Eigen::Matrix::Constant(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } +}; +} +using stan_model = tuple_promotion_model_namespace::tuple_promotion_model; +#ifndef USING_R +// Boilerplate +stan::model::model_base& +new_model(stan::io::var_context& data_context, unsigned int seed, + std::ostream* msg_stream) { + stan_model* m = new stan_model(data_context, seed, msg_stream); + return *m; +} +stan::math::profile_map& get_stan_profile_data() { + return tuple_promotion_model_namespace::profiles__; +} +#endif + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple-templating.stan +// Code generated by %%NAME%% %%VERSION%% +#include +namespace tuple_templating_model_namespace { +using stan::model::model_base_crtp; +using namespace stan::math; +stan::math::profile_map profiles__; +static constexpr std::array locations_array__ = + {" (found before start of program)", + " (in 'tuple-templating.stan', line 34, column 2 to column 26)", + " (in 'tuple-templating.stan', line 32, column 2 to column 19)", + " (in 'tuple-templating.stan', line 36, column 2 to column 22)", + " (in 'tuple-templating.stan', line 39, column 2 to column 68)", + " (in 'tuple-templating.stan', line 24, column 2 to column 8)", + " (in 'tuple-templating.stan', line 25, column 9 to column 10)", + " (in 'tuple-templating.stan', line 25, column 12 to column 13)", + " (in 'tuple-templating.stan', line 25, column 2 to column 18)", + " (in 'tuple-templating.stan', line 26, column 9 to column 10)", + " (in 'tuple-templating.stan', line 26, column 12 to column 13)", + " (in 'tuple-templating.stan', line 26, column 2 to column 18)", + " (in 'tuple-templating.stan', line 27, column 8 to column 9)", + " (in 'tuple-templating.stan', line 27, column 2 to column 18)", + " (in 'tuple-templating.stan', line 28, column 8 to column 9)", + " (in 'tuple-templating.stan', line 28, column 2 to column 19)", + " (in 'tuple-templating.stan', line 3, column 4 to column 18)", + " (in 'tuple-templating.stan', line 2, column 35 to line 4, column 3)", + " (in 'tuple-templating.stan', line 7, column 4 to column 20)", + " (in 'tuple-templating.stan', line 6, column 48 to line 8, column 3)", + " (in 'tuple-templating.stan', line 11, column 4 to column 21)", + " (in 'tuple-templating.stan', line 10, column 44 to line 12, column 3)", + " (in 'tuple-templating.stan', line 15, column 4 to column 18)", + " (in 'tuple-templating.stan', line 14, column 38 to line 16, column 3)", + " (in 'tuple-templating.stan', line 20, column 4 to column 18)", + " (in 'tuple-templating.stan', line 19, column 57 to line 21, column 3)"}; +template , + stan::is_vt_not_complex, + std::is_integral>>* = nullptr> +void foo(const std::tuple& test, std::ostream* pstream__); +template , + stan::is_stan_scalar>* = nullptr> +std::decay_t> +tsum(const std::tuple, std::vector>& s, + std::ostream* pstream__); +template , + stan::is_vt_not_complex, + std::is_integral>>* = nullptr> +void +foo2(const std::vector>& test, std::ostream* + pstream__); +template , + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>* = nullptr> +void foo3(const std::tuple& test, std::ostream* pstream__); +template , + std::is_integral>, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex, + stan::is_stan_scalar, + std::is_integral>, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>* = nullptr> +void +overly_complicated(const std::tuple< + std::vector>, + std::tuple, T0__2__>& t1, + const std::vector>& t2, + std::ostream* pstream__); +template , + stan::is_vt_not_complex, + std::is_integral>>*> +void foo(const std::tuple& test, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 16; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(test)); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +template , + stan::is_stan_scalar>*> +std::decay_t> +tsum(const std::tuple, std::vector>& s, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 18; + return stan::math::sum(std::get<1>(s)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +template , + stan::is_vt_not_complex, + std::is_integral>>*> +void +foo2(const std::vector>& test, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 20; + if (pstream__) { + stan::math::stan_print(pstream__, + std::get<0>( + stan::model::rvalue(test, "test", stan::model::index_uni(1)))); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +template , + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>*> +void foo3(const std::tuple& test, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 22; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(test)); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +template , + std::is_integral>, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex, + stan::is_stan_scalar, + std::is_integral>, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>*> +void +overly_complicated(const std::tuple< + std::vector>, + std::tuple, T0__2__>& t1, + const std::vector>& t2, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + T0__2__, + stan::base_type_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 24; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(std::get<1>(t1))); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +class tuple_templating_model final : public model_base_crtp { + private: + int N; + Eigen::Matrix m1_data__; + Eigen::Matrix m2_data__; + std::vector a1; + std::vector a2; + Eigen::Map> m1{nullptr, 0, 0}; + Eigen::Map> m2{nullptr, 0, 0}; + public: + ~tuple_templating_model() {} + tuple_templating_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) + : model_base_crtp(0) { + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + using local_scalar_t__ = double; + boost::ecuyer1988 base_rng__ = + stan::services::util::create_rng(random_seed__, 0); + // suppress unused var warning + (void) base_rng__; + static constexpr const char* function__ = + "tuple_templating_model_namespace::tuple_templating_model"; + // suppress unused var warning + (void) function__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 5; + context__.validate_dims("data initialization", "N", "int", + std::vector{}); + N = std::numeric_limits::min(); + current_statement__ = 5; + N = context__.vals_i("N")[(1 - 1)]; + current_statement__ = 6; + stan::math::validate_non_negative_index("m1", "N", N); + current_statement__ = 7; + stan::math::validate_non_negative_index("m1", "N", N); + current_statement__ = 8; + context__.validate_dims("data initialization", "m1", "double", + std::vector{static_cast(N), static_cast(N)}); + m1_data__ = Eigen::Matrix::Constant(N, N, + std::numeric_limits::quiet_NaN()); + new (&m1) Eigen::Map>(m1_data__.data(), N, + N); + { + std::vector m1_flat__; + current_statement__ = 8; + m1_flat__ = context__.vals_r("m1"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + for (int sym2__ = 1; sym2__ <= N; ++sym2__) { + stan::model::assign(m1, m1_flat__[(pos__ - 1)], + "assigning variable m1", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + current_statement__ = 9; + stan::math::validate_non_negative_index("m2", "N", N); current_statement__ = 10; - stan::model::assign(nested3, - stan::math::promote_scalar< - std::tuple< - std::tuple>, - local_scalar_t__, std::tuple>>( - nested), "assigning variable nested3"); + stan::math::validate_non_negative_index("m2", "N", N); + current_statement__ = 11; + context__.validate_dims("data initialization", "m2", "double", + std::vector{static_cast(N), static_cast(N)}); + m2_data__ = Eigen::Matrix::Constant(N, N, + std::numeric_limits::quiet_NaN()); + new (&m2) Eigen::Map>(m2_data__.data(), N, + N); + { + std::vector m2_flat__; + current_statement__ = 11; + m2_flat__ = context__.vals_r("m2"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + for (int sym2__ = 1; sym2__ <= N; ++sym2__) { + stan::model::assign(m2, m2_flat__[(pos__ - 1)], + "assigning variable m2", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + current_statement__ = 12; + stan::math::validate_non_negative_index("a1", "N", N); + current_statement__ = 13; + context__.validate_dims("data initialization", "a1", "int", + std::vector{static_cast(N)}); + a1 = std::vector(N, std::numeric_limits::min()); + current_statement__ = 13; + a1 = context__.vals_i("a1"); + current_statement__ = 14; + stan::math::validate_non_negative_index("a2", "N", N); + current_statement__ = 15; + context__.validate_dims("data initialization", "a2", "double", + std::vector{static_cast(N)}); + a2 = std::vector(N, std::numeric_limits::quiet_NaN()); + current_statement__ = 15; + a2 = context__.vals_r("a2"); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } + num_params_r__ = 0U; + } + inline std::string model_name() const final { + return "tuple_templating_model"; + } + inline std::vector model_compile_info() const noexcept { + return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", + "stancflags = -fsoa --print-cpp"}; + } + // Base log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_not_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_templating_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + // Reverse mode autodiff log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_templating_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -9364,6 +10905,8 @@ class tuple_promotion_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -9372,186 +10915,49 @@ class tuple_promotion_model final : public model_base_crtp>, - std::vector>> d2 = - std::tuple>, - std::vector>>{std::vector< - std::complex>(3, - std::complex(std::numeric_limits::quiet_NaN( - ), - std::numeric_limits::quiet_NaN( - ))), - std::vector>(3, - std::complex(std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN()))}; - std::tuple, double> V3 = - std::tuple, double>{Eigen::Matrix::Constant(3, - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::quiet_NaN()}; - std::vector>>> - arrs2 = - std::vector>>>(4, - std::tuple>>{std::numeric_limits::quiet_NaN( - ), - std::vector>(2, - std::complex(std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN()))}); - std::tuple>>, - double, std::tuple, double>> nested2 = - std::tuple>>, - double, std::tuple, double>>{std::tuple< - double, - std::vector< - std::complex>>{ - std::numeric_limits::quiet_NaN( - ), - std::vector< - std::complex>(2, - std::complex( - std::numeric_limits::quiet_NaN( - ), - std::numeric_limits::quiet_NaN( - )))}, - std::numeric_limits::quiet_NaN(), - std::tuple, double>{Eigen::Matrix::Constant(3, - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::quiet_NaN()}}; - std::tuple>>, - double, std::tuple, double>> nested3 = - std::tuple>>, - double, std::tuple, double>>{std::tuple< - double, - std::vector< - std::complex>>{ - std::numeric_limits::quiet_NaN( - ), - std::vector< - std::complex>(2, - std::complex( - std::numeric_limits::quiet_NaN( - ), - std::numeric_limits::quiet_NaN( - )))}, - std::numeric_limits::quiet_NaN(), - std::tuple, double>{Eigen::Matrix::Constant(3, - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::quiet_NaN()}}; if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { return ; } - current_statement__ = 1; - stan::model::assign(d2, - stan::math::promote_scalar< - std::tuple, - std::complex>>(d), "assigning variable d2"); - current_statement__ = 2; - stan::model::assign(V3, - stan::math::promote_scalar< - std::tuple>(V2), - "assigning variable V3"); - current_statement__ = 3; - stan::model::assign(arrs2, - stan::math::promote_scalar< - std::tuple>>(arrs), - "assigning variable arrs2"); - current_statement__ = 4; - stan::model::assign(nested2, - stan::math::promote_scalar< - std::tuple< - std::tuple>, - local_scalar_t__, std::tuple>>( - nested), "assigning variable nested2"); - current_statement__ = 10; - stan::model::assign(nested3, - stan::math::promote_scalar< - std::tuple< - std::tuple>, - local_scalar_t__, std::tuple>>( - nested), "assigning variable nested3"); - if (emit_transformed_parameters__) { - current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - out__.write(std::get<0>(d2)[(sym1__ - 1)]); - } - current_statement__ = 1; - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - out__.write(std::get<1>(d2)[(sym1__ - 1)]); - } - out__.write(std::get<0>(V3)); - out__.write(std::get<1>(V3)); - current_statement__ = 3; - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - out__.write(std::get<0>(arrs2[(sym1__ - 1)])); - current_statement__ = 3; - for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { - out__.write(std::get<1>(arrs2[(sym1__ - 1)])[(sym2__ - 1)]); - } - } - out__.write(std::get<0>(std::get<0>(nested2))); - current_statement__ = 4; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - out__.write(std::get<1>(std::get<0>(nested2))[(sym1__ - 1)]); - } - out__.write(std::get<1>(nested2)); - out__.write(std::get<0>(std::get<2>(nested2))); - out__.write(std::get<1>(std::get<2>(nested2))); - out__.write(std::get<0>(std::get<0>(nested3))); - current_statement__ = 5; - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - out__.write(std::get<1>(std::get<0>(nested3))[(sym1__ - 1)]); - } - out__.write(std::get<1>(nested3)); - out__.write(std::get<0>(std::get<2>(nested3))); - out__.write(std::get<1>(std::get<2>(nested3))); - } if (stan::math::logical_negation(emit_generated_quantities__)) { return ; } - int y = std::numeric_limits::min(); - current_statement__ = 6; - y = 1; - std::tuple x = - std::tuple{std::numeric_limits::quiet_NaN(), - std::numeric_limits::quiet_NaN()}; - current_statement__ = 7; - stan::model::assign(x, std::forward_as_tuple(y, 3), - "assigning variable x"); - std::tuple, double> z = - std::tuple, double>{std::complex( - std::numeric_limits::quiet_NaN( - ), - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::quiet_NaN()}; - current_statement__ = 8; - stan::model::assign(z, - stan::math::promote_scalar, double>>( - x), "assigning variable z"); - std::tuple, double> z2 = - std::tuple, double>{std::complex( - std::numeric_limits::quiet_NaN( - ), - std::numeric_limits::quiet_NaN( - )), - std::numeric_limits::quiet_NaN()}; - current_statement__ = 9; - stan::model::assign(z2, z, "assigning variable z2"); - out__.write(y); - out__.write(std::get<0>(x)); - out__.write(std::get<1>(x)); - out__.write(std::get<0>(z)); - out__.write(std::get<1>(z)); - out__.write(std::get<0>(z2)); - out__.write(std::get<1>(z2)); + current_statement__ = 2; + foo( + std::tuple, int>(stan::math::add(m1, m2), + 1), pstream__); + double s = std::numeric_limits::quiet_NaN(); + current_statement__ = 1; + s = tsum(std::tuple, std::vector>(a1, a2), + pstream__); + current_statement__ = 3; + foo2( + std::vector, int>>{std::tuple< + Eigen::Matrix, + int>( + stan::math::add( + m1, m2), + 1)}, + pstream__); + current_statement__ = 4; + overly_complicated( + std::tuple>, + std::tuple>, double>(std::vector< + Eigen::Matrix>{ + stan::math::add( + m1, m2)}, + std::tuple>(1, m1), 3.5), + std::vector>>{std::tuple< + int, + Eigen::Matrix>(1, + m1), + std::tuple>(2, m2)}, pstream__); + out__.write(s); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -9566,6 +10972,8 @@ class tuple_promotion_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9577,6 +10985,8 @@ class tuple_promotion_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -9586,18 +10996,9 @@ class tuple_promotion_model final : public model_base_crtp{}; - if (emit_transformed_parameters__) { - std::vector - temp{"d2.1", "d2.2", "V3.1", "V3.2", "arrs2.1", "arrs2.2", - "nested2.1.1", "nested2.1.2", "nested2.2", "nested2.3.1", - "nested2.3.2", "nested3.1.1", "nested3.1.2", "nested3.2", - "nested3.3.1", "nested3.3.2"}; - names__.reserve(names__.size() + temp.size()); - names__.insert(names__.end(), temp.begin(), temp.end()); - } + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) { - std::vector - temp{"y", "x.1", "x.2", "z.1", "z.2", "z2.1", "z2.2"}; + std::vector temp{"s"}; names__.reserve(names__.size() + temp.size()); names__.insert(names__.end(), temp.begin(), temp.end()); } @@ -9607,37 +11008,9 @@ class tuple_promotion_model final : public model_base_crtp>{}; - if (emit_transformed_parameters__) { - std::vector> - temp{std::vector{static_cast(3), - static_cast(2)}, - std::vector{static_cast(3), - static_cast(2)}, - std::vector{static_cast(3)}, - std::vector{}, - std::vector{static_cast(4)}, - std::vector{static_cast(4), - static_cast(2), static_cast(2)}, - std::vector{}, - std::vector{static_cast(2), - static_cast(2)}, std::vector{}, - std::vector{static_cast(3)}, - std::vector{}, std::vector{}, - std::vector{static_cast(2), - static_cast(2)}, std::vector{}, - std::vector{static_cast(3)}, - std::vector{}}; - dimss__.reserve(dimss__.size() + temp.size()); - dimss__.insert(dimss__.end(), temp.begin(), temp.end()); - } + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) { - std::vector> - temp{std::vector{}, std::vector{}, - std::vector{}, - std::vector{static_cast(2)}, - std::vector{}, - std::vector{static_cast(2)}, - std::vector{}}; + std::vector> temp{std::vector{}}; dimss__.reserve(dimss__.size() + temp.size()); dimss__.insert(dimss__.end(), temp.begin(), temp.end()); } @@ -9646,195 +11019,25 @@ class tuple_promotion_model final : public model_base_crtp& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - if (emit_transformed_parameters__) { - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "imag"); - } - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "imag"); - } - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "V3" + ':' + - std::to_string(1) + '.' + std::to_string(sym1__)); - } - param_names__.emplace_back(std::string() + "V3" + ':' + - std::to_string(2)); - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - param_names__.emplace_back(std::string() + "arrs2" + '.' + - std::to_string(sym1__) + ':' + std::to_string(1)); - for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { - param_names__.emplace_back(std::string() + "arrs2" + '.' + - std::to_string(sym1__) + ':' + std::to_string(2) + '.' + - std::to_string(sym2__) + '.' + "real"); - param_names__.emplace_back(std::string() + "arrs2" + '.' + - std::to_string(sym1__) + ':' + std::to_string(2) + '.' + - std::to_string(sym2__) + '.' + "imag"); - } - } - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(1) + ':' + std::to_string(1)); - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "imag"); - } - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(2)); - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(3) + ':' + std::to_string(1) + '.' + - std::to_string(sym1__)); - } - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(3) + ':' + std::to_string(2)); - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(1) + ':' + std::to_string(1)); - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "imag"); - } - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(2)); - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(3) + ':' + std::to_string(1) + '.' + - std::to_string(sym1__)); - } - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(3) + ':' + std::to_string(2)); - } + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) { - param_names__.emplace_back(std::string() + "y"); - param_names__.emplace_back(std::string() + "x" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "x" + ':' + - std::to_string(2)); - param_names__.emplace_back(std::string() + "z" + ':' + - std::to_string(1) + '.' + "real"); - param_names__.emplace_back(std::string() + "z" + ':' + - std::to_string(1) + '.' + "imag"); - param_names__.emplace_back(std::string() + "z" + ':' + - std::to_string(2)); - param_names__.emplace_back(std::string() + "z2" + ':' + - std::to_string(1) + '.' + "real"); - param_names__.emplace_back(std::string() + "z2" + ':' + - std::to_string(1) + '.' + "imag"); - param_names__.emplace_back(std::string() + "z2" + ':' + - std::to_string(2)); + param_names__.emplace_back(std::string() + "s"); } } inline void unconstrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - if (emit_transformed_parameters__) { - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(1) + '.' + std::to_string(sym1__) + '.' + "imag"); - } - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "d2" + ':' + - std::to_string(2) + '.' + std::to_string(sym1__) + '.' + "imag"); - } - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "V3" + ':' + - std::to_string(1) + '.' + std::to_string(sym1__)); - } - param_names__.emplace_back(std::string() + "V3" + ':' + - std::to_string(2)); - for (int sym1__ = 1; sym1__ <= 4; ++sym1__) { - param_names__.emplace_back(std::string() + "arrs2" + '.' + - std::to_string(sym1__) + ':' + std::to_string(1)); - for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { - param_names__.emplace_back(std::string() + "arrs2" + '.' + - std::to_string(sym1__) + ':' + std::to_string(2) + '.' + - std::to_string(sym2__) + '.' + "real"); - param_names__.emplace_back(std::string() + "arrs2" + '.' + - std::to_string(sym1__) + ':' + std::to_string(2) + '.' + - std::to_string(sym2__) + '.' + "imag"); - } - } - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(1) + ':' + std::to_string(1)); - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "imag"); - } - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(2)); - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(3) + ':' + std::to_string(1) + '.' + - std::to_string(sym1__)); - } - param_names__.emplace_back(std::string() + "nested2" + ':' + - std::to_string(3) + ':' + std::to_string(2)); - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(1) + ':' + std::to_string(1)); - for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "real"); - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(1) + ':' + std::to_string(2) + '.' + - std::to_string(sym1__) + '.' + "imag"); - } - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(2)); - for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(3) + ':' + std::to_string(1) + '.' + - std::to_string(sym1__)); - } - param_names__.emplace_back(std::string() + "nested3" + ':' + - std::to_string(3) + ':' + std::to_string(2)); - } + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) { - param_names__.emplace_back(std::string() + "y"); - param_names__.emplace_back(std::string() + "x" + ':' + - std::to_string(1)); - param_names__.emplace_back(std::string() + "x" + ':' + - std::to_string(2)); - param_names__.emplace_back(std::string() + "z" + ':' + - std::to_string(1) + '.' + "real"); - param_names__.emplace_back(std::string() + "z" + ':' + - std::to_string(1) + '.' + "imag"); - param_names__.emplace_back(std::string() + "z" + ':' + - std::to_string(2)); - param_names__.emplace_back(std::string() + "z2" + ':' + - std::to_string(1) + '.' + "real"); - param_names__.emplace_back(std::string() + "z2" + ':' + - std::to_string(1) + '.' + "imag"); - param_names__.emplace_back(std::string() + "z2" + ':' + - std::to_string(2)); + param_names__.emplace_back(std::string() + "s"); } } inline std::string get_constrained_sizedtypes() const { - return std::string("[{\"name\":\"d2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}},{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}}]},\"block\":\"transformed_parameters\"},{\"name\":\"V3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]},\"block\":\"transformed_parameters\"},{\"name\":\"arrs2\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(4) + ",\"element_type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]}},\"block\":\"transformed_parameters\"},{\"name\":\"nested2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"nested3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"y\",\"type\":{\"name\":\"int\"},\"block\":\"generated_quantities\"},{\"name\":\"x\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"}]"); + return std::string("[{\"name\":\"s\",\"type\":{\"name\":\"real\"},\"block\":\"generated_quantities\"}]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[{\"name\":\"d2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}},{\"name\":\"array\",\"length\":" + std::to_string(3) + ",\"element_type\":{\"name\":\"complex\"}}]},\"block\":\"transformed_parameters\"},{\"name\":\"V3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]},\"block\":\"transformed_parameters\"},{\"name\":\"arrs2\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(4) + ",\"element_type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]}},\"block\":\"transformed_parameters\"},{\"name\":\"nested2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"nested3\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"3\",\"element_types\":[{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"array\",\"length\":" + std::to_string(2) + ",\"element_type\":{\"name\":\"complex\"}}]},{\"name\":\"real\"},{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"vector\",\"length\":" + std::to_string(3) + "},{\"name\":\"real\"}]}]},\"block\":\"transformed_parameters\"},{\"name\":\"y\",\"type\":{\"name\":\"int\"},\"block\":\"generated_quantities\"},{\"name\":\"x\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"real\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"},{\"name\":\"z2\",\"type\":{\"name\":\"tuple\",\"num_elements\":\"2\",\"element_types\":[{\"name\":\"complex\"},{\"name\":\"real\"}]},\"block\":\"generated_quantities\"}]"); + return std::string("[{\"name\":\"s\",\"type\":{\"name\":\"real\"},\"block\":\"generated_quantities\"}]"); } // Begin method overload boilerplate template inline void @@ -9844,11 +11047,8 @@ class tuple_promotion_model final : public model_base_crtp params_i; @@ -9864,11 +11064,8 @@ class tuple_promotion_model final : public model_base_crtp(num_to_write, @@ -9925,7 +11122,7 @@ class tuple_promotion_model final : public model_base_crtp -namespace tuple_templating_model_namespace { +namespace tuple_hof_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-templating.stan', line 34, column 2 to column 26)", - " (in 'tuple-templating.stan', line 32, column 2 to column 19)", - " (in 'tuple-templating.stan', line 36, column 2 to column 22)", - " (in 'tuple-templating.stan', line 39, column 2 to column 68)", - " (in 'tuple-templating.stan', line 24, column 2 to column 8)", - " (in 'tuple-templating.stan', line 25, column 9 to column 10)", - " (in 'tuple-templating.stan', line 25, column 12 to column 13)", - " (in 'tuple-templating.stan', line 25, column 2 to column 18)", - " (in 'tuple-templating.stan', line 26, column 9 to column 10)", - " (in 'tuple-templating.stan', line 26, column 12 to column 13)", - " (in 'tuple-templating.stan', line 26, column 2 to column 18)", - " (in 'tuple-templating.stan', line 27, column 8 to column 9)", - " (in 'tuple-templating.stan', line 27, column 2 to column 18)", - " (in 'tuple-templating.stan', line 28, column 8 to column 9)", - " (in 'tuple-templating.stan', line 28, column 2 to column 19)", - " (in 'tuple-templating.stan', line 3, column 4 to column 18)", - " (in 'tuple-templating.stan', line 2, column 35 to line 4, column 3)", - " (in 'tuple-templating.stan', line 7, column 4 to column 20)", - " (in 'tuple-templating.stan', line 6, column 48 to line 8, column 3)", - " (in 'tuple-templating.stan', line 11, column 4 to column 21)", - " (in 'tuple-templating.stan', line 10, column 44 to line 12, column 3)", - " (in 'tuple-templating.stan', line 15, column 4 to column 18)", - " (in 'tuple-templating.stan', line 14, column 38 to line 16, column 3)", - " (in 'tuple-templating.stan', line 20, column 4 to column 18)", - " (in 'tuple-templating.stan', line 19, column 57 to line 21, column 3)"}; -template , - stan::is_vt_not_complex>* = nullptr> -void foo(const std::tuple& test, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -tsum(const std::tuple, std::vector>& s, - std::ostream* pstream__); -template , - stan::is_vt_not_complex>* = nullptr> -void -foo2(const std::vector>& test, std::ostream* - pstream__); -template , - stan::is_eigen_matrix_dynamic, - stan::is_vt_not_complex>* = nullptr> -void foo3(const std::tuple& test, std::ostream* pstream__); -template , - stan::is_eigen_matrix_dynamic, - stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_eigen_matrix_dynamic, - stan::is_vt_not_complex>* = nullptr> -void -overly_complicated(const std::tuple< - std::vector>, - std::tuple, T0__2__>& t1, - const std::vector>& t2, - std::ostream* pstream__); -template , - stan::is_vt_not_complex>*> -void foo(const std::tuple& test, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; - int current_statement__ = 0; - static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; - try { - current_statement__ = 16; - if (pstream__) { - stan::math::stan_print(pstream__, std::get<0>(test)); - *(pstream__) << std::endl; - } - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } -} -template >*> -stan::promote_args_t -tsum(const std::tuple, std::vector>& s, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; - int current_statement__ = 0; - static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; - try { - current_statement__ = 18; - return stan::math::sum(std::get<1>(s)); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } -} -template , - stan::is_vt_not_complex>*> -void -foo2(const std::vector>& test, std::ostream* - pstream__) { - using local_scalar_t__ = stan::promote_args_t>; - int current_statement__ = 0; - static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; - try { - current_statement__ = 20; - if (pstream__) { - stan::math::stan_print(pstream__, - std::get<0>( - stan::model::rvalue(test, "test", stan::model::index_uni(1)))); - *(pstream__) << std::endl; - } - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); + " (in 'tuple_hof.stan', line 16, column 2 to column 24)", + " (in 'tuple_hof.stan', line 19, column 2 to column 50)", + " (in 'tuple_hof.stan', line 8, column 2 to column 8)", + " (in 'tuple_hof.stan', line 9, column 8 to column 9)", + " (in 'tuple_hof.stan', line 9, column 2 to column 23)", + " (in 'tuple_hof.stan', line 10, column 20 to column 21)", + " (in 'tuple_hof.stan', line 10, column 2 to column 35)", + " (in 'tuple_hof.stan', line 13, column 2 to column 49)", + " (in 'tuple_hof.stan', line 16, column 8 to column 9)", + " (in 'tuple_hof.stan', line 4, column 4 to column 30)", + " (in 'tuple_hof.stan', line 3, column 39 to line 5, column 3)"}; +template , + std::is_integral>, + std::is_integral>, + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +fun(const std::vector& y_slice, const T1__& start, const T2__& end, + const std::tuple>& m, std::ostream* pstream__); +struct fun_rsfunctor__ { + template , + std::is_integral>, + std::is_integral>, + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> + std::decay_t> + operator()(const std::vector& y_slice, const T1__& start, const T2__& + end, std::ostream* pstream__, + const std::tuple>& m) const { + return fun(y_slice, (start + 1), (end + 1), m, pstream__); } -} -template , - stan::is_eigen_matrix_dynamic, - stan::is_vt_not_complex>*> -void foo3(const std::tuple& test, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t>; +}; +template , + std::is_integral>, + std::is_integral>, + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::decay_t> +fun(const std::vector& y_slice, const T1__& start, const T2__& end, + const std::tuple>& m, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; - static constexpr bool propto__ = true; - // suppress unused var warning - (void) propto__; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning - (void) DUMMY_VAR__; - try { - current_statement__ = 22; - if (pstream__) { - stan::math::stan_print(pstream__, std::get<0>(test)); - *(pstream__) << std::endl; - } - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } -} -template , - stan::is_eigen_matrix_dynamic, - stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_eigen_matrix_dynamic, - stan::is_vt_not_complex>*> -void -overly_complicated(const std::tuple< - std::vector>, - std::tuple, T0__2__>& t1, - const std::vector>& t2, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t, T0__2__, - stan::base_type_t>; - int current_statement__ = 0; + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -10123,124 +11201,83 @@ overly_complicated(const std::tuple< // suppress unused var warning (void) DUMMY_VAR__; try { - current_statement__ = 24; - if (pstream__) { - stan::math::stan_print(pstream__, std::get<1>(std::get<1>(t1))); - *(pstream__) << std::endl; - } + current_statement__ = 10; + return (stan::math::sum(y_slice) * std::get<0>(m)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -class tuple_templating_model final : public model_base_crtp { +class tuple_hof_model final : public model_base_crtp { private: int N; - Eigen::Matrix m1_data__; - Eigen::Matrix m2_data__; - std::vector a1; - std::vector a2; - Eigen::Map> m1{nullptr, 0, 0}; - Eigen::Map> m2{nullptr, 0, 0}; - public: - ~tuple_templating_model() {} - tuple_templating_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) - : model_base_crtp(0) { - int current_statement__ = 0; - using local_scalar_t__ = double; - boost::ecuyer1988 base_rng__ = - stan::services::util::create_rng(random_seed__, 0); - // suppress unused var warning - (void) base_rng__; - static constexpr const char* function__ = - "tuple_templating_model_namespace::tuple_templating_model"; - // suppress unused var warning - (void) function__; - local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); - // suppress unused var warning - (void) DUMMY_VAR__; - try { - int pos__ = std::numeric_limits::min(); - pos__ = 1; - current_statement__ = 5; - context__.validate_dims("data initialization", "N", "int", - std::vector{}); - N = std::numeric_limits::min(); - current_statement__ = 5; - N = context__.vals_i("N")[(1 - 1)]; - current_statement__ = 6; - stan::math::validate_non_negative_index("m1", "N", N); - current_statement__ = 7; - stan::math::validate_non_negative_index("m1", "N", N); - current_statement__ = 8; - context__.validate_dims("data initialization", "m1", "double", - std::vector{static_cast(N), static_cast(N)}); - m1_data__ = Eigen::Matrix::Constant(N, N, - std::numeric_limits::quiet_NaN()); - new (&m1) Eigen::Map>(m1_data__.data(), N, - N); - { - std::vector m1_flat__; - current_statement__ = 8; - m1_flat__ = context__.vals_r("m1"); - pos__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - stan::model::assign(m1, m1_flat__[(pos__ - 1)], - "assigning variable m1", stan::model::index_uni(sym2__), - stan::model::index_uni(sym1__)); - pos__ = (pos__ + 1); - } - } - } - current_statement__ = 9; - stan::math::validate_non_negative_index("m2", "N", N); - current_statement__ = 10; - stan::math::validate_non_negative_index("m2", "N", N); - current_statement__ = 11; - context__.validate_dims("data initialization", "m2", "double", - std::vector{static_cast(N), static_cast(N)}); - m2_data__ = Eigen::Matrix::Constant(N, N, - std::numeric_limits::quiet_NaN()); - new (&m2) Eigen::Map>(m2_data__.data(), N, - N); - { - std::vector m2_flat__; - current_statement__ = 11; - m2_flat__ = context__.vals_r("m2"); - pos__ = 1; - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - for (int sym2__ = 1; sym2__ <= N; ++sym2__) { - stan::model::assign(m2, m2_flat__[(pos__ - 1)], - "assigning variable m2", stan::model::index_uni(sym2__), - stan::model::index_uni(sym1__)); - pos__ = (pos__ + 1); - } - } - } - current_statement__ = 12; - stan::math::validate_non_negative_index("a1", "N", N); - current_statement__ = 13; - context__.validate_dims("data initialization", "a1", "int", + std::vector data_y; + std::tuple> data_m; + double sum1; + public: + ~tuple_hof_model() {} + tuple_hof_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) + : model_base_crtp(0) { + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + using local_scalar_t__ = double; + boost::ecuyer1988 base_rng__ = + stan::services::util::create_rng(random_seed__, 0); + // suppress unused var warning + (void) base_rng__; + static constexpr const char* function__ = + "tuple_hof_model_namespace::tuple_hof_model"; + // suppress unused var warning + (void) function__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 3; + context__.validate_dims("data initialization", "N", "int", + std::vector{}); + N = std::numeric_limits::min(); + current_statement__ = 3; + N = context__.vals_i("N")[(1 - 1)]; + current_statement__ = 4; + stan::math::validate_non_negative_index("data_y", "N", N); + current_statement__ = 5; + context__.validate_dims("data initialization", "data_y", "double", std::vector{static_cast(N)}); - a1 = std::vector(N, std::numeric_limits::min()); - current_statement__ = 13; - a1 = context__.vals_i("a1"); - current_statement__ = 14; - stan::math::validate_non_negative_index("a2", "N", N); - current_statement__ = 15; - context__.validate_dims("data initialization", "a2", "double", + data_y = std::vector(N, + std::numeric_limits::quiet_NaN()); + current_statement__ = 5; + data_y = context__.vals_r("data_y"); + current_statement__ = 6; + stan::math::validate_non_negative_index("data_m", "N", N); + current_statement__ = 7; + context__.validate_dims("data initialization", "data_m.1", "double", + std::vector{}); + context__.validate_dims("data initialization", "data_m.2", "int", std::vector{static_cast(N)}); - a2 = std::vector(N, std::numeric_limits::quiet_NaN()); - current_statement__ = 15; - a2 = context__.vals_r("a2"); + data_m = std::tuple>{std::numeric_limits::quiet_NaN( + ), + std::vector(N, std::numeric_limits::min())}; + current_statement__ = 7; + std::get<0>(data_m) = context__.vals_r("data_m.1")[(1 - 1)]; + std::get<1>(data_m) = context__.vals_i("data_m.2"); + current_statement__ = 8; + sum1 = std::numeric_limits::quiet_NaN(); + current_statement__ = 8; + sum1 = stan::math::reduce_sum(data_y, 1, pstream__, + data_m); + current_statement__ = 9; + stan::math::validate_non_negative_index("param_y", "N", N); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } - num_params_r__ = 0U; + num_params_r__ = N; } inline std::string model_name() const final { - return "tuple_templating_model"; + return "tuple_hof_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -10260,13 +11297,27 @@ class tuple_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_templating_model_namespace::log_prob"; + "tuple_hof_model_namespace::log_prob"; // suppress unused var warning (void) function__; + try { + std::vector param_y = + std::vector(N, DUMMY_VAR__); + current_statement__ = 1; + param_y = in__.template read>(N); + local_scalar_t__ sum2 = DUMMY_VAR__; + current_statement__ = 2; + sum2 = stan::math::reduce_sum(param_y, 1, pstream__, + data_m); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -10284,13 +11335,27 @@ class tuple_templating_model final : public model_base_crtp lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_templating_model_namespace::log_prob"; + "tuple_hof_model_namespace::log_prob"; // suppress unused var warning (void) function__; + try { + std::vector param_y = + std::vector(N, DUMMY_VAR__); + current_statement__ = 1; + param_y = in__.template read>(N); + local_scalar_t__ sum2 = DUMMY_VAR__; + current_statement__ = 2; + sum2 = stan::math::reduce_sum(param_y, 1, pstream__, + data_m); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } lp_accum__.add(lp__); return lp_accum__.sum(); } @@ -10315,6 +11380,8 @@ class tuple_templating_model final : public model_base_crtp lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10323,49 +11390,30 @@ class tuple_templating_model final : public model_base_crtp param_y = + std::vector(N, std::numeric_limits::quiet_NaN()); + current_statement__ = 1; + param_y = in__.template read>(N); + double sum2 = std::numeric_limits::quiet_NaN(); + out__.write(param_y); if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { return ; } + current_statement__ = 2; + sum2 = stan::math::reduce_sum(param_y, 1, pstream__, + data_m); + if (emit_transformed_parameters__) { + out__.write(sum2); + } if (stan::math::logical_negation(emit_generated_quantities__)) { return ; } - current_statement__ = 2; - foo( - std::tuple, int>(stan::math::add(m1, m2), - 1), pstream__); - double s = std::numeric_limits::quiet_NaN(); - current_statement__ = 1; - s = tsum(std::tuple, std::vector>(a1, a2), - pstream__); - current_statement__ = 3; - foo2( - std::vector, int>>{std::tuple< - Eigen::Matrix, - int>( - stan::math::add( - m1, m2), - 1)}, - pstream__); - current_statement__ = 4; - overly_complicated( - std::tuple>, - std::tuple>, double>(std::vector< - Eigen::Matrix>{ - stan::math::add( - m1, m2)}, - std::tuple>(1, m1), 3.5), - std::vector>>{std::tuple< - int, - Eigen::Matrix>(1, - m1), - std::tuple>(2, m2)}, pstream__); - out__.write(s); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -10380,9 +11428,22 @@ class tuple_templating_model final : public model_base_crtp in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; + try { + std::vector param_y = + std::vector(N, DUMMY_VAR__); + current_statement__ = 1; + stan::model::assign(param_y, + in__.read>(N), + "assigning variable param_y"); + out__.write(param_y); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } } template * = nullptr> inline void @@ -10391,57 +11452,80 @@ class tuple_templating_model final : public model_base_crtp out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "param_y", + "double", std::vector{static_cast(N)}); + std::vector param_y = + std::vector(N, DUMMY_VAR__); + current_statement__ = 1; + param_y = context__.vals_r("param_y"); + out__.write(param_y); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } } inline void get_param_names(std::vector& names__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - names__ = std::vector{}; - if (emit_transformed_parameters__) {} - if (emit_generated_quantities__) { - std::vector temp{"s"}; + names__ = std::vector{"param_y"}; + if (emit_transformed_parameters__) { + std::vector temp{"sum2"}; names__.reserve(names__.size() + temp.size()); names__.insert(names__.end(), temp.begin(), temp.end()); } + if (emit_generated_quantities__) {} } inline void get_dims(std::vector>& dimss__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - dimss__ = std::vector>{}; - if (emit_transformed_parameters__) {} - if (emit_generated_quantities__) { + dimss__ = std::vector>{std::vector{static_cast< + size_t>(N)}}; + if (emit_transformed_parameters__) { std::vector> temp{std::vector{}}; dimss__.reserve(dimss__.size() + temp.size()); dimss__.insert(dimss__.end(), temp.begin(), temp.end()); } + if (emit_generated_quantities__) {} } inline void constrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - if (emit_transformed_parameters__) {} - if (emit_generated_quantities__) { - param_names__.emplace_back(std::string() + "s"); + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + param_names__.emplace_back(std::string() + "param_y" + '.' + + std::to_string(sym1__)); + } + if (emit_transformed_parameters__) { + param_names__.emplace_back(std::string() + "sum2"); } + if (emit_generated_quantities__) {} } inline void unconstrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - if (emit_transformed_parameters__) {} - if (emit_generated_quantities__) { - param_names__.emplace_back(std::string() + "s"); + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + param_names__.emplace_back(std::string() + "param_y" + '.' + + std::to_string(sym1__)); + } + if (emit_transformed_parameters__) { + param_names__.emplace_back(std::string() + "sum2"); } + if (emit_generated_quantities__) {} } inline std::string get_constrained_sizedtypes() const { - return std::string("[{\"name\":\"s\",\"type\":{\"name\":\"real\"},\"block\":\"generated_quantities\"}]"); + return std::string("[{\"name\":\"param_y\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(N) + ",\"element_type\":{\"name\":\"real\"}},\"block\":\"parameters\"},{\"name\":\"sum2\",\"type\":{\"name\":\"real\"},\"block\":\"transformed_parameters\"}]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[{\"name\":\"s\",\"type\":{\"name\":\"real\"},\"block\":\"generated_quantities\"}]"); + return std::string("[{\"name\":\"param_y\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(N) + ",\"element_type\":{\"name\":\"real\"}},\"block\":\"parameters\"},{\"name\":\"sum2\",\"type\":{\"name\":\"real\"},\"block\":\"transformed_parameters\"}]"); } // Begin method overload boilerplate template inline void @@ -10450,9 +11534,9 @@ class tuple_templating_model final : public model_base_crtp params_i; @@ -10467,9 +11551,9 @@ class tuple_templating_model final : public model_base_crtp(num_to_write, @@ -10526,7 +11610,7 @@ class tuple_templating_model final : public model_base_crtp -namespace tuple_hof_model_namespace { +namespace tuple_lpdf_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; -stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = - {" (found before start of program)", - " (in 'tuple_hof.stan', line 16, column 2 to column 24)", - " (in 'tuple_hof.stan', line 19, column 2 to column 50)", - " (in 'tuple_hof.stan', line 8, column 2 to column 8)", - " (in 'tuple_hof.stan', line 9, column 8 to column 9)", - " (in 'tuple_hof.stan', line 9, column 2 to column 23)", - " (in 'tuple_hof.stan', line 10, column 20 to column 21)", - " (in 'tuple_hof.stan', line 10, column 2 to column 35)", - " (in 'tuple_hof.stan', line 13, column 2 to column 49)", - " (in 'tuple_hof.stan', line 16, column 8 to column 9)", - " (in 'tuple_hof.stan', line 4, column 4 to column 30)", - " (in 'tuple_hof.stan', line 3, column 39 to line 5, column 3)"}; -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -fun(const std::vector& y_slice, const int& start, const int& end, - const std::tuple>& m, std::ostream* pstream__); -struct fun_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__, - const std::tuple>& m) const { - return fun(y_slice, (start + 1), (end + 1), m, pstream__); - } -}; -template , - stan::is_stan_scalar>*> -stan::promote_args_t -fun(const std::vector& y_slice, const int& start, const int& end, - const std::tuple>& m, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +stan::math::profile_map profiles__; +static constexpr std::array locations_array__ = + {" (found before start of program)", + " (in 'tuple_lpdf.stan', line 8, column 3 to column 34)", + " (in 'tuple_lpdf.stan', line 3, column 5 to column 14)", + " (in 'tuple_lpdf.stan', line 2, column 63 to line 4, column 4)"}; +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +foo_lpdf(const std::tuple& x, + const std::tuple& y, std::ostream* + pstream__); +template , + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar, + stan::is_stan_scalar>*> +std::decay_t> +foo_lpdf(const std::tuple& x, + const std::tuple& y, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; - static constexpr bool propto__ = true; // suppress unused var warning - (void) propto__; + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; try { - current_statement__ = 10; - return (stan::math::sum(y_slice) * std::get<0>(m)); + current_statement__ = 2; + return 0; } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -class tuple_hof_model final : public model_base_crtp { +class tuple_lpdf_model final : public model_base_crtp { private: - int N; - std::vector data_y; - std::tuple> data_m; - double sum1; + public: - ~tuple_hof_model() {} - tuple_hof_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_lpdf_model() {} + tuple_lpdf_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_hof_model_namespace::tuple_hof_model"; + "tuple_lpdf_model_namespace::tuple_lpdf_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - int pos__ = std::numeric_limits::min(); - pos__ = 1; - current_statement__ = 3; - context__.validate_dims("data initialization", "N", "int", - std::vector{}); - N = std::numeric_limits::min(); - current_statement__ = 3; - N = context__.vals_i("N")[(1 - 1)]; - current_statement__ = 4; - stan::math::validate_non_negative_index("data_y", "N", N); - current_statement__ = 5; - context__.validate_dims("data initialization", "data_y", "double", - std::vector{static_cast(N)}); - data_y = std::vector(N, - std::numeric_limits::quiet_NaN()); - current_statement__ = 5; - data_y = context__.vals_r("data_y"); - current_statement__ = 6; - stan::math::validate_non_negative_index("data_m", "N", N); - current_statement__ = 7; - context__.validate_dims("data initialization", "data_m.1", "double", - std::vector{}); - context__.validate_dims("data initialization", "data_m.2", "int", - std::vector{static_cast(N)}); - data_m = std::tuple>{std::numeric_limits::quiet_NaN( - ), - std::vector(N, std::numeric_limits::min())}; - current_statement__ = 7; - std::get<0>(data_m) = context__.vals_r("data_m.1")[(1 - 1)]; - std::get<1>(data_m) = context__.vals_i("data_m.2"); - current_statement__ = 8; - sum1 = std::numeric_limits::quiet_NaN(); - current_statement__ = 8; - sum1 = stan::math::reduce_sum(data_y, 1, pstream__, - data_m); - current_statement__ = 9; - stan::math::validate_non_negative_index("param_y", "N", N); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } - num_params_r__ = N; + num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_hof_model"; + return "tuple_lpdf_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -10685,22 +11720,19 @@ class tuple_hof_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_hof_model_namespace::log_prob"; + "tuple_lpdf_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { - std::vector param_y = - std::vector(N, DUMMY_VAR__); current_statement__ = 1; - param_y = in__.template read>(N); - local_scalar_t__ sum2 = DUMMY_VAR__; - current_statement__ = 2; - sum2 = stan::math::reduce_sum(param_y, 1, pstream__, - data_m); + lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), + std::forward_as_tuple(1.2, 1.5, 4.5), pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -10721,22 +11753,19 @@ class tuple_hof_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_hof_model_namespace::log_prob"; + "tuple_lpdf_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { - std::vector param_y = - std::vector(N, DUMMY_VAR__); current_statement__ = 1; - param_y = in__.template read>(N); - local_scalar_t__ sum2 = DUMMY_VAR__; - current_statement__ = 2; - sum2 = stan::math::reduce_sum(param_y, 1, pstream__, - data_m); + lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), + std::forward_as_tuple(1.2, 1.5, 4.5), pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -10764,6 +11793,8 @@ class tuple_hof_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -10772,27 +11803,15 @@ class tuple_hof_model final : public model_base_crtp { // suppress unused var warning (void) jacobian__; static constexpr const char* function__ = - "tuple_hof_model_namespace::write_array"; + "tuple_lpdf_model_namespace::write_array"; // suppress unused var warning (void) function__; try { - std::vector param_y = - std::vector(N, std::numeric_limits::quiet_NaN()); - current_statement__ = 1; - param_y = in__.template read>(N); - double sum2 = std::numeric_limits::quiet_NaN(); - out__.write(param_y); if (stan::math::logical_negation( (stan::math::primitive_value(emit_transformed_parameters__) || stan::math::primitive_value(emit_generated_quantities__)))) { return ; } - current_statement__ = 2; - sum2 = stan::math::reduce_sum(param_y, 1, pstream__, - data_m); - if (emit_transformed_parameters__) { - out__.write(sum2); - } if (stan::math::logical_negation(emit_generated_quantities__)) { return ; } @@ -10810,20 +11829,11 @@ class tuple_hof_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - std::vector param_y = - std::vector(N, DUMMY_VAR__); - current_statement__ = 1; - stan::model::assign(param_y, - in__.read>(N), - "assigning variable param_y"); - out__.write(param_y); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } } template * = nullptr> inline void @@ -10832,78 +11842,47 @@ class tuple_hof_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; - try { - current_statement__ = 1; - context__.validate_dims("parameter initialization", "param_y", - "double", std::vector{static_cast(N)}); - std::vector param_y = - std::vector(N, DUMMY_VAR__); - current_statement__ = 1; - param_y = context__.vals_r("param_y"); - out__.write(param_y); - } catch (const std::exception& e) { - stan::lang::rethrow_located(e, locations_array__[current_statement__]); - } } inline void get_param_names(std::vector& names__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - names__ = std::vector{"param_y"}; - if (emit_transformed_parameters__) { - std::vector temp{"sum2"}; - names__.reserve(names__.size() + temp.size()); - names__.insert(names__.end(), temp.begin(), temp.end()); - } + names__ = std::vector{}; + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline void get_dims(std::vector>& dimss__, const bool emit_transformed_parameters__ = true, const bool emit_generated_quantities__ = true) const { - dimss__ = std::vector>{std::vector{static_cast< - size_t>(N)}}; - if (emit_transformed_parameters__) { - std::vector> temp{std::vector{}}; - dimss__.reserve(dimss__.size() + temp.size()); - dimss__.insert(dimss__.end(), temp.begin(), temp.end()); - } + dimss__ = std::vector>{}; + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline void constrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - param_names__.emplace_back(std::string() + "param_y" + '.' + - std::to_string(sym1__)); - } - if (emit_transformed_parameters__) { - param_names__.emplace_back(std::string() + "sum2"); - } + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline void unconstrained_param_names(std::vector& param_names__, bool emit_transformed_parameters__ = true, bool emit_generated_quantities__ = true) const final { - for (int sym1__ = 1; sym1__ <= N; ++sym1__) { - param_names__.emplace_back(std::string() + "param_y" + '.' + - std::to_string(sym1__)); - } - if (emit_transformed_parameters__) { - param_names__.emplace_back(std::string() + "sum2"); - } + if (emit_transformed_parameters__) {} if (emit_generated_quantities__) {} } inline std::string get_constrained_sizedtypes() const { - return std::string("[{\"name\":\"param_y\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(N) + ",\"element_type\":{\"name\":\"real\"}},\"block\":\"parameters\"},{\"name\":\"sum2\",\"type\":{\"name\":\"real\"},\"block\":\"transformed_parameters\"}]"); + return std::string("[]"); } inline std::string get_unconstrained_sizedtypes() const { - return std::string("[{\"name\":\"param_y\",\"type\":{\"name\":\"array\",\"length\":" + std::to_string(N) + ",\"element_type\":{\"name\":\"real\"}},\"block\":\"parameters\"},{\"name\":\"sum2\",\"type\":{\"name\":\"real\"},\"block\":\"transformed_parameters\"}]"); + return std::string("[]"); } // Begin method overload boilerplate template inline void @@ -10912,8 +11891,8 @@ class tuple_hof_model final : public model_base_crtp { emit_transformed_parameters = true, const bool emit_generated_quantities = true, std::ostream* pstream = nullptr) const { - const size_t num_params__ = N; - const size_t num_transformed = emit_transformed_parameters * (1); + const size_t num_params__ = 0; + const size_t num_transformed = emit_transformed_parameters * (0); const size_t num_gen_quantities = emit_generated_quantities * (0); const size_t num_to_write = num_params__ + num_transformed + num_gen_quantities; @@ -10929,8 +11908,8 @@ class tuple_hof_model final : public model_base_crtp { emit_transformed_parameters = true, bool emit_generated_quantities = true, std::ostream* pstream = nullptr) const { - const size_t num_params__ = N; - const size_t num_transformed = emit_transformed_parameters * (1); + const size_t num_params__ = 0; + const size_t num_transformed = emit_transformed_parameters * (0); const size_t num_gen_quantities = emit_generated_quantities * (0); const size_t num_to_write = num_params__ + num_transformed + num_gen_quantities; @@ -10988,7 +11967,7 @@ class tuple_hof_model final : public model_base_crtp { } }; } -using stan_model = tuple_hof_model_namespace::tuple_hof_model; +using stan_model = tuple_lpdf_model_namespace::tuple_lpdf_model; #ifndef USING_R // Boilerplate stan::model::model_base& @@ -10998,46 +11977,35 @@ new_model(stan::io::var_context& data_context, unsigned int seed, return *m; } stan::math::profile_map& get_stan_profile_data() { - return tuple_hof_model_namespace::profiles__; + return tuple_lpdf_model_namespace::profiles__; } #endif - $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_lpdf.stan + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_lpdf2.stan // Code generated by %%NAME%% %%VERSION%% #include -namespace tuple_lpdf_model_namespace { +namespace tuple_lpdf2_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple_lpdf.stan', line 8, column 3 to column 34)", - " (in 'tuple_lpdf.stan', line 3, column 5 to column 14)", - " (in 'tuple_lpdf.stan', line 2, column 63 to line 4, column 4)"}; + " (in 'tuple_lpdf2.stan', line 8, column 3 to column 20)", + " (in 'tuple_lpdf2.stan', line 3, column 5 to column 14)", + " (in 'tuple_lpdf2.stan', line 2, column 37 to line 4, column 4)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -foo_lpdf(const std::tuple& x, - const std::tuple& y, std::ostream* - pstream__); + std::is_integral>>* = nullptr> +std::decay_t> +foo_lpdf(const std::tuple& x, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -stan::promote_args_t -foo_lpdf(const std::tuple& x, - const std::tuple& y, std::ostream* - pstream__) { - using local_scalar_t__ = stan::promote_args_t; + std::is_integral>>*> +std::decay_t> +foo_lpdf(const std::tuple& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11048,22 +12016,24 @@ foo_lpdf(const std::tuple& x, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -class tuple_lpdf_model final : public model_base_crtp { +class tuple_lpdf2_model final : public model_base_crtp { private: public: - ~tuple_lpdf_model() {} - tuple_lpdf_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~tuple_lpdf2_model() {} + tuple_lpdf2_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); // suppress unused var warning (void) base_rng__; static constexpr const char* function__ = - "tuple_lpdf_model_namespace::tuple_lpdf_model"; + "tuple_lpdf2_model_namespace::tuple_lpdf2_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -11072,7 +12042,7 @@ class tuple_lpdf_model final : public model_base_crtp { num_params_r__ = 0U; } inline std::string model_name() const final { - return "tuple_lpdf_model"; + return "tuple_lpdf2_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -11092,17 +12062,19 @@ class tuple_lpdf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_lpdf_model_namespace::log_prob"; + "tuple_lpdf2_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), - std::forward_as_tuple(1.2, 1.5, 4.5), pstream__)); + pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -11123,17 +12095,19 @@ class tuple_lpdf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; static constexpr const char* function__ = - "tuple_lpdf_model_namespace::log_prob"; + "tuple_lpdf2_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { current_statement__ = 1; lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), - std::forward_as_tuple(1.2, 1.5, 4.5), pstream__)); + pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -11161,6 +12135,8 @@ class tuple_lpdf_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -11169,7 +12145,7 @@ class tuple_lpdf_model final : public model_base_crtp { // suppress unused var warning (void) jacobian__; static constexpr const char* function__ = - "tuple_lpdf_model_namespace::write_array"; + "tuple_lpdf2_model_namespace::write_array"; // suppress unused var warning (void) function__; try { @@ -11195,6 +12171,8 @@ class tuple_lpdf_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11206,6 +12184,8 @@ class tuple_lpdf_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11329,7 +12309,7 @@ class tuple_lpdf_model final : public model_base_crtp { } }; } -using stan_model = tuple_lpdf_model_namespace::tuple_lpdf_model; +using stan_model = tuple_lpdf2_model_namespace::tuple_lpdf2_model; #ifndef USING_R // Boilerplate stan::model::model_base& @@ -11339,7 +12319,7 @@ new_model(stan::io::var_context& data_context, unsigned int seed, return *m; } stan::math::profile_map& get_stan_profile_data() { - return tuple_lpdf_model_namespace::profiles__; + return tuple_lpdf2_model_namespace::profiles__; } #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_lpmf.stan @@ -11354,18 +12334,24 @@ static constexpr std::array locations_array__ = " (in 'tuple_lpmf.stan', line 8, column 2 to column 20)", " (in 'tuple_lpmf.stan', line 3, column 6 to column 25)", " (in 'tuple_lpmf.stan', line 2, column 42 to line 4, column 4)"}; -template >* = nullptr> -stan::promote_args_t -foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* +template >, + std::is_integral>, + stan::is_stan_scalar>* = nullptr> +std::decay_t> +foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__); -template >*> -stan::promote_args_t -foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* +template >, + std::is_integral>, + stan::is_stan_scalar>*> +std::decay_t> +foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11385,6 +12371,8 @@ class tuple_lpmf_model final : public model_base_crtp { random_seed__ = 0, std::ostream* pstream__ = nullptr) : model_base_crtp(0) { int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; using local_scalar_t__ = double; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); @@ -11420,6 +12408,8 @@ class tuple_lpmf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11451,6 +12441,8 @@ class tuple_lpmf_model final : public model_base_crtp { stan::math::accumulator lp_accum__; stan::io::deserializer in__(params_r__, params_i__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11489,6 +12481,8 @@ class tuple_lpmf_model final : public model_base_crtp { // suppress unused var warning (void) lp__; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; stan::math::accumulator lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning @@ -11523,6 +12517,8 @@ class tuple_lpmf_model final : public model_base_crtp { stan::io::deserializer in__(params_r__, params_i__); stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -11534,6 +12530,8 @@ class tuple_lpmf_model final : public model_base_crtp { using local_scalar_t__ = double; stan::io::serializer out__(vars__); int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; diff --git a/test/integration/good/tuples/pretty.expected b/test/integration/good/tuples/pretty.expected index 65220c61a..7d4a8a8c5 100644 --- a/test/integration/good/tuples/pretty.expected +++ b/test/integration/good/tuples/pretty.expected @@ -86,6 +86,16 @@ model { target += foo(d); } + $ ../../../../../install/default/bin/stanc --auto-format tuple-dataonly2.stan +functions { + real tuple_tester(data tuple(array[] real, int) x) { + return x.1[1]; + } +} +model { + print(tuple_tester(({1.0}, 2))); +} + $ ../../../../../install/default/bin/stanc --auto-format tuple-foreach.stan transformed data { array[100] tuple(real, real) arr; @@ -256,6 +266,16 @@ model { (1.5, 2) ~ foo((1.2, 1.5, 4.5)); } + $ ../../../../../install/default/bin/stanc --auto-format tuple_lpdf2.stan +functions { + real foo_lpdf(tuple(real, int) x) { + return 0; + } +} +model { + (1.5, 2) ~ foo(); +} + $ ../../../../../install/default/bin/stanc --auto-format tuple_lpmf.stan functions { real foo_lpmf(tuple(int, int) x, real y) { diff --git a/test/integration/good/tuples/transformed_mir.expected b/test/integration/good/tuples/transformed_mir.expected index d0ae07810..d599d1d92 100644 --- a/test/integration/good/tuples/transformed_mir.expected +++ b/test/integration/good/tuples/transformed_mir.expected @@ -14338,6 +14338,107 @@ (meta )))) (transform_inits ()) (unconstrain_array ()) (output_vars ()) (prog_name tuple_dataonly_model) (prog_path tuple-dataonly.stan)) + $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple-dataonly2.stan +((functions_block + (((fdrt (ReturnType UReal)) (fdname tuple_tester) (fdsuffix FnPlain) + (fdargs ((DataOnly x (UTuple ((UArray UReal) UInt))))) + (fdbody + (((pattern + (Block + (((pattern + (Return + (((pattern + (Promotion + ((pattern + (Indexed + ((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple ((UArray UReal) UInt))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + 1)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + UReal AutoDiffable)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (fdloc )))) + (input_vars ()) (prepare_data ()) + (log_prob + (((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (FunApp (UserDefined tuple_tester FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern (Lit Real 1.0)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple ((UArray UReal) UInt))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ))))) + (meta )))) + (reverse_mode_log_prob + (((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (FunApp (UserDefined tuple_tester FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern (Lit Real 1.0)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple ((UArray UReal) UInt))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta ))))) + (meta )))) + (generate_quantities + (((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern + (EOr + ((pattern (Var emit_transformed_parameters__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )) + ((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )))) + (transform_inits ()) (unconstrain_array ()) (output_vars ()) + (prog_name tuple_dataonly2_model) (prog_path tuple-dataonly2.stan)) $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple-foreach.stan ((functions_block ()) (input_vars ()) (prepare_data @@ -18981,6 +19082,89 @@ (meta )))) (transform_inits ()) (unconstrain_array ()) (output_vars ()) (prog_name tuple_lpdf_model) (prog_path tuple_lpdf.stan)) + $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple_lpdf2.stan +((functions_block + (((fdrt (ReturnType UReal)) (fdname foo_lpdf) (fdsuffix (FnLpdf ())) + (fdargs ((AutoDiffable x (UTuple (UReal UInt))))) + (fdbody + (((pattern + (Block + (((pattern + (Return + (((pattern + (Promotion + ((pattern (Lit Int 0)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal AutoDiffable)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (fdloc )))) + (input_vars ()) (prepare_data ()) + (log_prob + (((pattern + (Block + (((pattern + (TargetPE + ((pattern + (FunApp (UserDefined foo_lpdf (FnLpdf true)) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Lit Real 1.5)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UReal UInt))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta )))) + (reverse_mode_log_prob + (((pattern + (Block + (((pattern + (TargetPE + ((pattern + (FunApp (UserDefined foo_lpdf (FnLpdf true)) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Lit Real 1.5)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UReal UInt))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta )))) + (generate_quantities + (((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern + (EOr + ((pattern (Var emit_transformed_parameters__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )) + ((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )))) + (transform_inits ()) (unconstrain_array ()) (output_vars ()) + (prog_name tuple_lpdf2_model) (prog_path tuple_lpdf2.stan)) $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple_lpmf.stan ((functions_block (((fdrt (ReturnType UReal)) (fdname foo_lpmf) (fdsuffix (FnLpdf ())) diff --git a/test/integration/good/tuples/tuple-dataonly2.stan b/test/integration/good/tuples/tuple-dataonly2.stan new file mode 100644 index 000000000..d275bd489 --- /dev/null +++ b/test/integration/good/tuples/tuple-dataonly2.stan @@ -0,0 +1,8 @@ +functions { + real tuple_tester(data tuple(array[] real, int) x) { + return x.1[1]; + } +} +model { + print(tuple_tester(({1.0}, 2))); +} diff --git a/test/integration/good/tuples/tuple_lpdf2.stan b/test/integration/good/tuples/tuple_lpdf2.stan new file mode 100644 index 000000000..8e209fff5 --- /dev/null +++ b/test/integration/good/tuples/tuple_lpdf2.stan @@ -0,0 +1,9 @@ +functions { + real foo_lpdf(tuple(real, int) x) { + return 0; + } +} + +model { + (1.5, 2) ~ foo(); +} From 42f2c228440ae6ddb7cf4dd3ad28d158e9ce8295 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 10:40:20 -0400 Subject: [PATCH 02/16] Add -Wall to jenkins runs --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 25bb7fa03..986491e86 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -52,6 +52,7 @@ def runPerformanceTests(String testsPath, String stancFlags = ""){ sh """ cd performance-tests-cmdstan/cmdstan echo 'O=0' >> make/local + echo 'CXXFLAGS+=-Wall' >> make/local make -j${env.PARALLEL} build; cd .. ./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ${testsPath} """ From dd0ac5c1a3a46c6c0c9256f6fdaa41a30af541c1 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 10:57:03 -0400 Subject: [PATCH 03/16] Fix: some function args weren't using new template --- src/stan_math_backend/Lower_expr.ml | 4 +- src/stan_math_backend/Lower_functions.ml | 18 +- test/integration/good/code-gen/cpp.expected | 210 +++++++++--------- test/integration/good/code-gen/lir.expected | 136 +++++++----- .../standalone_functions/cpp.expected | 14 +- .../good/compiler-optimizations/cpp.expected | 70 +++--- .../compiler-optimizations/cppO0.expected | 70 +++--- .../compiler-optimizations/cppO1.expected | 70 +++--- test/integration/good/tuples/cpp.expected | 12 +- 9 files changed, 317 insertions(+), 287 deletions(-) diff --git a/src/stan_math_backend/Lower_expr.ml b/src/stan_math_backend/Lower_expr.ml index b4d3d5283..c31b7b1ca 100644 --- a/src/stan_math_backend/Lower_expr.ml +++ b/src/stan_math_backend/Lower_expr.ml @@ -405,7 +405,9 @@ and lower_compiler_internal ad ut f es = evaluating eigen expressions and copying data vectors *) let is_simple (e : Expr.Typed.t) = match e.pattern with - | Var _ -> e.meta.adlevel <> DataOnly + | Var _ -> + (* Because the data members are [const], they can't be passed without more templating *) + e.meta.adlevel <> DataOnly | Lit _ -> true | Promotion ({pattern= Var _ | Lit _; _}, _, _) -> is_scalar e | _ -> false in diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index cda0efba4..5e965c119 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -4,19 +4,18 @@ open Lower_expr open Lower_stmt open Cpp -let rec lower_type_eigen_expr (t : UnsizedType.t) (inner_type : type_) : type_ = +let rec lower_type_for_arg (t : UnsizedType.t) (inner_type : type_) : type_ = match t with - | UInt - (* | UInt -> Int *) - |UReal | UMatrix | URowVector | UVector | UComplexVector | UComplexMatrix - |UComplexRowVector | UTuple _ -> + | UInt | UReal | UMatrix | URowVector | UVector | UComplexVector + |UComplexMatrix | UComplexRowVector | UTuple _ -> inner_type | UComplex -> Types.complex inner_type | UArray t when UnsizedType.contains_tuple t -> - StdVector (lower_type_eigen_expr t inner_type) - | UArray t -> + StdVector (lower_type_for_arg t inner_type) + | UArray t when UnsizedType.contains_eigen_type t -> (* Expressions are not accepted for arrays of Eigen::Matrix *) StdVector (lower_type t inner_type) + | UArray t -> StdVector (lower_type_for_arg t inner_type) | UMathLibraryFunction | UFun _ -> Common.FatalError.fatal_error_msg [%message "Function types not implemented"] @@ -24,7 +23,7 @@ let rec lower_type_eigen_expr (t : UnsizedType.t) (inner_type : type_) : type_ = let arg_type custom_scalar ut = let scalar = match custom_scalar with None -> stantype_prim ut | Some s -> s in - lower_type_eigen_expr ut scalar + lower_type_for_arg ut scalar let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = (* we add the _arg suffix for any Eigen types *) @@ -94,7 +93,6 @@ let return_optional_arg_types (args : Program.fun_arg_decl) = let template_parameters (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = match (ad, fst (UnsizedType.unwind_array_type typ)) with - (* | _, UInt -> ([], [], arg_type None typ) *) | _, UTuple tys -> let temps, reqs, sclrs = List.map ~f:(fun ty -> (ad, ty)) tys @@ -155,7 +153,7 @@ let%expect_test "arg types tuple template" = ((RequireIs stan::is_stan_scalar (TemplateType T0__0__)) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) (RequireIs stan::is_vt_not_complex (TemplateType T0__1__))) - std::vector, T0__1__>> |}] + std::vector, T0__1__>> |}] let lower_promoted_scalar args = match args with diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 690f5449a..fef17e91e 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -912,7 +912,8 @@ f(const T0__& x, const std::vector< std::vector< std::tuple>, - std::vector>>>>& x2, std::ostream* pstream__); + std::vector>>>>& x2, std::ostream* + pstream__); template >, @@ -924,7 +925,8 @@ f(const T0__& x, const std::vector< std::vector< std::tuple>, - std::vector>>>>& x2, std::ostream* pstream__) { + std::vector>>>>& x2, std::ostream* + pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -5599,8 +5601,8 @@ template , stan::is_stan_scalar>* = nullptr> void -f0(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f0(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5625,8 +5627,8 @@ template , stan::is_stan_scalar>* = nullptr> int -f1(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f1(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5651,8 +5653,8 @@ template , stan::is_stan_scalar>* = nullptr> std::vector -f2(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f2(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5677,8 +5679,8 @@ template , stan::is_stan_scalar>* = nullptr> std::vector> -f3(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f3(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5706,8 +5708,8 @@ std::decay_t, T7__, std::decay_t, T10__, T11__>>>> -f4(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f4(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5736,8 +5738,8 @@ std::vector< stan::base_type_t, T7__, std::decay_t, T10__, T11__>>>>> -f5(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f5(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5767,8 +5769,8 @@ std::vector< stan::base_type_t, T7__, std::decay_t, T10__, T11__>>>>>> -f6(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f6(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5797,8 +5799,8 @@ Eigen::Matrix, T10__, T11__>>>>,-1,1> -f7(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f7(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5828,8 +5830,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,1>> -f8(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f8(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5860,8 +5862,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,1>>> -f9(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f9(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5890,8 +5892,8 @@ Eigen::Matrix, T10__, T11__>>>>,-1,-1> -f10(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f10(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5921,8 +5923,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,-1>> -f11(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f11(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5953,8 +5955,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,-1>>> -f12(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f12(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -5982,8 +5984,8 @@ template , stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& dat_int, - std::ostream* pstream__); + const std::vector& dat, const std::vector& + dat_int, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -6005,7 +6007,7 @@ struct algebra_system_functor__ { Eigen::Matrix, stan::base_type_t, T2__>>,-1,1> operator()(const T0__& x, const T1__& y, const std::vector& dat, - const std::vector& dat_int, std::ostream* pstream__) const { + const std::vector& dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); } }; @@ -6771,8 +6773,8 @@ template , stan::is_stan_scalar>*> void -f0(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f0(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -6824,8 +6826,8 @@ template , stan::is_stan_scalar>*> int -f1(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f1(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -6874,8 +6876,8 @@ template , stan::is_stan_scalar>*> std::vector -f2(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f2(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -6924,8 +6926,8 @@ template , stan::is_stan_scalar>*> std::vector> -f3(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f3(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -6977,8 +6979,8 @@ std::decay_t, T7__, std::decay_t, T10__, T11__>>>> -f4(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f4(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7031,8 +7033,8 @@ std::vector< stan::base_type_t, T7__, std::decay_t, T10__, T11__>>>>> -f5(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f5(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7086,8 +7088,8 @@ std::vector< stan::base_type_t, T7__, std::decay_t, T10__, T11__>>>>>> -f6(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f6(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7140,8 +7142,8 @@ Eigen::Matrix, T10__, T11__>>>>,-1,1> -f7(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f7(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7195,8 +7197,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,1>> -f8(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f8(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7251,8 +7253,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,1>>> -f9(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f9(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7305,8 +7307,8 @@ Eigen::Matrix, T10__, T11__>>>>,-1,-1> -f10(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f10(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7360,8 +7362,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,-1>> -f11(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f11(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7416,8 +7418,8 @@ std::vector< std::decay_t, T10__, T11__>>>>,-1,-1>>> -f12(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, +f12(const T0__& a1, const std::vector& a2, + const std::vector>& a3, const T3__& a4, const std::vector& a5, const std::vector>& a6, const T6__& a7_arg__, const std::vector>& a8, const std::vector>>& a9, const T9__& @@ -7586,8 +7588,8 @@ template , stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& dat_int, - std::ostream* pstream__) { + const std::vector& dat, const std::vector& + dat_int, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T2__>>; int current_statement__ = 0; @@ -14191,7 +14193,7 @@ template >* = nullptr> std::vector>> sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, + theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__); template >* = nullptr> std::decay_t> integrand(const T0__& x, const T1__& xc, const std::vector& theta, - const std::vector& x_r, const std::vector& x_i, + const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); template , @@ -14214,7 +14216,7 @@ template , stan::base_type_t, T2__>>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, + const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__); template , @@ -14226,7 +14228,7 @@ template , stan::base_type_t, T2__>>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, + const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__); template >* = nullptr> @@ -14242,8 +14244,8 @@ template , stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& dat_int, - std::ostream* pstream__); + const std::vector& dat, const std::vector& + dat_int, std::ostream* pstream__); struct goo_functor__ { template , @@ -14255,8 +14257,8 @@ struct goo_functor__ { Eigen::Matrix, stan::base_type_t, T2__>>,-1,1> operator()(const T0__& shared_params, const T1__& job_params, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__) const { + const std::vector& data_r, const std::vector& + data_i, std::ostream* pstream__) const { return goo(shared_params, job_params, data_r, data_i, pstream__); } }; @@ -14271,8 +14273,8 @@ struct foo_functor__ { Eigen::Matrix, stan::base_type_t, T2__>>,-1,1> operator()(const T0__& shared_params, const T1__& job_params, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__) const { + const std::vector& data_r, const std::vector& + data_i, std::ostream* pstream__) const { return foo(shared_params, job_params, data_r, data_i, pstream__); } }; @@ -14286,7 +14288,7 @@ struct integrand_functor__ { stan::is_stan_scalar>* = nullptr> std::decay_t> operator()(const T0__& x, const T1__& xc, const std::vector& theta, - const std::vector& x_r, const std::vector& x_i, + const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return integrand(x, xc, theta, x_r, x_i, pstream__); } @@ -14302,7 +14304,7 @@ struct algebra_system_functor__ { Eigen::Matrix, stan::base_type_t, T2__>>,-1,1> operator()(const T0__& x, const T1__& y, const std::vector& dat, - const std::vector& dat_int, std::ostream* pstream__) const { + const std::vector& dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); } }; @@ -14317,7 +14319,7 @@ struct sho_functor__ { std::vector>> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x, - const std::vector& x_int, std::ostream* pstream__) const { + const std::vector& x_int, std::ostream* pstream__) const { return sho(t, y, theta, x, x_int, pstream__); } }; @@ -14330,7 +14332,7 @@ template >*> std::vector>> sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, + theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -14371,7 +14373,7 @@ template >*> std::decay_t> integrand(const T0__& x, const T1__& xc, const std::vector& theta, - const std::vector& x_r, const std::vector& x_i, + const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -14401,7 +14403,7 @@ template , stan::base_type_t, T2__>>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, + const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T2__>>; @@ -14434,7 +14436,7 @@ template , stan::base_type_t, T2__>>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, + const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T2__>>; @@ -14487,8 +14489,8 @@ template , stan::base_type_t, T2__>>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& dat_int, - std::ostream* pstream__) { + const std::vector& dat, const std::vector& + dat_int, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T2__>>; int current_statement__ = 0; @@ -22610,7 +22612,7 @@ template >* = nullptr> std::vector>> dz_dt(const T0__& t, const std::vector& z, const std::vector& - theta, const std::vector& x_r, const std::vector& x_i, + theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); struct dz_dt_functor__ { template >> operator()(const T0__& t, const std::vector& z, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + const std::vector& x_i, std::ostream* pstream__) const { return dz_dt(t, z, theta, x_r, x_i, pstream__); } }; @@ -22636,7 +22638,7 @@ template >*> std::vector>> dz_dt(const T0__& t, const std::vector& z, const std::vector& - theta, const std::vector& x_r, const std::vector& x_i, + theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -25604,7 +25606,7 @@ std::decay_t> foo(const std::vector>& p, std::ostream* pstream__); template >* = nullptr> -double foo(const std::vector& p, std::ostream* pstream__); +double foo(const std::vector& p, std::ostream* pstream__); template >>*> double foo(const T0__& p, std::ostream* pstream__) { @@ -25823,7 +25825,7 @@ foo(const std::vector>& p, std::ostream* pstream__) { } } template >*> -double foo(const std::vector& p, std::ostream* pstream__) { +double foo(const std::vector& p, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -32372,21 +32374,21 @@ template >, std::is_integral>>* = nullptr> double -f9(const std::vector& y_slice, const T1__& start, const T2__& end, +f9(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , std::is_integral>, std::is_integral>>* = nullptr> double -f10(const std::vector>& y_slice, const T1__& start, +f10(const std::vector>& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , std::is_integral>, std::is_integral>>* = nullptr> double -f11(const std::vector>>& y_slice, const T1__& +f11(const std::vector>>& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , @@ -32533,16 +32535,16 @@ std::decay_t, T17__, T19__>>>>>> s(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, - const T7__& e_arg__, const std::vector& f, const std::vector& g, - const std::vector>& h, + const T7__& e_arg__, const std::vector& f, const std::vector& + g, const std::vector>& h, const std::vector>& i, const std::vector>& j, - const std::vector>& k, + const std::vector>& k, const std::vector>& l, const std::vector>>& m, const std::vector>>& n, const std::vector>>& o, - const std::vector>>& p, + const std::vector>>& p, const std::vector>>& q, std::ostream* pstream__); double r(std::ostream* pstream__); @@ -32552,7 +32554,7 @@ struct f11_rsfunctor__ { std::is_integral>, std::is_integral>>* = nullptr> double - operator()(const std::vector>>& y_slice, + operator()(const std::vector>>& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f11(y_slice, (start + 1), (end + 1), pstream__); } @@ -32563,8 +32565,8 @@ struct f10_rsfunctor__ { std::is_integral>, std::is_integral>>* = nullptr> double - operator()(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) const { + operator()(const std::vector>& y_slice, const T1__& + start, const T2__& end, std::ostream* pstream__) const { return f10(y_slice, (start + 1), (end + 1), pstream__); } }; @@ -32807,7 +32809,7 @@ struct f9_rsfunctor__ { std::is_integral>, std::is_integral>>* = nullptr> double - operator()(const std::vector& y_slice, const T1__& start, const T2__& + operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f9(y_slice, (start + 1), (end + 1), pstream__); } @@ -32861,16 +32863,16 @@ struct s_rsfunctor__ { operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a, const T4__& b, const T5__& c, const T6__& d, const T7__& e, - const std::vector& f, const std::vector& g, + const std::vector& f, const std::vector& g, const std::vector>& h, const std::vector>& i, const std::vector>& j, - const std::vector>& k, + const std::vector>& k, const std::vector>& l, const std::vector>>& m, const std::vector>>& n, const std::vector>>& o, - const std::vector>>& p, + const std::vector>>& p, const std::vector>>& q) const { return s(y_slice, (start + 1), (end + 1), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, pstream__); @@ -33120,7 +33122,7 @@ template >, std::is_integral>>*> double -f9(const std::vector& y_slice, const T1__& start, const T2__& end, +f9(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -33144,7 +33146,7 @@ template >, std::is_integral>>*> double -f10(const std::vector>& y_slice, const T1__& start, +f10(const std::vector>& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -33168,7 +33170,7 @@ template >, std::is_integral>>*> double -f11(const std::vector>>& y_slice, const T1__& +f11(const std::vector>>& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -33559,16 +33561,16 @@ std::decay_t, T17__, T19__>>>>>> s(const std::vector& y_slice, const T1__& start, const T2__& end, const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, - const T7__& e_arg__, const std::vector& f, const std::vector& g, - const std::vector>& h, + const T7__& e_arg__, const std::vector& f, const std::vector& + g, const std::vector>& h, const std::vector>& i, const std::vector>& j, - const std::vector>& k, + const std::vector>& k, const std::vector>& l, const std::vector>>& m, const std::vector>>& n, const std::vector>>& o, - const std::vector>>& p, + const std::vector>>& p, const std::vector>>& q, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t> array_fun(const std::vector& a, std::ostream* pstream__); template >* = nullptr> -double int_array_fun(const std::vector& a, std::ostream* pstream__); +double int_array_fun(const std::vector& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> @@ -124,7 +124,7 @@ array_fun(const std::vector& a, std::ostream* pstream__) { } } template >*> -double int_array_fun(const std::vector& a, std::ostream* pstream__) { +double int_array_fun(const std::vector& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -421,7 +421,7 @@ std::decay_t> array_fun(const std::vector& a, std::ostream* pstream__); template >* = nullptr> -double int_array_fun(const std::vector& a, std::ostream* pstream__); +double int_array_fun(const std::vector& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> @@ -492,7 +492,7 @@ array_fun(const std::vector& a, std::ostream* pstream__) { } } template >*> -double int_array_fun(const std::vector& a, std::ostream* pstream__) { +double int_array_fun(const std::vector& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -726,7 +726,7 @@ template >> integrand_ode(const T0__& r, const std::vector& f, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + const std::vector& x_i, std::ostream* pstream__); double ode_integrate(std::ostream* pstream__); struct integrand_ode_functor__ { template >> operator()(const T0__& r, const std::vector& f, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + const std::vector& x_i, std::ostream* pstream__) const { return integrand_ode(r, f, theta, x_r, x_i, pstream__); } }; @@ -776,7 +776,7 @@ template >> integrand_ode(const T0__& r, const std::vector& f, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { + const std::vector& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index dd6e62934..37612b8f5 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1920,7 +1920,7 @@ template >> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + const std::vector& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template >> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + const std::vector& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; @@ -1946,7 +1946,7 @@ template >> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { + const std::vector& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -5009,10 +5009,10 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -5025,7 +5025,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -5065,7 +5065,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12684,10 +12684,10 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -12700,7 +12700,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12740,7 +12740,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -14809,10 +14809,10 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -14838,13 +14838,13 @@ template , stan::is_vt_not_complex>* = nullptr> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, +js_super_lp(const std::vector>& y, const std::vector& + first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -14884,7 +14884,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -15089,8 +15089,8 @@ template , stan::is_vt_not_complex>*> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, +js_super_lp(const std::vector>& y, const std::vector& + first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -20879,10 +20879,10 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -20895,7 +20895,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -20935,7 +20935,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26654,10 +26654,10 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -26682,8 +26682,8 @@ template , stan::is_vt_not_complex>* = nullptr> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const std::vector>& y, + const std::vector& first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -26693,7 +26693,7 @@ template >>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26733,7 +26733,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26937,8 +26937,8 @@ template , stan::is_vt_not_complex>*> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const std::vector>& y, + const std::vector& first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -31839,10 +31839,10 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -31855,7 +31855,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -31895,7 +31895,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 319593ed9..06febf8dc 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -704,7 +704,7 @@ template >> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + const std::vector& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template >> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + const std::vector& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; @@ -730,7 +730,7 @@ template >> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { + const std::vector& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -2485,10 +2485,10 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -2501,7 +2501,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2528,7 +2528,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8477,10 +8477,10 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -8493,7 +8493,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8520,7 +8520,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9659,10 +9659,10 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -9688,13 +9688,13 @@ template , stan::is_vt_not_complex>* = nullptr> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, +js_super_lp(const std::vector>& y, const std::vector& + first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9721,7 +9721,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9834,8 +9834,8 @@ template , stan::is_vt_not_complex>*> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, +js_super_lp(const std::vector>& y, const std::vector& + first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -12788,10 +12788,10 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -12804,7 +12804,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12831,7 +12831,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -17034,10 +17034,10 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -17062,8 +17062,8 @@ template , stan::is_vt_not_complex>* = nullptr> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const std::vector>& y, + const std::vector& first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -17073,7 +17073,7 @@ template >>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -17100,7 +17100,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -17212,8 +17212,8 @@ template , stan::is_vt_not_complex>*> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const std::vector>& y, + const std::vector& first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -19702,10 +19702,10 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -19718,7 +19718,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -19745,7 +19745,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 748b5bd00..bdea8062c 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -686,7 +686,7 @@ template >> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + const std::vector& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template >> operator()(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + const std::vector& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; @@ -712,7 +712,7 @@ template >> simple_SIR(const T0__& t, const std::vector& y, const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { + const std::vector& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -2445,10 +2445,10 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -2461,7 +2461,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2488,7 +2488,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8566,10 +8566,10 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -8582,7 +8582,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8609,7 +8609,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9920,10 +9920,10 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -9949,13 +9949,13 @@ template , stan::is_vt_not_complex>* = nullptr> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, +js_super_lp(const std::vector>& y, const std::vector& + first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9982,7 +9982,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -10096,8 +10096,8 @@ template , stan::is_vt_not_complex>*> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, +js_super_lp(const std::vector>& y, const std::vector& + first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -13713,10 +13713,10 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -13729,7 +13729,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -13756,7 +13756,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -18278,10 +18278,10 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -18306,8 +18306,8 @@ template , stan::is_vt_not_complex>* = nullptr> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const std::vector>& y, + const std::vector& first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -18317,7 +18317,7 @@ template >>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -18344,7 +18344,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -18457,8 +18457,8 @@ template , stan::is_vt_not_complex>*> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const std::vector>& y, + const std::vector& first, const std::vector& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -21666,10 +21666,10 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); +int first_capture(const std::vector& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); +int last_capture(const std::vector& y_i, std::ostream* pstream__); template >, std::is_integral>, @@ -21682,7 +21682,7 @@ Eigen::Matrix, prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +int first_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -21709,7 +21709,7 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +int last_capture(const std::vector& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index c017e21a4..a0dab533f 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -10544,7 +10544,7 @@ template , stan::is_stan_scalar>* = nullptr> std::decay_t> -tsum(const std::tuple, std::vector>& s, +tsum(const std::tuple, std::vector>& s, std::ostream* pstream__); template , @@ -10603,7 +10603,7 @@ template , stan::is_stan_scalar>*> std::decay_t> -tsum(const std::tuple, std::vector>& s, +tsum(const std::tuple, std::vector>& s, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -11164,7 +11164,8 @@ template >* = nullptr> std::decay_t> fun(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::tuple>& m, std::ostream* pstream__); + const std::tuple>& m, std::ostream* + pstream__); struct fun_rsfunctor__ { template > operator()(const std::vector& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, - const std::tuple>& m) const { + const std::tuple>& m) const { return fun(y_slice, (start + 1), (end + 1), m, pstream__); } }; @@ -11189,7 +11190,8 @@ template >*> std::decay_t> fun(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::tuple>& m, std::ostream* pstream__) { + const std::tuple>& m, std::ostream* + pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; // suppress unused var warning From e6bad1850ef9cc6a1fcaca0b293cc0151fee419f Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 14:03:21 -0400 Subject: [PATCH 04/16] Reduce copies of tuples, fix ambiguous int overloads --- src/stan_math_backend/Lower_expr.ml | 21 +- src/stan_math_backend/Lower_functions.ml | 103 +- .../cli-args/allow-undefined/cpp.expected | 12 +- .../allow-undefined/standalone-cpp.expected | 12 +- .../code-gen/complex_numbers/cpp.expected | 201 +- test/integration/good/code-gen/cpp.expected | 5576 +++++++++++------ .../good/code-gen/expressions/cpp.expected | 74 +- test/integration/good/code-gen/lir.expected | 2812 ++++++--- .../good/code-gen/ode/cpp.expected | 165 +- .../standalone_functions/cpp.expected | 278 +- .../good/compiler-optimizations/cpp.expected | 392 +- .../compiler-optimizations/cppO0.expected | 392 +- .../compiler-optimizations/cppO1.expected | 392 +- .../mem_patterns/cpp.expected | 19 +- test/integration/good/tuples/cpp.expected | 973 ++- test/integration/good/tuples/pretty.expected | 32 + .../good/tuples/transformed_mir.expected | 902 +++ .../good/tuples/tuple_copying.stan | 30 + 18 files changed, 8635 insertions(+), 3751 deletions(-) create mode 100644 test/integration/good/tuples/tuple_copying.stan diff --git a/src/stan_math_backend/Lower_expr.ml b/src/stan_math_backend/Lower_expr.ml index c31b7b1ca..6e7b2df1f 100644 --- a/src/stan_math_backend/Lower_expr.ml +++ b/src/stan_math_backend/Lower_expr.ml @@ -401,8 +401,6 @@ and lower_user_defined_fun f suffix es = and lower_compiler_internal ad ut f es = let open Expression_syntax in let gen_tuple_literal es : expr = - (* NB: This causes some inefficencies such as eagerly - evaluating eigen expressions and copying data vectors *) let is_simple (e : Expr.Typed.t) = match e.pattern with | Var _ -> @@ -414,11 +412,20 @@ and lower_compiler_internal ad ut f es = if List.for_all ~f:is_simple es then fun_call "std::forward_as_tuple" (lower_exprs es) else - Constructor - ( Tuple - (List.map es ~f:(fun {meta= {adlevel; type_; _}; _} -> - lower_unsizedtype_local adlevel type_ ) ) - , lower_exprs es ) in + (* we make full copies of tuples + due to a lack of templating sophistication + in function generation *) + let types = + List.map es ~f:(fun {meta= {adlevel; type_; _}; _} -> + let base_type = lower_unsizedtype_local adlevel type_ in + if + UnsizedType.is_dataonlytype adlevel + && not + ( UnsizedType.is_scalar_type type_ + || UnsizedType.contains_tuple type_ ) + then Types.const_ref base_type + else base_type ) in + Constructor (Tuple types, lower_exprs es) in match f with | Internal_fun.FnMakeArray -> let ut = diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 5e965c119..dc031a110 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -6,19 +6,9 @@ open Cpp let rec lower_type_for_arg (t : UnsizedType.t) (inner_type : type_) : type_ = match t with - | UInt | UReal | UMatrix | URowVector | UVector | UComplexVector - |UComplexMatrix | UComplexRowVector | UTuple _ -> - inner_type - | UComplex -> Types.complex inner_type | UArray t when UnsizedType.contains_tuple t -> StdVector (lower_type_for_arg t inner_type) - | UArray t when UnsizedType.contains_eigen_type t -> - (* Expressions are not accepted for arrays of Eigen::Matrix *) - StdVector (lower_type t inner_type) - | UArray t -> StdVector (lower_type_for_arg t inner_type) - | UMathLibraryFunction | UFun _ -> - Common.FatalError.fatal_error_msg - [%message "Function types not implemented"] + | _ -> inner_type let arg_type custom_scalar ut = let scalar = @@ -35,28 +25,38 @@ let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = let requires ut t = let t = TemplateType t in - match ut with - | UnsizedType.URowVector -> - [ RequireIs ("stan::is_row_vector", t) - ; RequireIs ("stan::is_vt_not_complex", t) ] - | UComplexRowVector -> - [ RequireIs ("stan::is_row_vector", t) - ; RequireIs ("stan::is_vt_complex", t) ] - | UVector -> - [ RequireIs ("stan::is_col_vector", t) - ; RequireIs ("stan::is_vt_not_complex", t) ] - | UComplexVector -> - [ RequireIs ("stan::is_col_vector", t) - ; RequireIs ("stan::is_vt_complex", t) ] - | UMatrix -> - [ RequireIs ("stan::is_eigen_matrix_dynamic", t) - ; RequireIs ("stan::is_vt_not_complex", t) ] - | UComplexMatrix -> - [ RequireIs ("stan::is_eigen_matrix_dynamic", t) - ; RequireIs ("stan::is_vt_complex", t) ] - (* NB: Not unwinding array types due to the way arrays of eigens are printed *) - | UInt -> [RequireIs ("std::is_integral", TypeTrait ("std::decay_t", [t]))] - | _ -> [RequireIs ("stan::is_stan_scalar", t)] + let rec requires_in ut t = + match ut with + | UnsizedType.URowVector -> + [ RequireIs ("stan::is_row_vector", t) + ; RequireIs ("stan::is_vt_not_complex", t) ] + | UComplexRowVector -> + [ RequireIs ("stan::is_row_vector", t) + ; RequireIs ("stan::is_vt_complex", t) ] + | UVector -> + [ RequireIs ("stan::is_col_vector", t) + ; RequireIs ("stan::is_vt_not_complex", t) ] + | UComplexVector -> + [ RequireIs ("stan::is_col_vector", t) + ; RequireIs ("stan::is_vt_complex", t) ] + | UMatrix -> + [ RequireIs ("stan::is_eigen_matrix_dynamic", t) + ; RequireIs ("stan::is_vt_not_complex", t) ] + | UComplexMatrix -> + [ RequireIs ("stan::is_eigen_matrix_dynamic", t) + ; RequireIs ("stan::is_vt_complex", t) ] + | UInt -> [RequireIs ("std::is_integral", t)] + | UComplex -> + RequireIs ("stan::is_complex", t) + :: requires_in UReal (TypeTrait ("stan::value_type_t", [t])) + | UArray inner_ut -> + RequireIs ("stan::is_std_vector", t) + :: requires_in inner_ut (TypeTrait ("stan::value_type_t", [t])) + | _ -> + (* not using stan::is_stan_scalar to explictly exclude int *) + [ RequireIs ("stan::is_autodiff", t) + ; RequireIs ("std::is_floating_point", t) ] in + requires_in ut t let return_optional_arg_types (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = @@ -80,6 +80,7 @@ let return_optional_arg_types (args : Program.fun_arg_decl) = (internal : UnsizedType.t) (ad : UnsizedType.autodifftype)] ) | UnsizedType.DataOnly, ut when not (UnsizedType.is_eigen_type ut) -> [] + | _, UnsizedType.UArray _ -> [sprintf "stan::base_type_t<%s%d__>" start i] | _ -> if UnsizedType.is_eigen_type typ then [sprintf "stan::base_type_t<%s%d__>" start i] @@ -131,11 +132,11 @@ let%expect_test "arg types tuple template" = [%expect {| T0__0__,T0__1__,T0__2__ - ((RequireIs stan::is_stan_scalar (TemplateType T0__0__)) + ((RequireIs stan::is_autodiff (TemplateType T0__0__)) + (RequireIs std::is_floating_point (TemplateType T0__0__)) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) (RequireIs stan::is_vt_not_complex (TemplateType T0__1__)) - (RequireIs std::is_integral - (TypeTrait std::decay_t ((TemplateType T0__2__))))) + (RequireIs std::is_integral (TemplateType T0__2__))) std::tuple |}] let%expect_test "arg types tuple template" = @@ -150,10 +151,12 @@ let%expect_test "arg types tuple template" = [%expect {| T0__0__,T0__1__ - ((RequireIs stan::is_stan_scalar (TemplateType T0__0__)) + ((RequireIs stan::is_std_vector (TemplateType T0__0__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T0__0__)))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) (RequireIs stan::is_vt_not_complex (TemplateType T0__1__))) - std::vector, T0__1__>> |}] + std::vector> |}] let lower_promoted_scalar args = match args with @@ -513,15 +516,19 @@ module Testing = struct stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> Eigen::Matrix, stan::base_type_t, - stan::base_type_t, T3__>>,-1,-1> + stan::base_type_t, + stan::base_type_t>>,-1,-1> sars(const T0__& x_arg__, const T1__& y_arg__, const T2__& z_arg__, - const std::vector>& w, std::ostream* pstream__) { + const T3__& w, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, - stan::base_type_t, T3__>>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -548,13 +555,15 @@ module Testing = struct stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> Eigen::Matrix, stan::base_type_t, - stan::base_type_t, T3__>>,-1,-1> - operator()(const T0__& x, const T1__& y, const T2__& z, - const std::vector>& w, std::ostream* - pstream__) const { + stan::base_type_t, + stan::base_type_t>>,-1,-1> + operator()(const T0__& x, const T1__& y, const T2__& z, const T3__& w, + std::ostream* pstream__) const { return sars(x, y, z, w, pstream__); } }; |}] diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index d4458f297..a0804fac1 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -9,9 +9,7 @@ static constexpr std::array locations_array__ = {" (found before start of program)", " (in 'external.stan', line 10, column 4 to column 66)", " (in 'external.stan', line 9, column 63 to line 11, column 3)"}; -double -internal_fun(const std::vector>& a, - const std::vector>& d, std::ostream* pstream__); +double internal_fun(const double& a, const int& d, std::ostream* pstream__); struct external_map_rectable_functor__ { template , @@ -20,14 +18,12 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> - operator()(const T0__& phi, const T1__& theta, const std::vector& - x_r, const std::vector& x_i, std::ostream* pstream__) const { + operator()(const T0__& phi, const T1__& theta, const double& x_r, + const int& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); } }; -double -internal_fun(const std::vector>& a, - const std::vector>& d, std::ostream* pstream__) { +double internal_fun(const double& a, const int& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index 57136050a..22e6fb766 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -9,9 +9,7 @@ static constexpr std::array locations_array__ = {" (found before start of program)", " (in 'external.stan', line 10, column 4 to column 66)", " (in 'external.stan', line 9, column 63 to line 11, column 3)"}; -double -internal_fun(const std::vector>& a, - const std::vector>& d, std::ostream* pstream__); +double internal_fun(const double& a, const int& d, std::ostream* pstream__); struct external_map_rectable_functor__ { template , @@ -20,14 +18,12 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> - operator()(const T0__& phi, const T1__& theta, const std::vector& - x_r, const std::vector& x_i, std::ostream* pstream__) const { + operator()(const T0__& phi, const T1__& theta, const double& x_r, + const int& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); } }; -double -internal_fun(const std::vector>& a, - const std::vector>& d, std::ostream* pstream__) { +double internal_fun(const double& a, const int& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index d2e07785d..5c687d11f 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -7219,46 +7219,75 @@ static constexpr std::array locations_array__ = " (in 'complex_scalar.stan', line 33, column 45 to line 35, column 3)"}; std::complex foo(std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> std::decay_t> -foo1(const std::complex& z, std::ostream* pstream__); +foo1(const T0__& z, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::complex>> foo2(const T0__& r, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> std::complex>> -foo3(const std::complex& z, std::ostream* pstream__); +foo3(const T0__& z, std::ostream* pstream__); std::vector> foo4(std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo5(const std::vector>& z, std::ostream* pstream__); + stan::require_all_t, + stan::is_complex>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> +std::decay_t>> +foo5(const T0__& z, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::vector>>> foo6(const T0__& r, std::ostream* pstream__); template >* = nullptr> -std::vector>>> -foo7(const std::vector>& z, std::ostream* pstream__); + stan::require_all_t, + stan::is_complex>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> +std::vector< + std::complex>>>> +foo7(const T0__& z, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo8(const std::vector>>& z, std::ostream* - pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_complex>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>* = nullptr> +std::decay_t>> +foo8(const T0__& z, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::vector< std::vector>>>> foo9(const T0__& r, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + stan::is_std_vector>, + stan::is_complex>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>* = nullptr> std::vector< - std::vector>>>> -foo10(const std::vector>>& z, std::ostream* - pstream__); + std::vector< + std::complex>>>>> +foo10(const T0__& z, std::ostream* pstream__); std::complex foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -7278,9 +7307,12 @@ std::complex foo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + stan::is_autodiff>, + std::is_floating_point>>*> std::decay_t> -foo1(const std::complex& z, std::ostream* pstream__) { +foo1(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; // suppress unused var warning @@ -7298,7 +7330,9 @@ foo1(const std::complex& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::complex>> foo2(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7318,9 +7352,12 @@ foo2(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + stan::is_autodiff>, + std::is_floating_point>>*> std::complex>> -foo3(const std::complex& z, std::ostream* pstream__) { +foo3(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; // suppress unused var warning @@ -7361,10 +7398,15 @@ std::vector> foo4(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo5(const std::vector>& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_complex>, + stan::is_autodiff>>, + std::is_floating_point>>>*> +std::decay_t>> +foo5(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7381,7 +7423,9 @@ foo5(const std::vector>& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::vector>>> foo6(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7403,10 +7447,16 @@ foo6(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::vector>>> -foo7(const std::vector>& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_complex>, + stan::is_autodiff>>, + std::is_floating_point>>>*> +std::vector< + std::complex>>>> +foo7(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7423,11 +7473,18 @@ foo7(const std::vector>& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo8(const std::vector>>& z, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_std_vector>, + stan::is_complex>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>*> +std::decay_t>> +foo8(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7444,7 +7501,9 @@ foo8(const std::vector>>& z, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::vector< std::vector>>>> foo9(const T0__& r, std::ostream* pstream__) { @@ -7475,12 +7534,20 @@ foo9(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + stan::is_std_vector>, + stan::is_complex>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>*> std::vector< - std::vector>>>> -foo10(const std::vector>>& z, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t>; + std::vector< + std::complex>>>>> +foo10(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10413,15 +10480,19 @@ template >>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_complex>>* = nullptr> std::vector< - Eigen::Matrix>>,-1,-1>> -foo(const std::vector,-1,-1>>& Z, - std::ostream* pstream__); + Eigen::Matrix>>>,-1,-1>> +foo(const T0__& Z, std::ostream* pstream__); template >* = nullptr> -std::vector>,-1,-1>> -foo(const std::vector>& A, std::ostream* pstream__); + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> +std::vector< + Eigen::Matrix>>,-1,-1>> +foo(const T0__& A, std::ostream* pstream__); template , stan::is_vt_complex>*> @@ -10566,12 +10637,14 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_complex>>*> std::vector< - Eigen::Matrix>>,-1,-1>> -foo(const std::vector,-1,-1>>& Z, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + Eigen::Matrix>>>,-1,-1>> +foo(const T0__& Z, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10588,10 +10661,14 @@ foo(const std::vector,-1,-1>>& Z, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::vector>,-1,-1>> -foo(const std::vector>& A, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>*> +std::vector< + Eigen::Matrix>>,-1,-1>> +foo(const T0__& A, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index fef17e91e..d1f52f1ec 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -903,30 +903,32 @@ static constexpr std::array locations_array__ = " (in 'complex-tuples.stan', line 2, column 105 to line 4, column 3)"}; template >, - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>>* = nullptr> std::tuple>> f(const T0__& x, const std::vector< std::vector< std::tuple>, - std::vector>>>>& x2, std::ostream* - pstream__); + T1__1__>>>& x2, std::ostream* pstream__); template >, - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>>*> std::tuple>> f(const T0__& x, const std::vector< std::vector< std::tuple>, - std::vector>>>>& x2, std::ostream* - pstream__) { + T1__1__>>>& x2, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2124,23 +2126,24 @@ static constexpr std::array locations_array__ = " (in 'cpp-reserved-words.stan', line 15, column 17 to column 19)", " (in 'cpp-reserved-words.stan', line 16, column 17 to column 19)"}; template >>* = nullptr> + stan::require_all_t>* = nullptr> void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> void _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__); void _stan_bitor(std::ostream* pstream__); void _stan_bool(std::ostream* pstream__); @@ -2149,9 +2152,8 @@ void _stan_catch(std::ostream* pstream__); void _stan_char(std::ostream* pstream__); void _stan_char16_t(std::ostream* pstream__); void _stan_char32_t(std::ostream* pstream__); -template >>*> -void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { +template >*> void +_stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2163,9 +2165,8 @@ void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } -template >>*> -void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { +template >*> void +_stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2177,9 +2178,8 @@ void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } -template >>*> -int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { +template >*> int +_stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2197,7 +2197,9 @@ int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -2226,9 +2228,8 @@ void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } -template >>*> -void _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__) { +template >*> void +_stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -3765,17 +3766,23 @@ static constexpr std::array locations_array__ = " (in 'funcall-type-promotion.stan', line 7, column 4 to column 17)", " (in 'funcall-type-promotion.stan', line 6, column 27 to line 8, column 3)"}; template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo(const T0__& x, const T1__& y, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> void bar(const T0__& x, const T1__& y, std::ostream* pstream__); template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -3796,8 +3803,10 @@ foo(const T0__& x, const T1__& y, std::ostream* pstream__) { } } template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> void bar(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -5467,78 +5476,101 @@ static constexpr std::array locations_array__ = " (in 'mother.stan', line 344, column 4 to column 16)", " (in 'mother.stan', line 341, column 41 to line 345, column 3)"}; template >>* = nullptr> + stan::require_all_t>* = nullptr> int foo(const T0__& n, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, - std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t>>> +sho(const T0__& t, const T1__& y, const T2__& theta, const double& x, + const int& x_int, std::ostream* pstream__); double foo_bar0(std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo_bar1(const T0__& x, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__); template >, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template >, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template >, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> void unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> int foo_1(const T0__& a, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> int foo_2(const T0__& a, std::ostream* pstream__); template , - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_floating_point, + std::is_integral>* = nullptr> std::vector>> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> -void foo_4(const std::vector& x, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +void foo_4(const T0__& x, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__); @@ -5550,27 +5582,37 @@ template , stan::base_type_t>>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__); + const double& data_r, const int& data_i, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t>>> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& @@ -5579,399 +5621,694 @@ foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& template , stan::is_vt_not_complex, - std::is_integral>>* = nullptr> + std::is_integral>* = nullptr> Eigen::Matrix>>,-1,-1> covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> void -f0(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f0(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> int -f1(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f1(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector -f2(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f2(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector> -f3(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f3(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::decay_t, - T7__, - std::decay_t, T10__, T11__>>>> -f4(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>> +f4(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector< - std::decay_t, T7__, - std::decay_t, T10__, T11__>>>>> -f5(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>> +f5(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector< std::vector< - std::decay_t, T7__, - std::decay_t, T10__, T11__>>>>>> -f6(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>>> +f6(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,1> -f7(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,1> +f7(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector< - Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,1>> -f8(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,1>> +f8(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector< std::vector< - Eigen::Matrix, T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>,-1,1>>> -f9(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + stan::base_type_t, + stan::base_type_t>>>>,-1,1>>> +f9(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,-1> -f10(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, - std::ostream* pstream__); + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,-1> +f10(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& + a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector< - Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,-1>> -f11(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, - std::ostream* pstream__); + Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,-1>> +f11(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& + a12, std::ostream* pstream__); template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> std::vector< std::vector< - Eigen::Matrix, T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>,-1,-1>>> -f12(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, - std::ostream* pstream__); + stan::base_type_t, + stan::base_type_t>>>>,-1,-1>>> +f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& + a12, std::ostream* pstream__); void foo_6(std::ostream* pstream__); Eigen::Matrix matfoo(std::ostream* pstream__); Eigen::Matrix vecfoo(std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> Eigen::Matrix>,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> Eigen::Matrix>,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> -algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& - dat_int, std::ostream* pstream__); + stan::base_type_t, + stan::base_type_t>>,-1,1> +algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, + const T3__& dat_int, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -5993,21 +6333,24 @@ template >* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> -binomialf(const T0__& phi_arg__, const T1__& theta_arg__, - const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__); +binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const double& x_r, + const int& x_i, std::ostream* pstream__); struct algebra_system_functor__ { template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> - operator()(const T0__& x, const T1__& y, const std::vector& dat, - const std::vector& dat_int, std::ostream* pstream__) const { + stan::base_type_t, + stan::base_type_t>>,-1,1> + operator()(const T0__& x, const T1__& y, const T2__& dat, const T3__& + dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); } }; @@ -6019,14 +6362,13 @@ struct binomialf_functor__ { stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> - operator()(const T0__& phi, const T1__& theta, const std::vector& - x_r, const std::vector& x_i, std::ostream* pstream__) const { + operator()(const T0__& phi, const T1__& theta, const double& x_r, + const int& x_i, std::ostream* pstream__) const { return binomialf(phi, theta, x_r, x_i, pstream__); } }; -template >>*> -int foo(const T0__& n, std::ostream* pstream__) { +template >*> int +foo(const T0__& n, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -6050,15 +6392,22 @@ int foo(const T0__& n, std::ostream* pstream__) { } } template , - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +std::vector< + std::decay_t, + stan::base_type_t>>> +sho(const T0__& t, const T1__& y, const T2__& theta, const double& x, + const int& x_int, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6105,7 +6454,9 @@ double foo_bar0(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::decay_t> foo_bar1(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6126,8 +6477,10 @@ foo_bar1(const T0__& x, std::ostream* pstream__) { } } template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6148,8 +6501,9 @@ foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { } } template >, - stan::is_stan_scalar>*> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6167,8 +6521,9 @@ foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { } } template >, - stan::is_stan_scalar>*> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6189,8 +6544,9 @@ foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { } } template >, - stan::is_stan_scalar>*> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6211,8 +6567,10 @@ foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { } } template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__) { @@ -6235,7 +6593,8 @@ foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* } template >*> + stan::require_all_t, + std::is_floating_point>*> void unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -6255,9 +6614,8 @@ unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -int foo_1(const T0__& a, std::ostream* pstream__) { +template >*> int +foo_1(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -6464,9 +6822,8 @@ int foo_1(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -int foo_2(const T0__& a, std::ostream* pstream__) { +template >*> int +foo_2(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -6496,8 +6853,9 @@ int foo_2(const T0__& a, std::ostream* pstream__) { } } template , - std::is_integral>>*> + stan::require_all_t, + std::is_floating_point, + std::is_integral>*> std::vector>> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6519,7 +6877,8 @@ foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -6537,9 +6896,12 @@ foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -void foo_4(const std::vector& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_autodiff>, + std::is_floating_point>>*> +void foo_4(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6563,10 +6925,14 @@ void foo_4(const std::vector& x, std::ostream* pstream__) { } } template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__) { @@ -6628,8 +6994,7 @@ template , stan::base_type_t>>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__) { + const double& data_r, const int& data_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; @@ -6653,11 +7018,16 @@ foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, } template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__) { @@ -6682,12 +7052,18 @@ foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t>>> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& @@ -6712,7 +7088,7 @@ foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& template , stan::is_vt_not_complex, - std::is_integral>>*> + std::is_integral>*> Eigen::Matrix>>,-1,-1> covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__) { @@ -6758,35 +7134,58 @@ covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> void -f0(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f0(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6811,35 +7210,58 @@ f0(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> int -f1(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f1(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6861,35 +7283,58 @@ f1(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector -f2(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f2(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6911,35 +7356,58 @@ f2(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector> -f3(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, +f3(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6961,38 +7429,64 @@ f3(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::decay_t, - T7__, - std::decay_t, T10__, T11__>>>> -f4(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>> +f4(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7014,39 +7508,65 @@ f4(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector< - std::decay_t, T7__, - std::decay_t, T10__, T11__>>>>> -f5(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>> +f5(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7068,40 +7588,66 @@ f5(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector< std::vector< - std::decay_t, T7__, - std::decay_t, T10__, T11__>>>>>> -f6(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>>> +f6(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7123,39 +7669,66 @@ f6(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,1> -f7(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,1> +f7(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7177,40 +7750,67 @@ f7(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector< - Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,1>> -f8(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,1>> +f8(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7232,41 +7832,68 @@ f8(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector< std::vector< - Eigen::Matrix, T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>,-1,1>>> -f9(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, + stan::base_type_t, + stan::base_type_t>>>>,-1,1>>> +f9(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7288,39 +7915,66 @@ f9(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,-1> -f10(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +Eigen::Matrix, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,-1> +f10(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& + a12, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7342,40 +7996,67 @@ f10(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector< - Eigen::Matrix, T7__, - std::decay_t, T10__, - T11__>>>>,-1,-1>> -f11(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>,-1,-1>> +f11(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& + a12, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7397,41 +8078,68 @@ f11(const T0__& a1, const std::vector& a2, template >, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> std::vector< std::vector< - Eigen::Matrix, T7__, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>,-1,-1>>> -f12(const T0__& a1, const std::vector& a2, - const std::vector>& a3, const T3__& a4, - const std::vector& a5, const std::vector>& a6, - const T6__& a7_arg__, const std::vector>& a8, - const std::vector>>& a9, const T9__& - a10_arg__, const std::vector>& a11, - const std::vector>>& a12, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T7__, - std::decay_t, + stan::base_type_t>>>>,-1,-1>>> +f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, + const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, + const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& + a12, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, stan::base_type_t, - T10__, T11__>>>>; + stan::base_type_t, + stan::base_type_t>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7525,7 +8233,9 @@ Eigen::Matrix vecfoo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> Eigen::Matrix>,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7550,7 +8260,9 @@ vecmufoo(const T0__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> Eigen::Matrix>,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7583,15 +8295,19 @@ template , stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> -algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& - dat_int, std::ostream* pstream__) { + stan::base_type_t, + stan::base_type_t>>,-1,1> +algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, + const T3__& dat_int, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, - stan::base_type_t, T2__>>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7629,9 +8345,8 @@ template >*> Eigen::Matrix, stan::base_type_t>>,-1,1> -binomialf(const T0__& phi_arg__, const T1__& theta_arg__, - const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__) { +binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const double& x_r, + const int& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; @@ -14186,52 +14901,75 @@ static constexpr std::array locations_array__ = " (in 'motherHOF.stan', line 25, column 45 to line 30, column 3)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, - std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, + const T4__& x_int, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -integrand(const T0__& x, const T1__& xc, const std::vector& theta, - const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::decay_t, + stan::base_type_t>> +integrand(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> + stan::base_type_t, + stan::base_type_t>>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__); + const T2__& data_r, const T3__& data_i, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> + stan::base_type_t, + stan::base_type_t>>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__); + const T2__& data_r, const T3__& data_i, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> map_rectfake(const T0__& x, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> -algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& - dat_int, std::ostream* pstream__); + stan::base_type_t, + stan::base_type_t>>,-1,1> +algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, + const T3__& dat_int, std::ostream* pstream__); struct goo_functor__ { template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> - operator()(const T0__& shared_params, const T1__& job_params, - const std::vector& data_r, const std::vector& - data_i, std::ostream* pstream__) const { + stan::base_type_t, + stan::base_type_t>>,-1,1> + operator()(const T0__& shared_params, const T1__& job_params, const T2__& + data_r, const T3__& data_i, std::ostream* pstream__) const { return goo(shared_params, job_params, data_r, data_i, pstream__); } }; @@ -14268,28 +15012,38 @@ struct foo_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> - operator()(const T0__& shared_params, const T1__& job_params, - const std::vector& data_r, const std::vector& - data_i, std::ostream* pstream__) const { + stan::base_type_t, + stan::base_type_t>>,-1,1> + operator()(const T0__& shared_params, const T1__& job_params, const T2__& + data_r, const T3__& data_i, std::ostream* pstream__) const { return foo(shared_params, job_params, data_r, data_i, pstream__); } }; struct integrand_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const T0__& x, const T1__& xc, const std::vector& theta, - const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& x, const T1__& xc, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) const { return integrand(x, xc, theta, x_r, x_i, pstream__); } }; @@ -14299,43 +15053,67 @@ struct algebra_system_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> - operator()(const T0__& x, const T1__& y, const std::vector& dat, - const std::vector& dat_int, std::ostream* pstream__) const { + stan::base_type_t, + stan::base_type_t>>,-1,1> + operator()(const T0__& x, const T1__& y, const T2__& dat, const T3__& + dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); } }; struct sho_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector>> - operator()(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x, - const std::vector& x_int, std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> + operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, + const T4__& x_int, std::ostream* pstream__) const { return sho(t, y, theta, x, x_int, pstream__); } }; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, + const T4__& x_int, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14366,17 +15144,25 @@ sho(const T0__& t, const std::vector& y, const std::vector& } template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::decay_t> -integrand(const T0__& x, const T1__& xc, const std::vector& theta, - const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__) { + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::decay_t, + stan::base_type_t>> +integrand(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14398,15 +15184,19 @@ template , stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> + stan::base_type_t, + stan::base_type_t>>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__) { + const T2__& data_r, const T3__& data_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, - stan::base_type_t, T2__>>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14431,15 +15221,19 @@ template , stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> + stan::base_type_t, + stan::base_type_t>>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const std::vector& data_r, const std::vector& data_i, - std::ostream* pstream__) { + const T2__& data_r, const T3__& data_i, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, - stan::base_type_t, T2__>>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14459,7 +15253,9 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::decay_t> map_rectfake(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -14484,15 +15280,19 @@ template , stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> Eigen::Matrix, - stan::base_type_t, T2__>>,-1,1> -algebra_system(const T0__& x_arg__, const T1__& y_arg__, - const std::vector& dat, const std::vector& - dat_int, std::ostream* pstream__) { + stan::base_type_t, + stan::base_type_t>>,-1,1> +algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, + const T3__& dat_int, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, - stan::base_type_t, T2__>>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -17109,10 +17909,12 @@ static constexpr std::array locations_array__ = " (in 'new_integrate_interface.stan', line 3, column 4 to column 13)", " (in 'new_integrate_interface.stan', line 2, column 47 to line 4, column 3)"}; template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex>*> Eigen::Matrix locations_array__ = " (in 'old_integrate_interface.stan', line 7, column 38 to line 19, column 3)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -dz_dt(const T0__& t, const std::vector& z, const std::vector& - theta, const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +dz_dt(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__); struct dz_dt_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector>> - operator()(const T0__& t, const std::vector& z, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> + operator()(const T0__& t, const T1__& z, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) const { return dz_dt(t, z, theta, x_r, x_i, pstream__); } }; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -dz_dt(const T0__& t, const std::vector& z, const std::vector& - theta, const std::vector& x_r, const std::vector& x_i, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +dz_dt(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25563,10 +26398,11 @@ static constexpr std::array locations_array__ = " (in 'overloading_templating.stan', line 40, column 4 to column 23)", " (in 'overloading_templating.stan', line 39, column 25 to line 41, column 3)"}; template >>* = nullptr> + stan::require_all_t>* = nullptr> double foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo(const T0__& p, std::ostream* pstream__); template >> foo(const T0__& p_arg__, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo(const std::vector& p, std::ostream* pstream__); -template >* = nullptr> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -double foo(const std::vector& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__); template >>*> -double foo(const T0__& p, std::ostream* pstream__) { + stan::require_all_t, + std::is_integral>>* = nullptr> +double foo(const T0__& p, std::ostream* pstream__); +template >*> double +foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -25627,7 +26475,9 @@ double foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::decay_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -25716,10 +26566,13 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo(const std::vector& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25736,10 +26589,13 @@ foo(const std::vector& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_row_vector>, + stan::is_vt_not_complex>>*> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25758,10 +26614,13 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_col_vector>, + stan::is_vt_not_complex>>*> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25780,10 +26639,13 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>*> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25802,10 +26664,15 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>*> +std::decay_t>> +foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25824,8 +26691,10 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -double foo(const std::vector& p, std::ostream* pstream__) { +template , + std::is_integral>>*> +double foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -27163,16 +28032,23 @@ static constexpr std::array locations_array__ = " (in 'promotion.stan', line 7, column 5 to column 18)", " (in 'promotion.stan', line 6, column 28 to line 8, column 4)"}; template >* = nullptr> + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> std::complex>> -ident(const std::complex& x, std::ostream* pstream__); +ident(const T0__& x, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -foo(const std::vector& zs, std::ostream* pstream__); -template >*> + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t>> +foo(const T0__& zs, std::ostream* pstream__); +template , + stan::is_autodiff>, + std::is_floating_point>>*> std::complex>> -ident(const std::complex& x, std::ostream* pstream__) { +ident(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; // suppress unused var warning @@ -27190,10 +28066,13 @@ ident(const std::complex& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -foo(const std::vector& zs, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t>> +foo(const T0__& zs, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27613,7 +28492,7 @@ test2(const T0__& gamma_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex, - std::is_integral>>* = nullptr> + std::is_integral>* = nullptr> Eigen::Matrix>>,-1,-1> matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__); template >> foo(const T0__& a_arg__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo(const T0__& b, std::ostream* pstream__); template >>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -27657,7 +28538,8 @@ foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* pstream__); struct foo_variadic2_functor__ { template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -27709,7 +28591,7 @@ test2(const T0__& gamma_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex, - std::is_integral>>*> + std::is_integral>*> Eigen::Matrix>>,-1,-1> matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -27767,7 +28649,9 @@ foo(const T0__& a_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::decay_t> foo(const T0__& b, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -27925,7 +28809,8 @@ test7(const T0__& gamma_arg__, std::ostream* pstream__) { } } template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -28444,70 +29329,86 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m1.stan', line 17, column 4 to column 39)", " (in 'reduce_sum_m1.stan', line 16, column 58 to line 18, column 3)"}; template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -foo_lpdf(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__); struct h_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const std::vector& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return h(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g(y_slice, (start + 1), (end + 1), pstream__); } }; template struct foo_lpdf_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return foo_lpdf(y_slice, (start + 1), (end + 1), pstream__); } }; template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -28531,14 +29432,19 @@ g(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t, + stan::base_type_t>> +h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -28564,13 +29470,14 @@ h(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -foo_lpdf(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>*> +std::decay_t>> +foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29229,329 +30136,460 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m2.stan', line 120, column 4 to column 20)", " (in 'reduce_sum_m2.stan', line 113, column 65 to line 121, column 3)"}; template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g1(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g2(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g3(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g4(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g5(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g6(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g7(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -g8(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h1(const std::vector& y, const T1__& start, const T2__& end, - const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h2(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h3(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h4(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h5(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h6(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>>& a, std::ostream* - pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h7(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>>& a, std::ostream* - pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -h8(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +h8(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); struct h5_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h5(y, (start + 1), (end + 1), a, pstream__); } }; struct h1_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, const std::vector& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h1(y, (start + 1), (end + 1), a, pstream__); } }; struct g3_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g3(y_slice, (start + 1), (end + 1), pstream__); } }; struct h7_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, - const std::vector>>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h7(y, (start + 1), (end + 1), a, pstream__); } }; struct h3_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h3(y, (start + 1), (end + 1), a, pstream__); } }; struct g2_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g2(y_slice, (start + 1), (end + 1), pstream__); } }; struct g8_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& - y_slice, const T1__& start, const T2__& end, std::ostream* - pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g8(y_slice, (start + 1), (end + 1), pstream__); } }; struct h2_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h2(y, (start + 1), (end + 1), a, pstream__); } }; struct h8_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, - const std::vector>>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h8(y, (start + 1), (end + 1), a, pstream__); } }; struct g7_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& - y_slice, const T1__& start, const T2__& end, std::ostream* - pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g7(y_slice, (start + 1), (end + 1), pstream__); } }; struct g4_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g4(y_slice, (start + 1), (end + 1), pstream__); } }; struct h4_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h4(y, (start + 1), (end + 1), a, pstream__); } }; struct g6_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& - y_slice, const T1__& start, const T2__& end, std::ostream* - pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g6(y_slice, (start + 1), (end + 1), pstream__); } }; struct g5_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g5(y_slice, (start + 1), (end + 1), pstream__); } }; struct h6_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y, const T1__& start, const T2__& end, - std::ostream* pstream__, - const std::vector>>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* + pstream__, const T3__& a) const { return h6(y, (start + 1), (end + 1), a, pstream__); } }; struct g1_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return g1(y_slice, (start + 1), (end + 1), pstream__); } }; template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g1(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29569,13 +30607,14 @@ g1(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g2(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29604,13 +30643,14 @@ g2(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g3(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29639,13 +30679,14 @@ g3(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g4(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29675,13 +30716,16 @@ g4(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g5(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29716,13 +30760,17 @@ g5(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g6(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29758,13 +30806,17 @@ g6(const std::vector>>& y_slice, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g7(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29800,13 +30852,17 @@ g7(const std::vector>>& y_slice, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -g8(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29842,14 +30898,19 @@ g8(const std::vector>>& y_slice, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h1(const std::vector& y, const T1__& start, const T2__& end, - const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t, + stan::base_type_t>> +h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29869,14 +30930,19 @@ h1(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h2(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>*> +std::decay_t, + stan::base_type_t>> +h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29904,14 +30970,19 @@ h2(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h3(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>*> +std::decay_t, + stan::base_type_t>> +h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29939,14 +31010,19 @@ h3(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h4(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>*> +std::decay_t, + stan::base_type_t>> +h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29975,14 +31051,21 @@ h4(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h5(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>*> +std::decay_t, + stan::base_type_t>> +h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -30016,15 +31099,22 @@ h5(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h6(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>>& a, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t>> +h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -30059,15 +31149,22 @@ h6(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h7(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>>& a, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t>> +h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -30102,15 +31199,22 @@ h7(const std::vector& y, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -h8(const std::vector& y, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t>> +h8(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32307,521 +33411,739 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m3.stan', line 148, column 4 to column 15)", " (in 'reduce_sum_m3.stan', line 86, column 11 to line 149, column 3)"}; template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f1(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f1a(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f2(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f3(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f4(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f5(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f6(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f7(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f8(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_integral>, + std::is_integral, std::is_integral>* = nullptr> double -f9(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__); +f9(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + std::is_integral, std::is_integral>* = nullptr> double -f10(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__); +f10(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + std::is_integral>>>, + std::is_integral, std::is_integral>* = nullptr> double -f11(const std::vector>>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__); +f11(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>>* = nullptr> -std::decay_t> -f12(const std::vector>>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_autodiff>>>, + std::is_floating_point>>>, + std::is_integral, std::is_integral>* = nullptr> +std::decay_t>> +f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g1(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_autodiff, + std::is_floating_point>* = nullptr> +std::decay_t, T3__>> +g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -std::decay_t>> -g2(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a_arg__, std::ostream* pstream__); +std::decay_t, + stan::base_type_t>> +g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& + a_arg__, std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -std::decay_t>> -g3(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a_arg__, std::ostream* pstream__); +std::decay_t, + stan::base_type_t>> +g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& + a_arg__, std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -std::decay_t>> -g4(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a_arg__, std::ostream* pstream__); +std::decay_t, + stan::base_type_t>> +g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& + a_arg__, std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g5(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g6(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g7(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g8(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g9(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g10(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g11(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -g12(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +std::decay_t, + stan::base_type_t>> +g12(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - std::is_integral>, - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + std::is_integral, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::decay_t, - stan::base_type_t, stan::base_type_t, - std::decay_t>>>>> -s(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, - const T7__& e_arg__, const std::vector& f, const std::vector& - g, const std::vector>& h, - const std::vector>& i, - const std::vector>& j, - const std::vector>& k, - const std::vector>& l, - const std::vector>>& m, - const std::vector>>& n, - const std::vector>>& o, - const std::vector>>& p, - const std::vector>>& q, std::ostream* - pstream__); + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_std_vector>>, + std::is_integral>>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>* = nullptr> +std::decay_t, T4__, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>>> +s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + const T4__& b, const T5__& c_arg__, const T6__& d_arg__, const T7__& + e_arg__, const T8__& f, const T9__& g, const T10__& h, const T11__& i, + const T12__& j, const T13__& k, const T14__& l, const T15__& m, + const T16__& n, const T17__& o, const T18__& p, const T19__& q, + std::ostream* pstream__); double r(std::ostream* pstream__); struct f11_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + std::is_integral>>>, + std::is_integral, + std::is_integral>* = nullptr> double - operator()(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f11(y_slice, (start + 1), (end + 1), pstream__); } }; struct f10_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + std::is_integral, + std::is_integral>* = nullptr> double - operator()(const std::vector>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__) const { + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f10(y_slice, (start + 1), (end + 1), pstream__); } }; struct g8_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g8(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g7_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g7(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g4_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> - std::decay_t>> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const T3__& a) const { + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g4(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g6_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g6(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g11_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g11(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f5_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f5(y_slice, (start + 1), (end + 1), pstream__); } }; struct f1_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f1(y_slice, (start + 1), (end + 1), pstream__); } }; struct g5_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const std::vector& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g5(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g9_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g9(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g1_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const T3__& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_autodiff, + std::is_floating_point>* = nullptr> + std::decay_t, T3__>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g1(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f12_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_autodiff>>>, + std::is_floating_point>>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f12(y_slice, (start + 1), (end + 1), pstream__); } }; struct g3_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> - std::decay_t>> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const T3__& a) const { + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g3(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f3_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f3(y_slice, (start + 1), (end + 1), pstream__); } }; struct f2_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f2(y_slice, (start + 1), (end + 1), pstream__); } }; struct f6_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& - y_slice, const T1__& start, const T2__& end, std::ostream* - pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f6(y_slice, (start + 1), (end + 1), pstream__); } }; struct g2_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - std::decay_t>> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const T3__& a) const { + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g2(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct g10_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g10(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f8_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& - y_slice, const T1__& start, const T2__& end, std::ostream* - pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f8(y_slice, (start + 1), (end + 1), pstream__); } }; struct g12_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::vector>>& a) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> + std::decay_t, + stan::base_type_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a) const { return g12(y_slice, (start + 1), (end + 1), a, pstream__); } }; struct f9_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_integral>, + std::is_integral, + std::is_integral>* = nullptr> double - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) const { + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f9(y_slice, (start + 1), (end + 1), pstream__); } }; struct f4_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f4(y_slice, (start + 1), (end + 1), pstream__); } }; @@ -32831,84 +34153,137 @@ struct s_rsfunctor__ { typename T8__, typename T9__, typename T10__, typename T11__, typename T12__, typename T13__, typename T14__, typename T15__, typename T16__, typename T17__, typename T18__, typename T19__, - stan::require_all_t, - std::is_integral>, - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + std::is_integral, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::decay_t, - stan::base_type_t, stan::base_type_t, - std::decay_t>>>>> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, const T3__& a, const T4__& b, - const T5__& c, const T6__& d, const T7__& e, - const std::vector& f, const std::vector& g, - const std::vector>& h, - const std::vector>& i, - const std::vector>& j, - const std::vector>& k, - const std::vector>& l, - const std::vector>>& m, - const std::vector>>& n, - const std::vector>>& o, - const std::vector>>& p, - const std::vector>>& q) const { + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_std_vector>>, + std::is_integral>>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>* = nullptr> + std::decay_t, T4__, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const T3__& a, const T4__& b, + const T5__& c, const T6__& d, const T7__& e, const T8__& f, + const T9__& g, const T10__& h, const T11__& i, const T12__& j, + const T13__& k, const T14__& l, const T15__& m, const T16__& n, + const T17__& o, const T18__& p, const T19__& q) const { return s(y_slice, (start + 1), (end + 1), a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, pstream__); } }; struct f7_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector>>& - y_slice, const T1__& start, const T2__& end, std::ostream* - pstream__) const { + stan::require_all_t, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f7(y_slice, (start + 1), (end + 1), pstream__); } }; struct f1a_rsfunctor__ { template , - std::is_integral>, - std::is_integral>>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral>* = nullptr> + std::decay_t>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__) const { return f1a(y_slice, (start + 1), (end + 1), pstream__); } }; template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f1(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32926,13 +34301,14 @@ f1(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f1a(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32950,13 +34326,14 @@ f1a(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f2(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32974,13 +34351,14 @@ f2(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f3(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32998,13 +34376,14 @@ f3(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f4(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33022,13 +34401,16 @@ f4(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f5(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33046,13 +34428,17 @@ f5(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f6(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33070,13 +34456,17 @@ f6(const std::vector>>& y_slice, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f7(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33094,13 +34484,17 @@ f7(const std::vector>>& y_slice, } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f8(const std::vector>>& y_slice, - const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33118,12 +34512,12 @@ f8(const std::vector>>& y_slice, } } template , - std::is_integral>, - std::is_integral>>*> + stan::require_all_t, + std::is_integral>, + std::is_integral, std::is_integral>*> double -f9(const std::vector& y_slice, const T1__& start, const T2__& end, - std::ostream* pstream__) { +f9(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -33142,12 +34536,13 @@ f9(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>>*> + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + std::is_integral, std::is_integral>*> double -f10(const std::vector>& y_slice, const T1__& start, - const T2__& end, std::ostream* pstream__) { +f10(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -33166,12 +34561,16 @@ f10(const std::vector>& y_slice, const T1__& start, } } template , - std::is_integral>, - std::is_integral>>*> + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + std::is_integral>>>, + std::is_integral, std::is_integral>*> double -f11(const std::vector>>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__) { +f11(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -33190,13 +34589,20 @@ f11(const std::vector>>& y_slice, const T1__& } } template , - std::is_integral>, - std::is_integral>>*> -std::decay_t> -f12(const std::vector>>& y_slice, const T1__& - start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_autodiff>>>, + std::is_floating_point>>>, + std::is_integral, std::is_integral>*> +std::decay_t>> +f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33214,14 +34620,17 @@ f12(const std::vector>>& y_slice, const T1__& } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g1(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_autodiff, + std::is_floating_point>*> +std::decay_t, T3__>> +g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + T3__>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33239,15 +34648,17 @@ g1(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>*> -std::decay_t>> -g2(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, + stan::base_type_t>> +g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& + a_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning @@ -33267,15 +34678,17 @@ g2(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>*> -std::decay_t>> -g3(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, + stan::base_type_t>> +g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& + a_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning @@ -33295,15 +34708,17 @@ g3(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -std::decay_t>> -g4(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, + stan::base_type_t>> +g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& + a_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning @@ -33323,14 +34738,19 @@ g4(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g5(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t, + stan::base_type_t>> +g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33348,14 +34768,19 @@ g5(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g6(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>*> +std::decay_t, + stan::base_type_t>> +g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33373,14 +34798,19 @@ g6(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g7(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>*> +std::decay_t, + stan::base_type_t>> +g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33398,14 +34828,19 @@ g7(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g8(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>*> +std::decay_t, + stan::base_type_t>> +g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33423,14 +34858,21 @@ g8(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g9(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>>*> +std::decay_t, + stan::base_type_t>> +g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33448,15 +34890,22 @@ g9(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g10(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t>> +g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33474,15 +34923,22 @@ g10(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g11(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t>> +g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33500,15 +34956,22 @@ g11(const std::vector& y_slice, const T1__& start, const T2__& end, } } template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar>*> -std::decay_t> -g12(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::vector>>& a, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +std::decay_t, + stan::base_type_t>> +g12(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33530,60 +34993,106 @@ template , - std::is_integral>, - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + std::is_integral, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::decay_t, - stan::base_type_t, stan::base_type_t, - std::decay_t>>>>> -s(const std::vector& y_slice, const T1__& start, const T2__& end, - const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, - const T7__& e_arg__, const std::vector& f, const std::vector& - g, const std::vector>& h, - const std::vector>& i, - const std::vector>& j, - const std::vector>& k, - const std::vector>& l, - const std::vector>>& m, - const std::vector>>& n, - const std::vector>>& o, - const std::vector>>& p, - const std::vector>>& q, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_autodiff>>, + std::is_floating_point>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_std_vector>>, + std::is_integral>>>, + stan::is_std_vector, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_autodiff>>>, + std::is_floating_point>>>>*> +std::decay_t, T4__, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>>> +s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + const T4__& b, const T5__& c_arg__, const T6__& d_arg__, const T7__& + e_arg__, const T8__& f, const T9__& g, const T10__& h, const T11__& i, + const T12__& j, const T13__& k, const T14__& l, const T15__& m, + const T16__& n, const T17__& o, const T18__& p, const T19__& q, + std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + T4__, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, std::decay_t< - stan::promote_args_t>>>>>; + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36119,19 +37628,24 @@ static constexpr std::array locations_array__ = " (in 'return-position-types.stan', line 11, column 4 to column 24)", " (in 'return-position-types.stan', line 10, column 30 to line 12, column 3)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::vector>> foo(const T0__& a, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::tuple>>, std::decay_t>> baz(const T0__& a, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::vector>>> bar(const T0__& a, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::vector>> foo(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -36151,7 +37665,9 @@ foo(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::tuple>>, std::decay_t>> baz(const T0__& a, std::ostream* pstream__) { @@ -36173,7 +37689,9 @@ baz(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::vector>>> bar(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -36622,20 +38140,24 @@ static constexpr std::array locations_array__ = " (in 'shadowing.stan', line 5, column 4 to column 14)", " (in 'shadowing.stan', line 2, column 43 to line 6, column 3)"}; template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T2__>>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* pstream__); struct rhs_variadic2_functor__ { template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T2__>>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, @@ -36644,10 +38166,12 @@ struct rhs_variadic2_functor__ { } }; template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> + stan::is_autodiff, + std::is_floating_point>*> Eigen::Matrix, T2__>>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* @@ -38103,33 +39627,36 @@ static constexpr std::array locations_array__ = " (in 'single-argument-lpmf.stan', line 18, column 4 to column 14)", " (in 'single-argument-lpmf.stan', line 17, column 23 to line 19, column 3)"}; template >>* = nullptr> + stan::require_all_t>* = nullptr> double foo0_lpmf(const T0__& y, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> double foo1_lpmf(const T0__& y, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> double foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo2_lpdf(const T0__& y, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo3_lpdf(const T0__& y, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >>*> + stan::require_all_t>*> double foo0_lpmf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -38146,7 +39673,7 @@ double foo0_lpmf(const T0__& y, std::ostream* pstream__) { } } template >>*> + stan::require_all_t>*> double foo1_lpmf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -38163,8 +39690,7 @@ double foo1_lpmf(const T0__& y, std::ostream* pstream__) { } } template >>*> + typename T_lp_accum__, stan::require_all_t>*> double foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -38183,7 +39709,8 @@ foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> foo2_lpdf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -38201,7 +39728,8 @@ foo2_lpdf(const T0__& y, std::ostream* pstream__) { } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> foo3_lpdf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -38220,7 +39748,8 @@ foo3_lpdf(const T0__& y, std::ostream* pstream__) { } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -42736,10 +44265,13 @@ static constexpr std::array locations_array__ = " (in 'udf_tilde_stmt_conflict.stan', line 3, column 4 to column 21)", " (in 'udf_tilde_stmt_conflict.stan', line 2, column 22 to line 4, column 3)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> normal(const T0__& a, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> normal(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -43112,13 +44644,17 @@ static constexpr std::array locations_array__ = " (in 'user_constrain.stan', line 3, column 4 to column 13)", " (in 'user_constrain.stan', line 2, column 36 to line 4, column 3)"}; template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__); template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index cad567e0c..f90475f8e 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -610,29 +610,37 @@ static constexpr std::array locations_array__ = " (in 'simple_function.stan', line 11, column 37 to line 13, column 3)"}; template , - std::is_integral>, - stan::is_stan_scalar, + stan::require_all_t, + std::is_floating_point, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -std::decay_t, - stan::base_type_t, stan::base_type_t>> -foo1(const T0__& a, const T1__& b, const std::vector& c, const T3__& - d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* - pstream__); +std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>> +foo1(const T0__& a, const T1__& b, const T2__& c, const T3__& d_arg__, + const T4__& e_arg__, const T5__& f_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> Eigen::Matrix, - T1__, T2__>>,-1,1> -foo2(const T0__& a_arg__, const std::vector>& b, - const std::vector>& c, std::ostream* pstream__); + stan::base_type_t, + stan::base_type_t>>,-1,1> +foo2(const T0__& a_arg__, const T1__& b, const T2__& c, std::ostream* + pstream__); template , stan::is_vt_not_complex, @@ -651,21 +659,25 @@ Eigen::Matrix, add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); template , - std::is_integral>, - stan::is_stan_scalar, + stan::require_all_t, + std::is_floating_point, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex>*> -std::decay_t, - stan::base_type_t, stan::base_type_t>> -foo1(const T0__& a, const T1__& b, const std::vector& c, const T3__& - d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>> +foo1(const T0__& a, const T1__& b, const T2__& c, const T3__& d_arg__, + const T4__& e_arg__, const T5__& f_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>; @@ -691,14 +703,20 @@ foo1(const T0__& a, const T1__& b, const std::vector& c, const T3__& template , stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_std_vector, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>*> Eigen::Matrix, - T1__, T2__>>,-1,1> -foo2(const T0__& a_arg__, const std::vector>& b, - const std::vector>& c, std::ostream* pstream__) { + stan::base_type_t, + stan::base_type_t>>,-1,1> +foo2(const T0__& a_arg__, const T1__& b, const T2__& c, std::ostream* + pstream__) { using local_scalar_t__ = std::decay_t, - T1__, T2__>>; + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 7955ba769..561f0c2f7 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -802,9 +802,7 @@ (Literal "\" (in 'mother.stan', line 341, column 41 to line 345, column 3)\""))))))) (FunDef ((templates_init - ((((Typename T0__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) - true)) + ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) true)) (inline false) (return_type Int) (name foo) (args (((Const (Ref (TemplateType T0__))) n) @@ -813,23 +811,31 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T2__)))))) true)) (inline false) (return_type (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))))) + ((TemplateType T0__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))) (name sho) (args - (((Const (Ref (TemplateType T0__))) t) - ((Const (Ref (StdVector (TemplateType T1__)))) y) - ((Const (Ref (StdVector (TemplateType T2__)))) theta) - ((Const (Ref (StdVector Double))) x) ((Const (Ref (StdVector Int))) x_int) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) + ((Const (Ref (TemplateType T2__))) theta) ((Const (Ref Double)) x) + ((Const (Ref Int)) x_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((()) true)) (inline false) (return_type Double) @@ -837,7 +843,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) + ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) + true)) (inline false) (return_type (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) @@ -849,8 +857,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) true)) (inline false) (return_type @@ -864,8 +874,9 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) true)) (inline false) (return_type @@ -877,9 +888,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) true)) (inline false) (return_type @@ -891,9 +902,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) true)) (inline false) (return_type @@ -906,8 +917,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) true)) (inline false) (return_type @@ -922,7 +935,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) true)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -932,9 +946,7 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) - true)) + ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) true)) (inline false) (return_type Int) (name foo_1) (args (((Const (Ref (TemplateType T0__))) a) @@ -942,9 +954,7 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) - true)) + ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) true)) (inline false) (return_type Int) (name foo_2) (args (((Const (Ref (TemplateType T0__))) a) @@ -953,8 +963,9 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs std::is_integral (TemplateType T1__)))) true)) (inline false) (return_type @@ -968,7 +979,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) true)) (inline false) (return_type @@ -981,19 +993,28 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) + ((((Typename T0__) (RequireIs stan::is_std_vector (TemplateType T0__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T0__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T0__)))))) + true)) (inline false) (return_type Void) (name foo_4) (args - (((Const (Ref (StdVector (TemplateType T0__)))) x) + (((Const (Ref (TemplateType T0__))) x) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)) + (RequireIs stan::is_autodiff (TemplateType T2__)) + (RequireIs std::is_floating_point (TemplateType T2__)) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)))) true)) (inline false) (return_type @@ -1025,18 +1046,22 @@ (name foo_5) (args (((Const (Ref (TemplateType T0__))) shared_params_arg__) - ((Const (Ref (TemplateType T1__))) job_params_arg__) - ((Const (Ref (StdVector Double))) data_r) ((Const (Ref (StdVector Int))) data_i) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) job_params_arg__) ((Const (Ref Double)) data_r) + ((Const (Ref Int)) data_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (Typename T4__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)))) + (Typename T4__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)) + (RequireIs stan::is_autodiff (TemplateType T2__)) + (RequireIs std::is_floating_point (TemplateType T2__)) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_autodiff (TemplateType T4__)) + (RequireIs std::is_floating_point (TemplateType T4__)))) true)) (inline false) (return_type @@ -1055,12 +1080,18 @@ ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T_lp__) - (Typename T_lp_accum__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)))) + (Typename T_lp_accum__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)) + (RequireIs stan::is_autodiff (TemplateType T2__)) + (RequireIs std::is_floating_point (TemplateType T2__)) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_autodiff (TemplateType T4__)) + (RequireIs std::is_floating_point (TemplateType T4__)) + (RequireIs stan::is_autodiff (TemplateType T5__)) + (RequireIs std::is_floating_point (TemplateType T5__)))) true)) (inline false) (return_type @@ -1083,7 +1114,7 @@ ((((Typename T0__) (Typename T1__) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__)) (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) + (RequireIs std::is_integral (TemplateType T1__)))) true)) (inline false) (return_type @@ -1102,36 +1133,74 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type Void) (name f0) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1139,36 +1208,74 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type Int) (name f1) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1176,36 +1283,74 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type (StdVector Int)) (name f2) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1213,36 +1358,74 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type (StdVector (StdVector Int))) (name f3) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1250,46 +1433,87 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t)))))))))) (name f4) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1297,47 +1521,88 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (name f5) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1345,20 +1610,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1366,27 +1675,24 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t)))))))))))) (name f6) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1394,48 +1700,89 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 1 AoS)) (name f7) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1443,20 +1790,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1464,28 +1855,25 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 1 AoS))) (name f8) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1493,20 +1881,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1515,28 +1947,26 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 1 AoS)))) (name f9) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1544,48 +1974,89 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 -1 AoS)) (name f10) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1593,20 +2064,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1614,28 +2129,25 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 -1 AoS))) (name f11) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1643,20 +2155,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1665,28 +2221,26 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 -1 AoS)))) (name f12) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1703,7 +2257,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) + ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) + true)) (inline false) (return_type (Matrix @@ -1716,7 +2272,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) true)) + ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) + true)) (inline false) (return_type (Matrix @@ -1734,8 +2292,14 @@ (RequireIs stan::is_vt_not_complex (TemplateType T0__)) (RequireIs stan::is_col_vector (TemplateType T1__)) (RequireIs stan::is_vt_not_complex (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs stan::is_std_vector (TemplateType T3__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T3__)))))) true)) (inline false) (return_type @@ -1743,14 +2307,14 @@ (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType T2__))))) + (TemplateType stan::base_type_t))))) -1 1 AoS)) (name algebra_system) (args (((Const (Ref (TemplateType T0__))) x_arg__) ((Const (Ref (TemplateType T1__))) y_arg__) - ((Const (Ref (StdVector (TemplateType T2__)))) dat) - ((Const (Ref (StdVector (TemplateType T3__)))) dat_int) + ((Const (Ref (TemplateType T2__))) dat) + ((Const (Ref (TemplateType T3__))) dat_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef @@ -1771,9 +2335,8 @@ (name binomialf) (args (((Const (Ref (TemplateType T0__))) phi_arg__) - ((Const (Ref (TemplateType T1__))) theta_arg__) - ((Const (Ref (StdVector Double))) x_r) ((Const (Ref (StdVector Int))) x_i) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) theta_arg__) ((Const (Ref Double)) x_r) + ((Const (Ref Int)) x_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (Struct ((param ()) (struct_name algebra_system_functor__) @@ -1785,8 +2348,14 @@ (RequireIs stan::is_vt_not_complex (TemplateType T0__)) (RequireIs stan::is_col_vector (TemplateType T1__)) (RequireIs stan::is_vt_not_complex (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs stan::is_std_vector (TemplateType T3__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T3__)))))) true)) (inline false) (return_type @@ -1794,13 +2363,14 @@ (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType T2__))))) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))) -1 1 AoS)) (name "operator()") (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) - ((Const (Ref (StdVector (TemplateType T2__)))) dat) - ((Const (Ref (StdVector (TemplateType T3__)))) dat_int) + ((Const (Ref (TemplateType T2__))) dat) + ((Const (Ref (TemplateType T3__))) dat_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers (Const)) (body @@ -1829,9 +2399,8 @@ (name "operator()") (args (((Const (Ref (TemplateType T0__))) phi) - ((Const (Ref (TemplateType T1__))) theta) - ((Const (Ref (StdVector Double))) x_r) ((Const (Ref (StdVector Int))) x_i) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) theta) ((Const (Ref Double)) x_r) + ((Const (Ref Int)) x_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers (Const)) (body (((Return @@ -1839,9 +2408,7 @@ ((Var phi) (Var theta) (Var x_r) (Var x_i) (Var pstream__)))))))))))))) (FunDef ((templates_init - ((((Typename T0__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) - false)) + ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) false)) (inline false) (return_type Int) (name foo) (args (((Const (Ref (TemplateType T0__))) n) @@ -1884,29 +2451,38 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T2__)))))) false)) (inline false) (return_type (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))))) + ((TemplateType T0__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))) (name sho) (args - (((Const (Ref (TemplateType T0__))) t) - ((Const (Ref (StdVector (TemplateType T1__)))) y) - ((Const (Ref (StdVector (TemplateType T2__)))) theta) - ((Const (Ref (StdVector Double))) x) ((Const (Ref (StdVector Int))) x_int) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) + ((Const (Ref (TemplateType T2__))) theta) ((Const (Ref Double)) x) + ((Const (Ref Int)) x_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))))) + ((TemplateType T0__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -1997,7 +2573,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) + ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) + false)) (inline false) (return_type (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) @@ -2035,8 +2613,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) false)) (inline false) (return_type @@ -2076,8 +2656,9 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) false)) (inline false) (return_type @@ -2111,9 +2692,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) false)) (inline false) (return_type @@ -2151,9 +2732,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) false)) (inline false) (return_type @@ -2192,8 +2773,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)))) false)) (inline false) (return_type @@ -2235,7 +2818,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) false)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -2275,9 +2859,7 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) - false)) + ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) false)) (inline false) (return_type Int) (name foo_1) (args (((Const (Ref (TemplateType T0__))) a) @@ -2619,9 +3201,7 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))))) - false)) + ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) false)) (inline false) (return_type Int) (name foo_2) (args (((Const (Ref (TemplateType T0__))) a) @@ -2680,8 +3260,9 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs std::is_integral (TemplateType T1__)))) false)) (inline false) (return_type @@ -2721,7 +3302,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) false)) (inline false) (return_type @@ -2759,16 +3341,21 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) + ((((Typename T0__) (RequireIs stan::is_std_vector (TemplateType T0__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T0__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T0__)))))) + false)) (inline false) (return_type Void) (name foo_4) (args - (((Const (Ref (StdVector (TemplateType T0__)))) x) + (((Const (Ref (TemplateType T0__))) x) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2812,10 +3399,14 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)))) + (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)) + (RequireIs stan::is_autodiff (TemplateType T2__)) + (RequireIs std::is_floating_point (TemplateType T2__)) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)))) false)) (inline false) (return_type @@ -2952,9 +3543,8 @@ (name foo_5) (args (((Const (Ref (TemplateType T0__))) shared_params_arg__) - ((Const (Ref (TemplateType T1__))) job_params_arg__) - ((Const (Ref (StdVector Double))) data_r) ((Const (Ref (StdVector Int))) data_i) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) job_params_arg__) ((Const (Ref Double)) data_r) + ((Const (Ref Int)) data_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ @@ -3001,11 +3591,16 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (Typename T4__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)))) + (Typename T4__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)) + (RequireIs stan::is_autodiff (TemplateType T2__)) + (RequireIs std::is_floating_point (TemplateType T2__)) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_autodiff (TemplateType T4__)) + (RequireIs std::is_floating_point (TemplateType T4__)))) false)) (inline false) (return_type @@ -3052,12 +3647,18 @@ ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T_lp__) - (Typename T_lp_accum__) (RequireIs stan::is_stan_scalar (TemplateType T0__)) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)))) + (Typename T_lp_accum__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)) + (RequireIs stan::is_autodiff (TemplateType T1__)) + (RequireIs std::is_floating_point (TemplateType T1__)) + (RequireIs stan::is_autodiff (TemplateType T2__)) + (RequireIs std::is_floating_point (TemplateType T2__)) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_autodiff (TemplateType T4__)) + (RequireIs std::is_floating_point (TemplateType T4__)) + (RequireIs stan::is_autodiff (TemplateType T5__)) + (RequireIs std::is_floating_point (TemplateType T5__)))) false)) (inline false) (return_type @@ -3106,7 +3707,7 @@ ((((Typename T0__) (Typename T1__) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__)) (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T1__)))))) + (RequireIs std::is_integral (TemplateType T1__)))) false)) (inline false) (return_type @@ -3199,48 +3800,90 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type Void) (name f0) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3280,48 +3923,90 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type Int) (name f1) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3356,48 +4041,90 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type (StdVector Int)) (name f2) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3432,48 +4159,90 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type (StdVector (StdVector Int))) (name f3) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3508,58 +4277,103 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t)))))))))) (name f4) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3594,59 +4408,104 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (name f5) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3681,20 +4540,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -3702,39 +4605,40 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t)))))))))))) (name f6) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3769,60 +4673,105 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 1 AoS)) (name f7) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3857,20 +4806,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -3878,40 +4871,41 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 1 AoS))) (name f8) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3946,20 +4940,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -3968,40 +5006,42 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 1 AoS)))) (name f9) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4036,60 +5076,105 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 -1 AoS)) (name f10) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4124,20 +5209,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -4145,40 +5274,41 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 -1 AoS))) (name f11) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4213,20 +5343,64 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TypeTrait std::decay_t ((TemplateType T0__)))) - (RequireIs stan::is_stan_scalar (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)) - (RequireIs stan::is_stan_scalar (TemplateType T4__)) - (RequireIs stan::is_stan_scalar (TemplateType T5__)) + (RequireIs std::is_integral (TemplateType T0__)) + (RequireIs stan::is_std_vector (TemplateType T1__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T1__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (RequireIs stan::is_autodiff (TemplateType T3__)) + (RequireIs std::is_floating_point (TemplateType T3__)) + (RequireIs stan::is_std_vector (TemplateType T4__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T4__)))) + (RequireIs stan::is_std_vector (TemplateType T5__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) (RequireIs stan::is_col_vector (TemplateType T6__)) (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_stan_scalar (TemplateType T7__)) - (RequireIs stan::is_stan_scalar (TemplateType T8__)) + (RequireIs stan::is_std_vector (TemplateType T7__)) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireIs stan::is_std_vector (TemplateType T8__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireIs stan::is_col_vector + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_stan_scalar (TemplateType T10__)) - (RequireIs stan::is_stan_scalar (TemplateType T11__)))) + (RequireIs stan::is_std_vector (TemplateType T10__)) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireIs stan::is_std_vector (TemplateType T11__)) + (RequireIs stan::is_std_vector + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireIs stan::is_eigen_matrix_dynamic + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireIs stan::is_vt_not_complex + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -4235,40 +5409,42 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))) -1 -1 AoS)))) (name f12) (args - (((Const (Ref (TemplateType T0__))) a1) - ((Const (Ref (StdVector (TemplateType T1__)))) a2) - ((Const (Ref (StdVector (StdVector (TemplateType T2__))))) a3) - ((Const (Ref (TemplateType T3__))) a4) - ((Const (Ref (StdVector (TemplateType T4__)))) a5) - ((Const (Ref (StdVector (StdVector (TemplateType T5__))))) a6) + (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) + ((Const (Ref (TemplateType T2__))) a3) ((Const (Ref (TemplateType T3__))) a4) + ((Const (Ref (TemplateType T4__))) a5) ((Const (Ref (TemplateType T5__))) a6) ((Const (Ref (TemplateType T6__))) a7_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T7__) -1 1 AoS)))) a8) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T8__) -1 1 AoS))))) a9) + ((Const (Ref (TemplateType T7__))) a8) ((Const (Ref (TemplateType T8__))) a9) ((Const (Ref (TemplateType T9__))) a10_arg__) - ((Const (Ref (StdVector (Matrix (TemplateType T10__) -1 -1 AoS)))) a11) - ((Const (Ref (StdVector (StdVector (Matrix (TemplateType T11__) -1 -1 AoS))))) - a12) + ((Const (Ref (TemplateType T10__))) a11) ((Const (Ref (TemplateType T11__))) a12) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((TemplateType T3__) (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))))))) + ((TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4455,7 +5631,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) + ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) + false)) (inline false) (return_type (Matrix @@ -4509,7 +5687,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_stan_scalar (TemplateType T0__)))) false)) + ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) + (RequireIs std::is_floating_point (TemplateType T0__)))) + false)) (inline false) (return_type (Matrix @@ -4579,8 +5759,14 @@ (RequireIs stan::is_vt_not_complex (TemplateType T0__)) (RequireIs stan::is_col_vector (TemplateType T1__)) (RequireIs stan::is_vt_not_complex (TemplateType T1__)) - (RequireIs stan::is_stan_scalar (TemplateType T2__)) - (RequireIs stan::is_stan_scalar (TemplateType T3__)))) + (RequireIs stan::is_std_vector (TemplateType T2__)) + (RequireIs stan::is_autodiff + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs std::is_floating_point + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireIs stan::is_std_vector (TemplateType T3__)) + (RequireIs std::is_integral + (TypeTrait stan::value_type_t ((TemplateType T3__)))))) false)) (inline false) (return_type @@ -4588,14 +5774,14 @@ (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType T2__))))) + (TemplateType stan::base_type_t))))) -1 1 AoS)) (name algebra_system) (args (((Const (Ref (TemplateType T0__))) x_arg__) ((Const (Ref (TemplateType T1__))) y_arg__) - ((Const (Ref (StdVector (TemplateType T2__)))) dat) - ((Const (Ref (StdVector (TemplateType T3__)))) dat_int) + ((Const (Ref (TemplateType T2__))) dat) + ((Const (Ref (TemplateType T3__))) dat_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body @@ -4603,7 +5789,8 @@ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType T2__))))))) + (TemplateType stan::base_type_t) + (TemplateType stan::base_type_t))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4688,9 +5875,8 @@ (name binomialf) (args (((Const (Ref (TemplateType T0__))) phi_arg__) - ((Const (Ref (TemplateType T1__))) theta_arg__) - ((Const (Ref (StdVector Double))) x_r) ((Const (Ref (StdVector Int))) x_i) - ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) theta_arg__) ((Const (Ref Double)) x_r) + ((Const (Ref Int)) x_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index 91a7b234c..4bb44c07d 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -43,37 +43,44 @@ static constexpr std::array locations_array__ = " (in 'ode_adjoint_test_model.stan', line 9, column 4 to column 13)", " (in 'ode_adjoint_test_model.stan', line 8, column 50 to line 10, column 3)"}; template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix>>,-1,1> f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T2__>>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> + std::is_integral, + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T3__>>,-1,1> f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, std::ostream* pstream__); struct f_1_arg_variadic2_functor__ { template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T2__>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, @@ -83,11 +90,13 @@ struct f_1_arg_variadic2_functor__ { }; struct f_2_arg_variadic2_functor__ { template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> + std::is_integral, + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T3__>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, @@ -97,7 +106,8 @@ struct f_2_arg_variadic2_functor__ { }; struct f_0_arg_variadic2_functor__ { template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex>*> Eigen::Matrix, + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> + stan::is_autodiff, + std::is_floating_point>*> Eigen::Matrix, T2__>>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* @@ -161,11 +174,13 @@ f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* } } template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - std::is_integral>, - stan::is_stan_scalar>*> + std::is_integral, + stan::is_autodiff, + std::is_floating_point>*> Eigen::Matrix, T3__>>,-1,1> f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, @@ -886,14 +901,20 @@ static constexpr std::array locations_array__ = " (in 'overloaded-ode.stan', line 29, column 22 to line 39, column 3)"}; template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -902,15 +923,21 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - std::is_integral>>* = nullptr> + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + std::is_integral>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -920,14 +947,20 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& struct simple_SIR_variadic2_functor__ { template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -938,15 +971,21 @@ struct simple_SIR_variadic2_functor__ { } template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - std::is_integral>>* = nullptr> + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + std::is_integral>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -958,14 +997,20 @@ struct simple_SIR_variadic2_functor__ { }; template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -1020,15 +1065,21 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& } template , + stan::require_all_t, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - std::is_integral>>*> + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + std::is_integral>*> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index 1120a67ac..e5e3371f7 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -32,43 +32,51 @@ static constexpr std::array locations_array__ = " (in 'basic.stan', line 46, column 4 to column 13)", " (in 'basic.stan', line 45, column 51 to line 47, column 3)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -array_fun(const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t>> +array_fun(const T0__& a, std::ostream* pstream__); template >* = nullptr> -double int_array_fun(const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +double int_array_fun(const T0__& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> Eigen::Matrix>>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__); template >, - std::is_integral>>* = nullptr> + stan::require_all_t, std::is_integral>* = nullptr> int int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); template >>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_complex>>>, + stan::is_autodiff>>>>, + std::is_floating_point>>>>>* = nullptr> std::vector< std::vector< - std::vector>>>>> -array_fun(const std::vector>>>& a, - std::ostream* pstream__); -template >*> + std::vector< + std::complex>>>>>> +array_fun(const T0__& a, std::ostream* pstream__); +template , + std::is_floating_point>*> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -103,10 +125,13 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -array_fun(const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t>> +array_fun(const T0__& a, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -123,8 +148,10 @@ array_fun(const std::vector& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -double int_array_fun(const std::vector& a, std::ostream* pstream__) { +template , + std::is_integral>>*> +double int_array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -175,8 +202,7 @@ my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { } } template >, - std::is_integral>>*> + stan::require_all_t, std::is_integral>*> int int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -196,7 +222,9 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -218,7 +246,8 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { } template >*> + stan::require_all_t, + std::is_floating_point>*> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -237,7 +266,8 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -258,8 +288,10 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { } } template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -299,13 +331,26 @@ test_complex(const T0__& a_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_complex>>>, + stan::is_autodiff>>>>, + std::is_floating_point>>>>>*> std::vector< std::vector< - std::vector>>>>> -array_fun(const std::vector>>>& a, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + std::vector< + std::complex>>>>>> +array_fun(const T0__& a, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -412,46 +457,56 @@ static constexpr std::array locations_array__ = " (in 'basic.stanfunctions', line 36, column 2 to column 31)", " (in 'basic.stanfunctions', line 35, column 31 to line 37, column 1)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__); template >* = nullptr> -std::decay_t> -array_fun(const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t>> +array_fun(const T0__& a, std::ostream* pstream__); template >* = nullptr> -double int_array_fun(const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +double int_array_fun(const T0__& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> Eigen::Matrix>>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__); template >, - std::is_integral>>* = nullptr> + stan::require_all_t, std::is_integral>* = nullptr> int int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -471,10 +526,13 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::decay_t> -array_fun(const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +template , + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t>> +array_fun(const T0__& a, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -491,8 +549,10 @@ array_fun(const std::vector& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -double int_array_fun(const std::vector& a, std::ostream* pstream__) { +template , + std::is_integral>>*> +double int_array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -543,8 +603,7 @@ my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { } } template >, - std::is_integral>>*> + stan::require_all_t, std::is_integral>*> int int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -564,7 +623,9 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +template , + std::is_floating_point>*> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -586,7 +647,8 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { } template >*> + stan::require_all_t, + std::is_floating_point>*> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -605,7 +667,8 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -626,8 +689,10 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { } } template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -718,28 +783,46 @@ Eigen::Matrix>>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -integrand_ode(const T0__& r, const std::vector& f, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__); double ode_integrate(std::ostream* pstream__); struct integrand_ode_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector>> - operator()(const T0__& r, const std::vector& f, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> + operator()(const T0__& r, const T1__& f, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) const { return integrand_ode(r, f, theta, x_r, x_i, pstream__); } }; @@ -768,17 +851,28 @@ integrand(const T0__& x_arg__, std::ostream* pstream__) { } template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -integrand_ode(const T0__& r, const std::vector& f, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 37612b8f5..62bb76f95 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1912,43 +1912,72 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -simple_SIR(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector>> - operator()(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> + operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -simple_SIR(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -5008,14 +5037,15 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 12, column 36 to line 22, column 3)", " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -5024,8 +5054,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -5064,8 +5096,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -5111,8 +5145,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -12683,14 +12716,15 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 12, column 36 to line 22, column 3)", " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -12699,8 +12733,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12739,8 +12775,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12786,8 +12824,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -14808,11 +14845,13 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 48, column 47 to line 65, column 3)", " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -14825,26 +14864,32 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, - const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, - const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& + p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& + nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__); +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -14883,8 +14928,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -15076,24 +15123,28 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, - const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, - const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { +js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& + p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& + nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T5__, stan::base_type_t, @@ -20878,14 +20929,15 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 12, column 36 to line 22, column 3)", " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -20894,8 +20946,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -20934,8 +20988,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -20981,8 +21037,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -23365,7 +23420,8 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 13, column 8 to column 43)", " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template >* = nullptr> std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -25631,13 +25689,11 @@ static constexpr std::array locations_array__ = " (in 'inline-tdata.stan', line 3, column 4 to column 31)", " (in 'inline-tdata.stan', line 2, column 26 to line 4, column 3)"}; template >, - std::is_integral>>* = nullptr> + stan::require_all_t, std::is_integral>* = nullptr> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__); template >, - std::is_integral>>*> + stan::require_all_t, std::is_integral>*> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -26653,11 +26709,13 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 79, column 70 to line 137, column 3)", " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -26670,9 +26728,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -26682,8 +26744,7 @@ template , stan::is_vt_not_complex>* = nullptr> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -26692,8 +26753,10 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26732,8 +26795,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26925,9 +26990,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -26937,8 +27006,7 @@ template , stan::is_vt_not_complex>*> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -31838,14 +31906,15 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 12, column 36 to line 22, column 3)", " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -31854,8 +31923,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -31894,8 +31965,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -31941,8 +32014,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -33681,22 +33753,28 @@ static constexpr std::array locations_array__ = " (in 'lupdf-inlining.stan', line 9, column 8 to column 32)", " (in 'lupdf-inlining.stan', line 8, column 26 to line 10, column 5)"}; template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template >, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -33717,8 +33795,9 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { } } template >, - stan::is_stan_scalar>*> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -33739,7 +33818,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -36318,20 +36398,22 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; template , - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_floating_point, + std::is_integral>* = nullptr> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> int rfun(const T0__& y, std::ostream* pstream__); template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_integral>>*> + stan::require_all_t, + std::is_floating_point, + std::is_integral>*> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -36357,9 +36439,8 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -int rfun(const T0__& y, std::ostream* pstream__) { +template >*> int +rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -37966,13 +38047,16 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 7, column 5 to column 20)", " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> dumb(const T0__& x, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -37995,9 +38079,8 @@ dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -double dumb(const T0__& x, std::ostream* pstream__) { +template >*> double +dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -38354,7 +38437,8 @@ foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template >*> +template , + std::is_floating_point>*> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 06febf8dc..51148a079 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -696,43 +696,72 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -simple_SIR(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector>> - operator()(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> + operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -simple_SIR(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -2484,14 +2513,15 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 45, column 4 to column 15)", " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -2500,8 +2530,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2527,8 +2559,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2558,8 +2592,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -8476,14 +8509,15 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 47, column 4 to column 15)", " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -8492,8 +8526,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8519,8 +8555,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8550,8 +8588,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -9658,11 +9695,13 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 86, column 4 to line 142, column 5)", " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -9675,26 +9714,32 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, - const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, - const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& + p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& + nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__); +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9720,8 +9765,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9821,24 +9868,28 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, - const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, - const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { +js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& + p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& + nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T5__, stan::base_type_t, @@ -12787,14 +12838,15 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 45, column 4 to column 15)", " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -12803,8 +12855,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12830,8 +12884,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -12861,8 +12917,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -14183,7 +14238,8 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 15, column 4 to column 23)", " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template >* = nullptr> std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -16047,13 +16105,11 @@ static constexpr std::array locations_array__ = " (in 'inline-tdata.stan', line 3, column 4 to column 31)", " (in 'inline-tdata.stan', line 2, column 26 to line 4, column 3)"}; template >, - std::is_integral>>* = nullptr> + stan::require_all_t, std::is_integral>* = nullptr> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__); template >, - std::is_integral>>*> + stan::require_all_t, std::is_integral>*> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -17033,11 +17089,13 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 157, column 4 to column 26)", " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -17050,9 +17108,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -17062,8 +17124,7 @@ template , stan::is_vt_not_complex>* = nullptr> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -17072,8 +17133,10 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -17099,8 +17162,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -17200,9 +17265,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -17212,8 +17281,7 @@ template , stan::is_vt_not_complex>*> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -19701,14 +19769,15 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 45, column 4 to column 15)", " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -19717,8 +19786,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -19744,8 +19815,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -19775,8 +19848,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -20610,22 +20682,28 @@ static constexpr std::array locations_array__ = " (in 'lupdf-inlining.stan', line 9, column 8 to column 32)", " (in 'lupdf-inlining.stan', line 8, column 26 to line 10, column 5)"}; template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template >, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -20643,8 +20721,9 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { } } template >, - stan::is_stan_scalar>*> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -20662,7 +20741,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -22924,20 +23004,22 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; template , - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_floating_point, + std::is_integral>* = nullptr> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> int rfun(const T0__& y, std::ostream* pstream__); template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_integral>>*> + stan::require_all_t, + std::is_floating_point, + std::is_integral>*> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -22960,9 +23042,8 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -int rfun(const T0__& y, std::ostream* pstream__) { +template >*> int +rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -24030,13 +24111,16 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 7, column 5 to column 20)", " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> dumb(const T0__& x, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -24056,9 +24140,8 @@ dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -double dumb(const T0__& x, std::ostream* pstream__) { +template >*> double +dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -24404,7 +24487,8 @@ foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template >*> +template , + std::is_floating_point>*> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index bdea8062c..54d053828 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -678,43 +678,72 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::vector>> -simple_SIR(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__); + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::vector>> - operator()(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) const { + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> + operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& + x_r, const T4__& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::vector>> -simple_SIR(const T0__& t, const std::vector& y, - const std::vector& theta, const std::vector& x_r, - const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_floating_point, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + std::decay_t, + stan::base_type_t, stan::base_type_t>>> +simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, + const T4__& x_i, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -2444,14 +2473,15 @@ static constexpr std::array locations_array__ = " (in 'copy_fail.stan', line 12, column 36 to line 22, column 3)", " (in 'copy_fail.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -2460,8 +2490,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2487,8 +2519,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -2518,8 +2552,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -8565,14 +8598,15 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail5.stan', line 12, column 36 to line 22, column 3)", " (in 'expr-prop-fail5.stan', line 24, column 74 to line 48, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -8581,8 +8615,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8608,8 +8644,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -8639,8 +8677,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -9919,11 +9956,13 @@ static constexpr std::array locations_array__ = " (in 'expr-prop-fail6.stan', line 48, column 47 to line 65, column 3)", " (in 'expr-prop-fail6.stan', line 81, column 74 to line 143, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -9936,26 +9975,32 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, - const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, - const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& + p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& + nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__); +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9981,8 +10026,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -10083,24 +10130,28 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::is_autodiff, + std::is_floating_point, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> void -js_super_lp(const std::vector>& y, const std::vector& - first, const std::vector& last, const T3__& p_arg__, - const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, - const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { +js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& + p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& + nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t, T5__, stan::base_type_t, @@ -13712,14 +13763,15 @@ static constexpr std::array locations_array__ = " (in 'fails-test.stan', line 12, column 36 to line 22, column 3)", " (in 'fails-test.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -13728,8 +13780,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -13755,8 +13809,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -13786,8 +13842,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -15296,7 +15351,8 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 13, column 8 to column 43)", " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template >* = nullptr> std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -17253,13 +17311,11 @@ static constexpr std::array locations_array__ = " (in 'inline-tdata.stan', line 3, column 4 to column 31)", " (in 'inline-tdata.stan', line 2, column 26 to line 4, column 3)"}; template >, - std::is_integral>>* = nullptr> + stan::require_all_t, std::is_integral>* = nullptr> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__); template >, - std::is_integral>>*> + stan::require_all_t, std::is_integral>*> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -18277,11 +18333,13 @@ static constexpr std::array locations_array__ = " (in 'inlining-fail2.stan', line 79, column 70 to line 137, column 3)", " (in 'inlining-fail2.stan', line 148, column 33 to line 158, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -18294,9 +18352,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -18306,8 +18368,7 @@ template , stan::is_vt_not_complex>* = nullptr> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -18316,8 +18377,10 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -18343,8 +18406,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -18445,9 +18510,13 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* template , - stan::is_stan_scalar, - stan::is_stan_scalar, + stan::require_all_t, + stan::is_std_vector>, + std::is_integral>>, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + std::is_integral>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -18457,8 +18526,7 @@ template , stan::is_vt_not_complex>*> void -jolly_seber_lp(const std::vector>& y, - const std::vector& first, const std::vector& last, +jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -21665,14 +21733,15 @@ static constexpr std::array locations_array__ = " (in 'lcm-fails2.stan', line 12, column 36 to line 22, column 3)", " (in 'lcm-fails2.stan', line 24, column 74 to line 46, column 3)"}; template >* = nullptr> -int first_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); template >* = nullptr> -int last_capture(const std::vector& y_i, std::ostream* pstream__); + stan::require_all_t, + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -21681,8 +21750,10 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); -template >*> -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int first_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -21708,8 +21779,10 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +template , + std::is_integral>>*> +int last_capture(const T0__& y_i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -21739,8 +21812,7 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { } } template >, - std::is_integral>, + stan::require_all_t, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -22749,22 +22821,28 @@ static constexpr std::array locations_array__ = " (in 'lupdf-inlining.stan', line 9, column 8 to column 32)", " (in 'lupdf-inlining.stan', line 8, column 26 to line 10, column 5)"}; template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template >, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -22782,8 +22860,9 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { } } template >, - stan::is_stan_scalar>*> + stan::require_all_t, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -22801,7 +22880,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { } } template >*> + stan::require_all_t, + std::is_floating_point>*> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -25068,20 +25148,22 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; template , - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_floating_point, + std::is_integral>* = nullptr> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> int rfun(const T0__& y, std::ostream* pstream__); template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_integral>>*> + stan::require_all_t, + std::is_floating_point, + std::is_integral>*> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -25104,9 +25186,8 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -int rfun(const T0__& y, std::ostream* pstream__) { +template >*> int +rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26236,13 +26317,16 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 7, column 5 to column 20)", " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> std::decay_t> dumb(const T0__& x, std::ostream* pstream__); template >>* = nullptr> + stan::require_all_t>* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); -template >*> +template , + std::is_floating_point>*> std::decay_t> dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -26262,9 +26346,8 @@ dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >>*> -double dumb(const T0__& x, std::ostream* pstream__) { +template >*> double +dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -26610,7 +26693,8 @@ foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template >*> +template , + std::is_floating_point>*> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index 26e1db157..8fe3deb53 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -4334,16 +4334,15 @@ static constexpr std::array locations_array__ = " (in 'indexing.stan', line 6, column 4 to column 13)", " (in 'indexing.stan', line 5, column 27 to line 7, column 3)"}; template >>* = nullptr> + stan::require_all_t>* = nullptr> int mask_fun(const T0__& i, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> Eigen::Matrix>>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__); -template >>*> -int mask_fun(const T0__& i, std::ostream* pstream__) { +template >*> int +mask_fun(const T0__& i, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -7334,7 +7333,8 @@ template >>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, + stan::require_all_t, + std::is_floating_point, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> Eigen::Matrix>>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, + stan::require_all_t, + std::is_floating_point, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> Eigen::Matrix, Eigen::Matrix>(arr_tuple_dot_1_temp__, + std::tuple&, + const Eigen::Matrix&>(arr_tuple_dot_1_temp__, arr_tuple_dot_2_temp__, arr_tuple_dot_3_temp__), "assigning variable arr_tuple", stan::model::index_uni(sym1__)); } @@ -236,7 +237,7 @@ class arrays_tuples_nested_model final : public model_base_crtp(tuple_arr_tuple), - std::tuple>(tuple_arr_tuple_dot_3_dot_1_temp__, + std::tuple&>(tuple_arr_tuple_dot_3_dot_1_temp__, tuple_arr_tuple_dot_3_dot_2_temp__), "assigning variable tuple_arr_tuple.3", stan::model::index_uni(sym1__)); @@ -453,7 +454,7 @@ class arrays_tuples_nested_model final : public model_base_crtp>(arr_tuple_arr_tuple_dot_2_dot_1_temp__, + std::tuple&>(arr_tuple_arr_tuple_dot_2_dot_1_temp__, arr_tuple_arr_tuple_dot_2_dot_2_temp__), "assigning variable arr_tuple_arr_tuple_dot_2_temp__", stan::model::index_uni(sym2__)); @@ -624,8 +625,8 @@ class arrays_tuples_nested_model final : public model_base_crtp, - Eigen::Matrix>(very_deep_dot_2_dot_2_dot_1_temp__, + std::tuple&, + const Eigen::Matrix&>(very_deep_dot_2_dot_2_dot_1_temp__, very_deep_dot_2_dot_2_dot_2_temp__), "assigning variable very_deep_dot_2_dot_2_temp__", stan::model::index_uni(sym3__)); @@ -2009,8 +2010,8 @@ class arrays_tuples_nested_model final : public model_base_crtp, std::vector, - Eigen::Matrix>(arr_tuple_p_dot_1_temp__, + std::tuple&, + const std::vector&, const Eigen::Matrix&>(arr_tuple_p_dot_1_temp__, arr_tuple_p_dot_2_temp__, arr_tuple_p_dot_3_temp__), "assigning variable arr_tuple_p", stan::model::index_uni(sym1__)); } @@ -2064,7 +2065,7 @@ class arrays_tuples_nested_model final : public model_base_crtp(tuple_arr_tuple_p), - std::tuple>(tuple_arr_tuple_p_dot_3_dot_1_temp__, + std::tuple&>(tuple_arr_tuple_p_dot_3_dot_1_temp__, tuple_arr_tuple_p_dot_3_dot_2_temp__), "assigning variable tuple_arr_tuple_p.3", stan::model::index_uni(sym1__)); @@ -2298,7 +2299,7 @@ class arrays_tuples_nested_model final : public model_base_crtp>(arr_tuple_arr_tuple_p_dot_2_dot_1_temp__, + std::tuple&>(arr_tuple_arr_tuple_p_dot_2_dot_1_temp__, arr_tuple_arr_tuple_p_dot_2_dot_2_temp__), "assigning variable arr_tuple_arr_tuple_p_dot_2_temp__", stan::model::index_uni(sym2__)); @@ -2470,8 +2471,8 @@ class arrays_tuples_nested_model final : public model_base_crtp, - Eigen::Matrix>(very_deep_p_dot_2_dot_2_dot_1_temp__, + std::tuple&, + const Eigen::Matrix&>(very_deep_p_dot_2_dot_2_dot_1_temp__, very_deep_p_dot_2_dot_2_dot_2_temp__), "assigning variable very_deep_p_dot_2_dot_2_temp__", stan::model::index_uni(sym3__)); @@ -3654,8 +3655,9 @@ class simple2_model final : public model_base_crtp { std::numeric_limits::min()}; current_statement__ = 1; stan::model::assign(x, - std::tuple, int>(std::vector{1.01, 3.14}, - 2), "assigning variable x"); + std::tuple&, int>(std::vector{1.01, + 3.14}, 2), + "assigning variable x"); current_statement__ = 2; if (pstream__) { stan::math::stan_print(pstream__, @@ -3983,19 +3985,19 @@ class simple3_model final : public model_base_crtp { std::numeric_limits::min()}; current_statement__ = 1; stan::model::assign(x, - std::tuple>, int>(std::vector< - std::vector< - double>>{ - std::vector< - double>{1.01, - 3.14}, - std::vector< - double>{1.01, - 3.14}, - std::vector< - double>{1.01, - 3.14}}, 2), - "assigning variable x"); + std::tuple>&, int>(std::vector< + std::vector< + double>>{ + std::vector< + double>{1.01, + 3.14}, + std::vector< + double>{1.01, + 3.14}, + std::vector< + double>{1.01, + 3.14}}, + 2), "assigning variable x"); current_statement__ = 2; if (pstream__) { stan::math::stan_print(pstream__, @@ -4419,7 +4421,7 @@ class tuple_constraints_data_model final : public model_base_crtp>(z_dot_1_temp__, + std::tuple&>(z_dot_1_temp__, z_dot_2_temp__), "assigning variable z", stan::model::index_uni(sym2__), stan::model::index_uni(sym1__)); } @@ -5442,7 +5444,7 @@ class tuple_constraints_params_model final : public model_base_crtp>(ps2_dot_1_temp__, + std::tuple&>(ps2_dot_1_temp__, ps2_dot_2_temp__), "assigning variable ps2", stan::model::index_uni(sym2__), stan::model::index_uni(sym1__)); } @@ -5590,8 +5592,8 @@ class tuple_constraints_params_model final : public model_base_crtp, - Eigen::Matrix>(complicated_dot_2_dot_1_temp__, + std::tuple&, + const Eigen::Matrix&>(complicated_dot_2_dot_1_temp__, complicated_dot_2_dot_2_temp__, complicated_dot_2_dot_3_temp__), "assigning variable complicated_dot_2_temp__", @@ -6221,11 +6223,9 @@ static constexpr std::array locations_array__ = " (in 'tuple-dataonly2.stan', line 3, column 4 to column 18)", " (in 'tuple-dataonly2.stan', line 2, column 53 to line 4, column 3)"}; double -tuple_tester(const std::tuple, int>& x, std::ostream* - pstream__); +tuple_tester(const std::tuple& x, std::ostream* pstream__); double -tuple_tester(const std::tuple, int>& x, std::ostream* - pstream__) { +tuple_tester(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -6304,8 +6304,8 @@ class tuple_dataonly2_model final : public model_base_crtp, int>(std::vector{1.0}, 2), - pstream__)); + std::tuple&, int>(std::vector{1.0}, + 2), pstream__)); *(pstream__) << std::endl; } } catch (const std::exception& e) { @@ -6342,8 +6342,8 @@ class tuple_dataonly2_model final : public model_base_crtp, int>(std::vector{1.0}, 2), - pstream__)); + std::tuple&, int>(std::vector{1.0}, + 2), pstream__)); *(pstream__) << std::endl; } } catch (const std::exception& e) { @@ -9492,19 +9492,27 @@ static constexpr std::array locations_array__ = " (in 'tuple-promotion.stan', line 3, column 4 to column 37)", " (in 'tuple-promotion.stan', line 2, column 53 to line 4, column 3)"}; template , - stan::is_stan_scalar>* = nullptr> -std::decay_t> -dummy(const std::tuple, std::vector>& test, - std::ostream* pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t, + stan::base_type_t>> +dummy(const std::tuple& test, std::ostream* pstream__); template , - stan::is_stan_scalar>*> -std::decay_t> -dummy(const std::tuple, std::vector>& test, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t, + stan::base_type_t>> +dummy(const std::tuple& test, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9616,9 +9624,9 @@ class tuple_promotion_model final : public model_base_crtp::quiet_NaN())}; current_statement__ = 15; stan::model::assign(basic, - std::tuple, std::complex>(std::vector< - double>{1, 2}, - stan::math::to_complex(3, 0)), "assigning variable basic"); + std::tuple&, const std::complex&>( + std::vector{1, 2}, stan::math::to_complex(3, 0)), + "assigning variable basic"); current_statement__ = 16; CV = std::tuple,-1,1>, double>{ Eigen::Matrix,-1,1>::Constant(3, @@ -9627,7 +9635,7 @@ class tuple_promotion_model final : public model_base_crtp::quiet_NaN()}; current_statement__ = 16; stan::model::assign(CV, - std::tuple,-1,1>, double>( + std::tuple,-1,1>&, double>( stan::math::promote_scalar>(V), 2), "assigning variable CV"); current_statement__ = 17; @@ -9637,7 +9645,7 @@ class tuple_promotion_model final : public model_base_crtp::min()}; current_statement__ = 17; stan::model::assign(V2, - std::tuple, int>(V, 2), + std::tuple&, int>(V, 2), "assigning variable V2"); current_statement__ = 18; stan::model::assign(CV, @@ -10538,46 +10546,51 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex, - std::is_integral>>* = nullptr> + std::is_integral>* = nullptr> void foo(const std::tuple& test, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> -std::decay_t> -tsum(const std::tuple, std::vector>& s, - std::ostream* pstream__); + stan::require_all_t, + std::is_integral>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +std::decay_t>> +tsum(const std::tuple& s, std::ostream* pstream__); template , stan::is_vt_not_complex, - std::is_integral>>* = nullptr> + std::is_integral>* = nullptr> void foo2(const std::vector>& test, std::ostream* pstream__); template , + stan::require_all_t, + std::is_floating_point, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> void foo3(const std::tuple& test, std::ostream* pstream__); template , - std::is_integral>, + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - std::is_integral>, + stan::is_autodiff, + std::is_floating_point, + std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> void -overly_complicated(const std::tuple< - std::vector>, +overly_complicated(const std::tuple, T0__2__>& t1, const std::vector>& t2, std::ostream* pstream__); template , stan::is_vt_not_complex, - std::is_integral>>*> + std::is_integral>*> void foo(const std::tuple& test, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; @@ -10600,12 +10613,14 @@ void foo(const std::tuple& test, std::ostream* pstream__) { } } template , - stan::is_stan_scalar>*> -std::decay_t> -tsum(const std::tuple, std::vector>& s, - std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + std::is_integral>, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +std::decay_t>> +tsum(const std::tuple& s, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10625,7 +10640,7 @@ tsum(const std::tuple, std::vector>& s, template , stan::is_vt_not_complex, - std::is_integral>>*> + std::is_integral>*> void foo2(const std::vector>& test, std::ostream* pstream__) { @@ -10652,7 +10667,8 @@ foo2(const std::vector>& test, std::ostream* } } template , + stan::require_all_t, + std::is_floating_point, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> void foo3(const std::tuple& test, std::ostream* pstream__) { @@ -10679,21 +10695,23 @@ void foo3(const std::tuple& test, std::ostream* pstream__) { } template , - std::is_integral>, + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_stan_scalar, - std::is_integral>, + stan::is_autodiff, + std::is_floating_point, + std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> void -overly_complicated(const std::tuple< - std::vector>, +overly_complicated(const std::tuple, T0__2__>& t1, const std::vector>& t2, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, stan::base_type_t, T0__2__, stan::base_type_t>>; @@ -10929,16 +10947,18 @@ class tuple_templating_model final : public model_base_crtp, int>(stan::math::add(m1, m2), - 1), pstream__); + std::tuple&, int>(stan::math::add( + m1, m2), 1), + pstream__); double s = std::numeric_limits::quiet_NaN(); current_statement__ = 1; - s = tsum(std::tuple, std::vector>(a1, a2), - pstream__); + s = tsum( + std::tuple&, const std::vector&>(a1, + a2), pstream__); current_statement__ = 3; foo2( std::vector, int>>{std::tuple< - Eigen::Matrix, + const Eigen::Matrix&, int>( stan::math::add( m1, m2), @@ -10946,17 +10966,18 @@ class tuple_templating_model final : public model_base_crtp>, + std::tuple>&, std::tuple>, double>(std::vector< Eigen::Matrix>{ stan::math::add( m1, m2)}, - std::tuple>(1, m1), 3.5), + std::tuple&>(1, m1), 3.5), std::vector>>{std::tuple< int, - Eigen::Matrix>(1, + const Eigen::Matrix&>(1, m1), - std::tuple>(2, m2)}, pstream__); + std::tuple&>(2, m2)}, + pstream__); out__.write(s); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); @@ -11134,6 +11155,652 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_templating_model_namespace::profiles__; } +#endif + $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_copying.stan +// Code generated by %%NAME%% %%VERSION%% +#include +namespace tuple_copying_model_namespace { +using stan::model::model_base_crtp; +using namespace stan::math; +stan::math::profile_map profiles__; +static constexpr std::array locations_array__ = + {" (found before start of program)", + " (in 'tuple_copying.stan', line 18, column 2 to column 22)", + " (in 'tuple_copying.stan', line 21, column 2 to column 56)", + " (in 'tuple_copying.stan', line 22, column 2 to column 10)", + " (in 'tuple_copying.stan', line 24, column 2 to column 18)", + " (in 'tuple_copying.stan', line 26, column 2 to column 67)", + " (in 'tuple_copying.stan', line 27, column 2 to column 11)", + " (in 'tuple_copying.stan', line 29, column 2 to column 21)", + " (in 'tuple_copying.stan', line 14, column 2 to column 17)", + " (in 'tuple_copying.stan', line 15, column 2 to column 19)", + " (in 'tuple_copying.stan', line 3, column 4 to column 15)", + " (in 'tuple_copying.stan', line 4, column 4 to column 15)", + " (in 'tuple_copying.stan', line 2, column 34 to line 5, column 3)", + " (in 'tuple_copying.stan', line 8, column 4 to column 15)", + " (in 'tuple_copying.stan', line 9, column 4 to column 15)", + " (in 'tuple_copying.stan', line 10, column 4 to column 15)", + " (in 'tuple_copying.stan', line 7, column 45 to line 11, column 3)"}; +template , + stan::is_vt_not_complex, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>* = nullptr> +void f(const std::tuple& x, std::ostream* pstream__); +template , + stan::is_vt_not_complex, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>* = nullptr> +void +g(const std::tuple& x, std::ostream* pstream__); +template , + stan::is_vt_not_complex, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>*> +void f(const std::tuple& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 10; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 11; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(x)); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +template , + stan::is_vt_not_complex, + std::is_integral, + stan::is_std_vector, + stan::is_autodiff>, + std::is_floating_point>>*> +void +g(const std::tuple& x, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + stan::base_type_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 13; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 14; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 15; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<2>(x)); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +class tuple_copying_model final : public model_base_crtp { + private: + Eigen::Matrix x_data__; + std::vector y; + Eigen::Map> x{nullptr, 0, 0}; + public: + ~tuple_copying_model() {} + tuple_copying_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) + : model_base_crtp(0) { + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + using local_scalar_t__ = double; + boost::ecuyer1988 base_rng__ = + stan::services::util::create_rng(random_seed__, 0); + // suppress unused var warning + (void) base_rng__; + static constexpr const char* function__ = + "tuple_copying_model_namespace::tuple_copying_model"; + // suppress unused var warning + (void) function__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 8; + context__.validate_dims("data initialization", "x", "double", + std::vector{static_cast(2), static_cast(2)}); + x_data__ = Eigen::Matrix::Constant(2, 2, + std::numeric_limits::quiet_NaN()); + new (&x) Eigen::Map>(x_data__.data(), 2, 2); + { + std::vector x_flat__; + current_statement__ = 8; + x_flat__ = context__.vals_r("x"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { + stan::model::assign(x, x_flat__[(pos__ - 1)], + "assigning variable x", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + current_statement__ = 9; + context__.validate_dims("data initialization", "y", "double", + std::vector{static_cast(10)}); + y = std::vector(10, std::numeric_limits::quiet_NaN()); + current_statement__ = 9; + y = context__.vals_r("y"); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + num_params_r__ = (3 * 3) + (3 * 3); + } + inline std::string model_name() const final { + return "tuple_copying_model"; + } + inline std::vector model_compile_info() const noexcept { + return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", + "stancflags = -fsoa --print-cpp"}; + } + // Base log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_not_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_copying_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m1 = in__.template read>(3, 3); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m2 = in__.template read>(3, 3); + { + std::tuple, + Eigen::Matrix> temp = + std::tuple, + Eigen::Matrix>{Eigen::Matrix::Constant(2, + 2, DUMMY_VAR__), + Eigen::Matrix::Constant(3, 3, + DUMMY_VAR__)}; + current_statement__ = 2; + stan::model::assign(temp, + std::tuple&, + Eigen::Matrix>(x, + stan::math::multiply(m1, m2)), "assigning variable temp"); + current_statement__ = 3; + f(temp, pstream__); + current_statement__ = 4; + f( + std::tuple&, + Eigen::Matrix>(x, + stan::math::multiply(m1, m2)), pstream__); + std::tuple, int, + std::vector> temp2 = + std::tuple, int, + std::vector>{Eigen::Matrix::Constant(3, + 3, DUMMY_VAR__), + std::numeric_limits::min(), + std::vector(10, DUMMY_VAR__)}; + current_statement__ = 5; + stan::model::assign(temp2, + std::tuple, int, + const std::vector&>(stan::math::add(m1, m2), 1, y), + "assigning variable temp2"); + current_statement__ = 6; + g(temp2, pstream__); + current_statement__ = 7; + g( + std::tuple, int, + const std::vector&>(stan::math::add(m1, m2), 1, y), + pstream__); + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + // Reverse mode autodiff log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_copying_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m1 = in__.template read>(3, 3); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m2 = in__.template read>(3, 3); + { + std::tuple, + Eigen::Matrix> temp = + std::tuple, + Eigen::Matrix>{Eigen::Matrix::Constant(2, + 2, DUMMY_VAR__), + Eigen::Matrix::Constant(3, 3, + DUMMY_VAR__)}; + current_statement__ = 2; + stan::model::assign(temp, + std::tuple&, + Eigen::Matrix>(x, + stan::math::multiply(m1, m2)), "assigning variable temp"); + current_statement__ = 3; + f(temp, pstream__); + current_statement__ = 4; + f( + std::tuple&, + Eigen::Matrix>(x, + stan::math::multiply(m1, m2)), pstream__); + std::tuple, int, + std::vector> temp2 = + std::tuple, int, + std::vector>{Eigen::Matrix::Constant(3, + 3, DUMMY_VAR__), + std::numeric_limits::min(), + std::vector(10, DUMMY_VAR__)}; + current_statement__ = 5; + stan::model::assign(temp2, + std::tuple, int, + const std::vector&>(stan::math::add(m1, m2), 1, y), + "assigning variable temp2"); + current_statement__ = 6; + g(temp2, pstream__); + current_statement__ = 7; + g( + std::tuple, int, + const std::vector&>(stan::math::add(m1, m2), 1, y), + pstream__); + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + template * = nullptr, stan::require_vector_like_vt* = nullptr, stan::require_vector_vt* = nullptr> + inline void + write_array_impl(RNG& base_rng__, VecR& params_r__, VecI& params_i__, + VecVar& vars__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true, std::ostream* + pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + double lp__ = 0.0; + // suppress unused var warning + (void) lp__; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + stan::math::accumulator lp_accum__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + constexpr bool jacobian__ = false; + // suppress unused var warning + (void) jacobian__; + static constexpr const char* function__ = + "tuple_copying_model_namespace::write_array"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, + std::numeric_limits::quiet_NaN()); + current_statement__ = 1; + m1 = in__.template read>(3, 3); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, + std::numeric_limits::quiet_NaN()); + current_statement__ = 1; + m2 = in__.template read>(3, 3); + out__.write(m1); + out__.write(m2); + if (stan::math::logical_negation( + (stan::math::primitive_value(emit_transformed_parameters__) || + stan::math::primitive_value(emit_generated_quantities__)))) { + return ; + } + if (stan::math::logical_negation(emit_generated_quantities__)) { + return ; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr, + stan::require_vector_like_vt* = nullptr> + inline void + unconstrain_array_impl(const VecVar& params_r__, const VecI& params_i__, + VecVar& vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + stan::model::assign(m1, + in__.read>(3, 3), + "assigning variable m1"); + out__.write(m1); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + stan::model::assign(m2, + in__.read>(3, 3), + "assigning variable m2"); + out__.write(m2); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr> + inline void + transform_inits_impl(const stan::io::var_context& context__, VecVar& + vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "m1", "double", + std::vector{static_cast(3), static_cast(3)}); + current_statement__ = 1; + context__.validate_dims("parameter initialization", "m2", "double", + std::vector{static_cast(3), static_cast(3)}); + int pos__ = std::numeric_limits::min(); + pos__ = 1; + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + { + std::vector m1_flat__; + current_statement__ = 1; + m1_flat__ = context__.vals_r("m1"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + stan::model::assign(m1, m1_flat__[(pos__ - 1)], + "assigning variable m1", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + out__.write(m1); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + { + std::vector m2_flat__; + current_statement__ = 1; + m2_flat__ = context__.vals_r("m2"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + stan::model::assign(m2, m2_flat__[(pos__ - 1)], + "assigning variable m2", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + out__.write(m2); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + inline void + get_param_names(std::vector& names__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + names__ = std::vector{"m1", "m2"}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + get_dims(std::vector>& dimss__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + dimss__ = std::vector>{std::vector{static_cast< + size_t>(3), + static_cast(3)}, + std::vector{static_cast(3), + static_cast(3)}}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + constrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m1" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m2" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + unconstrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m1" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m2" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline std::string get_constrained_sizedtypes() const { + return std::string("[{\"name\":\"m1\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"},{\"name\":\"m2\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"}]"); + } + inline std::string get_unconstrained_sizedtypes() const { + return std::string("[{\"name\":\"m1\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"},{\"name\":\"m2\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"}]"); + } + // Begin method overload boilerplate + template inline void + write_array(RNG& base_rng, Eigen::Matrix& params_r, + Eigen::Matrix& vars, const bool + emit_transformed_parameters = true, const bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = ((3 * 3) + (3 * 3)); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + std::vector params_i; + vars = Eigen::Matrix::Constant(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline void + write_array(RNG& base_rng, std::vector& params_r, std::vector& + params_i, std::vector& vars, bool + emit_transformed_parameters = true, bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = ((3 * 3) + (3 * 3)); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + vars = std::vector(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline T_ + log_prob(Eigen::Matrix& params_r, std::ostream* pstream = nullptr) const { + Eigen::Matrix params_i; + return log_prob_impl(params_r, params_i, pstream); + } + template inline T_ + log_prob(std::vector& params_r, std::vector& params_i, + std::ostream* pstream = nullptr) const { + return log_prob_impl(params_r, params_i, pstream); + } + inline void + transform_inits(const stan::io::var_context& context, + Eigen::Matrix& params_r, std::ostream* + pstream = nullptr) const final { + std::vector params_r_vec(params_r.size()); + std::vector params_i; + transform_inits(context, params_i, params_r_vec, pstream); + params_r = Eigen::Map>(params_r_vec.data(), + params_r_vec.size()); + } + inline void + transform_inits(const stan::io::var_context& context, std::vector& + params_i, std::vector& vars, std::ostream* + pstream__ = nullptr) const { + vars.resize(num_params_r__); + transform_inits_impl(context, vars, pstream__); + } + inline void + unconstrain_array(const std::vector& params_constrained, + std::vector& params_unconstrained, std::ostream* + pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = std::vector(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } + inline void + unconstrain_array(const Eigen::Matrix& params_constrained, + Eigen::Matrix& params_unconstrained, + std::ostream* pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = Eigen::Matrix::Constant(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } +}; +} +using stan_model = tuple_copying_model_namespace::tuple_copying_model; +#ifndef USING_R +// Boilerplate +stan::model::model_base& +new_model(stan::io::var_context& data_context, unsigned int seed, + std::ostream* msg_stream) { + stan_model* m = new stan_model(data_context, seed, msg_stream); + return *m; +} +stan::math::profile_map& get_stan_profile_data() { + return tuple_copying_model_namespace::profiles__; +} #endif $ ../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_hof.stan // Code generated by %%NAME%% %%VERSION%% @@ -11157,42 +11824,50 @@ static constexpr std::array locations_array__ = " (in 'tuple_hof.stan', line 3, column 39 to line 5, column 3)"}; template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -std::decay_t> -fun(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::tuple>& m, std::ostream* - pstream__); + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::decay_t, T3__0__>> +fun(const T0__& y_slice, const T1__& start, const T2__& end, + const std::tuple& m, std::ostream* pstream__); struct fun_rsfunctor__ { template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> - std::decay_t> - operator()(const std::vector& y_slice, const T1__& start, const T2__& - end, std::ostream* pstream__, - const std::tuple>& m) const { + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, + std::is_integral, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::decay_t, T3__0__>> + operator()(const T0__& y_slice, const T1__& start, const T2__& end, + std::ostream* pstream__, const std::tuple& m) const { return fun(y_slice, (start + 1), (end + 1), m, pstream__); } }; template , - std::is_integral>, - std::is_integral>, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -std::decay_t> -fun(const std::vector& y_slice, const T1__& start, const T2__& end, - const std::tuple>& m, std::ostream* - pstream__) { - using local_scalar_t__ = std::decay_t>; + stan::require_all_t, + stan::is_autodiff>, + std::is_floating_point>, + std::is_integral, std::is_integral, + stan::is_autodiff, + std::is_floating_point, + stan::is_std_vector, + std::is_integral>>*> +std::decay_t, T3__0__>> +fun(const T0__& y_slice, const T1__& start, const T2__& end, + const std::tuple& m, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t, + T3__0__>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -11639,11 +12314,16 @@ static constexpr std::array locations_array__ = " (in 'tuple_lpdf.stan', line 2, column 63 to line 4, column 4)"}; template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lpdf(const std::tuple& x, @@ -11651,11 +12331,16 @@ foo_lpdf(const std::tuple& x, pstream__); template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lpdf(const std::tuple& x, @@ -11995,13 +12680,15 @@ static constexpr std::array locations_array__ = " (in 'tuple_lpdf2.stan', line 3, column 5 to column 14)", " (in 'tuple_lpdf2.stan', line 2, column 37 to line 4, column 4)"}; template , - std::is_integral>>* = nullptr> + stan::require_all_t, + std::is_floating_point, + std::is_integral>* = nullptr> std::decay_t> foo_lpdf(const std::tuple& x, std::ostream* pstream__); template , - std::is_integral>>*> + stan::require_all_t, + std::is_floating_point, + std::is_integral>*> std::decay_t> foo_lpdf(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -12337,16 +13024,18 @@ static constexpr std::array locations_array__ = " (in 'tuple_lpmf.stan', line 3, column 6 to column 25)", " (in 'tuple_lpmf.stan', line 2, column 42 to line 4, column 4)"}; template >, - std::is_integral>, - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_integral, + stan::is_autodiff, + std::is_floating_point>* = nullptr> std::decay_t> foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__); template >, - std::is_integral>, - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_integral, + stan::is_autodiff, + std::is_floating_point>*> std::decay_t> foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__) { diff --git a/test/integration/good/tuples/pretty.expected b/test/integration/good/tuples/pretty.expected index 7d4a8a8c5..5f478b3eb 100644 --- a/test/integration/good/tuples/pretty.expected +++ b/test/integration/good/tuples/pretty.expected @@ -234,6 +234,38 @@ generated quantities { overly_complicated(({m1 + m2}, (1, m1), 3.5), {(1, m1), (2, m2)}); } + $ ../../../../../install/default/bin/stanc --auto-format tuple_copying.stan +functions { + void f(tuple(matrix, matrix) x) { + print(x.1); + print(x.2); + } + + void g(tuple(matrix, int, array[] real) x) { + print(x.1); + print(x.2); + print(x.3); + } +} +data { + matrix[2, 2] x; + array[10] real y; +} +parameters { + matrix[3, 3] m1, m2; +} +model { + tuple(matrix[2, 2], matrix[3, 3]) temp = (x, m1 * m2); + f(temp); + + f((x, m1 * m2)); + + tuple(matrix[3, 3], int, array[10] real) temp2 = (m1 + m2, 1, y); + g(temp2); + + g((m1 + m2, 1, y)); +} + $ ../../../../../install/default/bin/stanc --auto-format tuple_hof.stan functions { real fun(array[] real y_slice, int start, int end, diff --git a/test/integration/good/tuples/transformed_mir.expected b/test/integration/good/tuples/transformed_mir.expected index d599d1d92..88ae92d5b 100644 --- a/test/integration/good/tuples/transformed_mir.expected +++ b/test/integration/good/tuples/transformed_mir.expected @@ -18543,6 +18543,908 @@ ((out_unconstrained_st SReal) (out_constrained_st SReal) (out_block GeneratedQuantities) (out_trans Identity))))) (prog_name tuple_templating_model) (prog_path tuple-templating.stan)) + $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple_copying.stan +((functions_block + (((fdrt Void) (fdname f) (fdsuffix FnPlain) + (fdargs ((AutoDiffable x (UTuple (UMatrix UMatrix))))) + (fdbody + (((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (fdloc )) + ((fdrt Void) (fdname g) (fdsuffix FnPlain) + (fdargs ((AutoDiffable x (UTuple (UMatrix UInt (UArray UReal)))))) + (fdbody + (((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable)))))) + 1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable)))))) + 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable)))))) + 3)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (fdloc )))) + (input_vars + ((x + ((begin_loc + ((filename tuple_copying.stan) (line_num 14) (col_num 2) (included_from ()))) + (end_loc + ((filename tuple_copying.stan) (line_num 14) (col_num 17) (included_from ())))) + (SMatrix AoS + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (y + ((begin_loc + ((filename tuple_copying.stan) (line_num 15) (col_num 2) (included_from ()))) + (end_loc + ((filename tuple_copying.stan) (line_num 15) (col_num 19) (included_from ())))) + (SArray SReal + ((pattern (Lit Int 10)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (prepare_data + (((pattern + (Decl (decl_adtype DataOnly) (decl_id pos__) (decl_type (Sized SInt)) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id x) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id x_flat__) + (decl_type (Unsized (UArray UReal))) (initialize false))) + (meta )) + ((pattern + (Assignment ((LVariable x_flat__) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + ((LVariable x) + ((Single + ((pattern (Var sym2__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + UMatrix + ((pattern + (Indexed + ((pattern (Var x_flat__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id y) + (decl_type + (Sized + (SArray SReal + ((pattern (Lit Int 10)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable y) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )))) + (log_prob + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype (TupleAD (AutoDiffable AutoDiffable))) (decl_id temp) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SMatrix AoS + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp) ()) (UTuple (UMatrix UMatrix)) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined f FnPlain) + (((pattern (Var temp)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined f FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (DataOnly AutoDiffable))))))))) + (meta )) + ((pattern + (Decl (decl_adtype (TupleAD (AutoDiffable AutoDiffable AutoDiffable))) + (decl_id temp2) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + SInt + (SArray SReal + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp2) ()) (UTuple (UMatrix UInt (UArray UReal))) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable)))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined g FnPlain) + (((pattern (Var temp2)) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined g FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly DataOnly))))))))) + (meta ))))) + (meta )))) + (reverse_mode_log_prob + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype (TupleAD (AutoDiffable AutoDiffable))) (decl_id temp) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SMatrix AoS + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp) ()) (UTuple (UMatrix UMatrix)) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined f FnPlain) + (((pattern (Var temp)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined f FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (DataOnly AutoDiffable))))))))) + (meta )) + ((pattern + (Decl (decl_adtype (TupleAD (AutoDiffable AutoDiffable AutoDiffable))) + (decl_id temp2) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + SInt + (SArray SReal + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp2) ()) (UTuple (UMatrix UInt (UArray UReal))) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable)))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined g FnPlain) + (((pattern (Var temp2)) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly AutoDiffable))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined g FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly DataOnly))))))))) + (meta ))))) + (meta )))) + (generate_quantities + (((pattern + (Decl (decl_adtype DataOnly) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt ()) + (var + ((pattern (Var m1)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt ()) + (var + ((pattern (Var m2)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern + (EOr + ((pattern (Var emit_transformed_parameters__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )) + ((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )))) + (transform_inits + (((pattern + (Decl (decl_adtype DataOnly) (decl_id pos__) (decl_type (Sized SInt)) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1_flat__) + (decl_type (Unsized (UArray UReal))) (initialize false))) + (meta )) + ((pattern + (Assignment ((LVariable m1_flat__) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str m1)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + ((LVariable m1) + ((Single + ((pattern (Var sym2__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + UMatrix + ((pattern + (Indexed + ((pattern (Var m1_flat__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m1)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2_flat__) + (decl_type (Unsized (UArray UReal))) (initialize false))) + (meta )) + ((pattern + (Assignment ((LVariable m2_flat__) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str m2)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + ((LVariable m2) + ((Single + ((pattern (Var sym2__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + UMatrix + ((pattern + (Indexed + ((pattern (Var m2_flat__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m2)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )))) + (unconstrain_array + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp (CompilerInternal FnReadDeserializer) + (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m1)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp (CompilerInternal FnReadDeserializer) + (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m2)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )))) + (output_vars + ((m1 + ((begin_loc + ((filename tuple_copying.stan) (line_num 18) (col_num 2) (included_from ()))) + (end_loc + ((filename tuple_copying.stan) (line_num 18) (col_num 22) (included_from ())))) + ((out_unconstrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_constrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_block Parameters) (out_trans Identity))) + (m2 + ((begin_loc + ((filename tuple_copying.stan) (line_num 18) (col_num 2) (included_from ()))) + (end_loc + ((filename tuple_copying.stan) (line_num 18) (col_num 22) (included_from ())))) + ((out_unconstrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_constrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_block Parameters) (out_trans Identity))))) + (prog_name tuple_copying_model) (prog_path tuple_copying.stan)) $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple_hof.stan ((functions_block (((fdrt (ReturnType UReal)) (fdname fun) (fdsuffix FnPlain) diff --git a/test/integration/good/tuples/tuple_copying.stan b/test/integration/good/tuples/tuple_copying.stan new file mode 100644 index 000000000..ca92802cd --- /dev/null +++ b/test/integration/good/tuples/tuple_copying.stan @@ -0,0 +1,30 @@ +functions { + void f(tuple(matrix, matrix) x) { + print(x.1); + print(x.2); + } + + void g(tuple(matrix, int, array[] real) x) { + print(x.1); + print(x.2); + print(x.3); + } +} +data { + matrix[2, 2] x; + array[10] real y; +} +parameters { + matrix[3, 3] m1, m2; +} +model { + tuple(matrix[2, 2], matrix[3, 3]) temp = (x, m1 * m2); + f(temp); + + f((x, m1 * m2)); + + tuple(matrix[3, 3], int, array[10] real) temp2 = (m1 + m2, 1, y); + g(temp2); + + g((m1 + m2, 1, y)); +} From 187c644ac7e29921f44c0e8e470644be18d487f8 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 15:22:11 -0400 Subject: [PATCH 05/16] Require _either_ autodiff or floating --- src/stan_math_backend/Cpp.ml | 21 +- src/stan_math_backend/Lower_functions.ml | 93 +- .../cli-args/allow-undefined/cpp.expected | 12 +- .../allow-undefined/standalone-cpp.expected | 12 +- .../code-gen/complex_numbers/cpp.expected | 136 +- test/integration/good/code-gen/cpp.expected | 2108 ++++++++++------ .../good/code-gen/expressions/cpp.expected | 20 +- test/integration/good/code-gen/lir.expected | 2207 ++++++++--------- .../good/code-gen/ode/cpp.expected | 204 +- .../standalone_functions/cpp.expected | 220 +- .../good/compiler-optimizations/cpp.expected | 138 +- .../compiler-optimizations/cppO0.expected | 138 +- .../compiler-optimizations/cppO1.expected | 138 +- .../mem_patterns/cpp.expected | 16 +- .../good/overloading/minimum_promotion.stan | 34 +- .../good/overloading/pretty.expected | 7 + test/integration/good/tuples/cpp.expected | 156 +- 17 files changed, 3109 insertions(+), 2551 deletions(-) diff --git a/src/stan_math_backend/Cpp.ml b/src/stan_math_backend/Cpp.ml index 0a4793722..d694ebe66 100644 --- a/src/stan_math_backend/Cpp.ml +++ b/src/stan_math_backend/Cpp.ml @@ -300,7 +300,7 @@ end type template_parameter = | Typename of string (** The name of a template typename *) - | RequireIs of string * type_ + | RequireAllCondition of [`Exact of string | `OneOf of string list] * type_ (** A C++ type trait (e.g. is_arithmetic) and the template name which needs to satisfy that. These are collated into one require_all_t<> *) @@ -413,7 +413,14 @@ module Printing = struct let pp_requires ~default ppf requires = if not (List.is_empty requires) then - let pp_require ppf (trait, t) = pf ppf "%s<%a>" trait pp_type_ t in + let pp_single_require t ppf trait = pf ppf "%s<%a>" trait pp_type_ t in + let pp_require ppf (req, t) = + match req with + | `Exact trait -> pp_single_require t ppf trait + | `OneOf traits -> + pf ppf "stan::math::disjunction<@[%a@]>" + (list ~sep:comma (pp_single_require t)) + traits in pf ppf ",@ stan::require_all_t<@[%a@]>*%s" (list ~sep:comma pp_require) requires @@ -421,7 +428,7 @@ module Printing = struct (** Pretty print a list of templates as [template ].name - This function pools together [RequireIs] nodes into a [require_all_t] + This function pools together [RequireAllCondition] nodes into a [require_all_t] *) let pp_template ~default ppf template_parameters = let pp_basic_template ppf = function @@ -433,7 +440,7 @@ module Printing = struct if not (List.is_empty template_parameters) then let templates, requires = List.partition_map template_parameters ~f:(function - | RequireIs (trait, name) -> Second (trait, name) + | RequireAllCondition (trait, name) -> Second (trait, name) | Typename name -> First (`Typename name) | Bool name -> First (`Bool name) | Require (requirement, args) -> First (`Require (requirement, args)) ) @@ -764,7 +771,8 @@ module Tests = struct [ make_fun_defn ~templates_init: ( [ [ Typename "T0__" - ; RequireIs ("stan::is_foobar", TemplateType "T0__") ] ] + ; RequireAllCondition + (`Exact "stan::is_foobar", TemplateType "T0__") ] ] , true ) ~name:"foobar" ~return_type:Void ~inline:true () ; (let s = @@ -774,7 +782,8 @@ module Tests = struct make_fun_defn ~templates_init: ( [ [ Typename "T0__" - ; RequireIs ("stan::is_foobar", TemplateType "T0__") ] ] + ; RequireAllCondition + (`Exact "stan::is_foobar", TemplateType "T0__") ] ] , false ) ~name:"foobar" ~return_type:Void ~inline:true ~body:rethrow () ) ] in diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index dc031a110..0490baaf1 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -4,16 +4,31 @@ open Lower_expr open Lower_stmt open Cpp -let rec lower_type_for_arg (t : UnsizedType.t) (inner_type : type_) : type_ = +let rec arg_type_prim (t : UnsizedType.t) : type_ = match t with - | UArray t when UnsizedType.contains_tuple t -> - StdVector (lower_type_for_arg t inner_type) - | _ -> inner_type + | UInt -> Int + | UReal | UMatrix | URowVector | UVector | UComplexVector | UComplexMatrix + |UComplexRowVector | UTuple _ -> + stantype_prim t + | UComplex -> Types.complex (stantype_prim t) + | UArray t when UnsizedType.contains_tuple t -> StdVector (arg_type_prim t) + | UArray t -> + (* Expressions are not accepted for arrays of Eigen::Matrix *) + StdVector (lower_type t (stantype_prim t)) + | UMathLibraryFunction | UFun _ -> + Common.FatalError.fatal_error_msg + [%message "Function types not implemented"] -let arg_type custom_scalar ut = - let scalar = - match custom_scalar with None -> stantype_prim ut | Some s -> s in - lower_type_for_arg ut scalar +let template_arg_type template_or_type ut = + let rec lower_type_for_arg (t : UnsizedType.t) : type_ = + match t with + (* stdvectors are templates except for when they contain tuples*) + | UArray t when UnsizedType.contains_tuple t -> + StdVector (lower_type_for_arg t) + (* NB: tuples are handled by this function's caller, + [template_parameters] *) + | _ -> template_or_type in + lower_type_for_arg ut let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = (* we add the _arg suffix for any Eigen types *) @@ -28,34 +43,34 @@ let requires ut t = let rec requires_in ut t = match ut with | UnsizedType.URowVector -> - [ RequireIs ("stan::is_row_vector", t) - ; RequireIs ("stan::is_vt_not_complex", t) ] + [ RequireAllCondition (`Exact "stan::is_row_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_not_complex", t) ] | UComplexRowVector -> - [ RequireIs ("stan::is_row_vector", t) - ; RequireIs ("stan::is_vt_complex", t) ] + [ RequireAllCondition (`Exact "stan::is_row_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_complex", t) ] | UVector -> - [ RequireIs ("stan::is_col_vector", t) - ; RequireIs ("stan::is_vt_not_complex", t) ] + [ RequireAllCondition (`Exact "stan::is_col_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_not_complex", t) ] | UComplexVector -> - [ RequireIs ("stan::is_col_vector", t) - ; RequireIs ("stan::is_vt_complex", t) ] + [ RequireAllCondition (`Exact "stan::is_col_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_complex", t) ] | UMatrix -> - [ RequireIs ("stan::is_eigen_matrix_dynamic", t) - ; RequireIs ("stan::is_vt_not_complex", t) ] + [ RequireAllCondition (`Exact "stan::is_eigen_matrix_dynamic", t) + ; RequireAllCondition (`Exact "stan::is_vt_not_complex", t) ] | UComplexMatrix -> - [ RequireIs ("stan::is_eigen_matrix_dynamic", t) - ; RequireIs ("stan::is_vt_complex", t) ] - | UInt -> [RequireIs ("std::is_integral", t)] + [ RequireAllCondition (`Exact "stan::is_eigen_matrix_dynamic", t) + ; RequireAllCondition (`Exact "stan::is_vt_complex", t) ] + | UInt -> [RequireAllCondition (`Exact "std::is_integral", t)] | UComplex -> - RequireIs ("stan::is_complex", t) - :: requires_in UReal (TypeTrait ("stan::value_type_t", [t])) + RequireAllCondition (`Exact "stan::is_complex", t) + :: requires_in UReal (TypeTrait ("stan::base_type_t", [t])) | UArray inner_ut -> - RequireIs ("stan::is_std_vector", t) + RequireAllCondition (`Exact "stan::is_std_vector", t) :: requires_in inner_ut (TypeTrait ("stan::value_type_t", [t])) | _ -> (* not using stan::is_stan_scalar to explictly exclude int *) - [ RequireIs ("stan::is_autodiff", t) - ; RequireIs ("std::is_floating_point", t) ] in + [ RequireAllCondition + (`OneOf ["stan::is_autodiff"; "std::is_floating_point"], t) ] in requires_in ut t let return_optional_arg_types (args : Program.fun_arg_decl) = @@ -102,14 +117,14 @@ let template_parameters (args : Program.fun_arg_decl) = let templates = List.concat temps in let requires = List.concat reqs in let scalar = Tuple sclrs in - (templates, requires, arg_type (Some scalar) typ) + (templates, requires, template_arg_type scalar typ) | UnsizedType.DataOnly, ut when not (UnsizedType.is_eigen_type ut) -> - ([], [], arg_type None typ) + ([], [], arg_type_prim typ) | _ -> let template = sprintf "%s%d__" start i in ( [template] , requires typ template - , arg_type (Some (TemplateType template)) typ ) in + , template_arg_type (TemplateType template) typ ) in List.mapi args ~f:(fun i (ad, _, ty) -> template_p "T" i (ad, ty)) let%expect_test "arg types templated correctly" = @@ -132,11 +147,12 @@ let%expect_test "arg types tuple template" = [%expect {| T0__0__,T0__1__,T0__2__ - ((RequireIs stan::is_autodiff (TemplateType T0__0__)) - (RequireIs std::is_floating_point (TemplateType T0__0__)) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__1__)) - (RequireIs std::is_integral (TemplateType T0__2__))) + ((RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__0__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TemplateType T0__1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__1__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__2__))) std::tuple |}] let%expect_test "arg types tuple template" = @@ -151,11 +167,12 @@ let%expect_test "arg types tuple template" = [%expect {| T0__0__,T0__1__ - ((RequireIs stan::is_std_vector (TemplateType T0__0__)) - (RequireIs std::is_integral + ((RequireAllCondition (Exact stan::is_std_vector) (TemplateType T0__0__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T0__0__)))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__1__))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TemplateType T0__1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__1__))) std::vector> |}] let lower_promoted_scalar args = diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index a0804fac1..d4458f297 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -9,7 +9,9 @@ static constexpr std::array locations_array__ = {" (found before start of program)", " (in 'external.stan', line 10, column 4 to column 66)", " (in 'external.stan', line 9, column 63 to line 11, column 3)"}; -double internal_fun(const double& a, const int& d, std::ostream* pstream__); +double +internal_fun(const std::vector>& a, + const std::vector>& d, std::ostream* pstream__); struct external_map_rectable_functor__ { template , @@ -18,12 +20,14 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> - operator()(const T0__& phi, const T1__& theta, const double& x_r, - const int& x_i, std::ostream* pstream__) const { + operator()(const T0__& phi, const T1__& theta, const std::vector& + x_r, const std::vector& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); } }; -double internal_fun(const double& a, const int& d, std::ostream* pstream__) { +double +internal_fun(const std::vector>& a, + const std::vector>& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index 22e6fb766..57136050a 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -9,7 +9,9 @@ static constexpr std::array locations_array__ = {" (found before start of program)", " (in 'external.stan', line 10, column 4 to column 66)", " (in 'external.stan', line 9, column 63 to line 11, column 3)"}; -double internal_fun(const double& a, const int& d, std::ostream* pstream__); +double +internal_fun(const std::vector>& a, + const std::vector>& d, std::ostream* pstream__); struct external_map_rectable_functor__ { template , @@ -18,12 +20,14 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> - operator()(const T0__& phi, const T1__& theta, const double& x_r, - const int& x_i, std::ostream* pstream__) const { + operator()(const T0__& phi, const T1__& theta, const std::vector& + x_r, const std::vector& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); } }; -double internal_fun(const double& a, const int& d, std::ostream* pstream__) { +double +internal_fun(const std::vector>& a, + const std::vector>& d, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index 5c687d11f..d0c410b20 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -7220,41 +7220,51 @@ static constexpr std::array locations_array__ = std::complex foo(std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>* = nullptr> std::decay_t> foo1(const T0__& z, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::complex>> foo2(const T0__& r, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>* = nullptr> std::complex>> foo3(const T0__& z, std::ostream* pstream__); std::vector> foo4(std::ostream* pstream__); template , stan::is_complex>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>* = nullptr> std::decay_t>> foo5(const T0__& z, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::vector>>> foo6(const T0__& r, std::ostream* pstream__); template , stan::is_complex>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>* = nullptr> std::vector< std::complex>>>> foo7(const T0__& z, std::ostream* pstream__); @@ -7262,16 +7272,19 @@ template , stan::is_std_vector>, stan::is_complex>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>* = nullptr> + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> std::decay_t>> foo8(const T0__& z, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::vector< std::vector>>>> foo9(const T0__& r, std::ostream* pstream__); @@ -7279,11 +7292,14 @@ template , stan::is_std_vector>, stan::is_complex>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>* = nullptr> + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> std::vector< std::vector< std::complex>>>>> @@ -7309,8 +7325,10 @@ std::complex foo(std::ostream* pstream__) { } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>*> std::decay_t> foo1(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7331,8 +7349,8 @@ foo1(const T0__& z, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::complex>> foo2(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7354,8 +7372,10 @@ foo2(const T0__& r, std::ostream* pstream__) { } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>*> std::complex>> foo3(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7401,9 +7421,12 @@ std::vector> foo4(std::ostream* pstream__) { template , stan::is_complex>, - stan::is_autodiff>>, - std::is_floating_point>>>*> + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>*> std::decay_t>> foo5(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -7424,8 +7447,8 @@ foo5(const T0__& z, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::vector>>> foo6(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -7450,9 +7473,12 @@ foo6(const T0__& r, std::ostream* pstream__) { template , stan::is_complex>, - stan::is_autodiff>>, - std::is_floating_point>>>*> + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>*> std::vector< std::complex>>>> foo7(const T0__& z, std::ostream* pstream__) { @@ -7477,11 +7503,14 @@ template , stan::is_std_vector>, stan::is_complex>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>*> + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>*> std::decay_t>> foo8(const T0__& z, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -7502,8 +7531,8 @@ foo8(const T0__& z, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::vector< std::vector>>>> foo9(const T0__& r, std::ostream* pstream__) { @@ -7538,11 +7567,14 @@ template , stan::is_std_vector>, stan::is_complex>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>*> + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>*> std::vector< std::vector< std::complex>>>>> diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index d1f52f1ec..9b4d25ff2 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -2135,8 +2135,8 @@ template >* = nullptr> int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__); template , @@ -2198,8 +2198,8 @@ _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -3766,23 +3766,23 @@ static constexpr std::array locations_array__ = " (in 'funcall-type-promotion.stan', line 7, column 4 to column 17)", " (in 'funcall-type-promotion.stan', line 6, column 27 to line 8, column 3)"}; template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo(const T0__& x, const T1__& y, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> void bar(const T0__& x, const T1__& y, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -3803,10 +3803,10 @@ foo(const T0__& x, const T1__& y, std::ostream* pstream__) { } } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> void bar(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; int current_statement__ = 0; @@ -5479,62 +5479,67 @@ template >* = nullptr> int foo(const T0__& n, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::vector< std::decay_t, stan::base_type_t>>> -sho(const T0__& t, const T1__& y, const T2__& theta, const double& x, - const int& x_int, std::ostream* pstream__); +sho(const T0__& t, const T1__& y, const T2__& theta, + const std::vector& x, const std::vector& x_int, + std::ostream* pstream__); double foo_bar0(std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo_bar1(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__); template , - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> void unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -5545,32 +5550,34 @@ template >* = nullptr> int foo_2(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>* = nullptr> std::vector>> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> void foo_4(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__); @@ -5582,37 +5589,38 @@ template , stan::base_type_t>>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const double& data_r, const int& data_i, std::ostream* pstream__); + const std::vector& data_r, const std::vector& data_i, + std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t>>> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& @@ -5634,16 +5642,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5680,16 +5693,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5726,16 +5744,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5772,16 +5795,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5818,16 +5846,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5870,16 +5903,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5923,16 +5961,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -5977,16 +6020,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -6031,16 +6079,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -6086,16 +6139,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -6142,16 +6200,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -6196,16 +6259,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -6251,16 +6319,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -6302,13 +6375,13 @@ void foo_6(std::ostream* pstream__); Eigen::Matrix matfoo(std::ostream* pstream__); Eigen::Matrix vecfoo(std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> Eigen::Matrix>,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> Eigen::Matrix>,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -6333,8 +6408,9 @@ template >* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> -binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const double& x_r, - const int& x_i, std::ostream* pstream__); +binomialf(const T0__& phi_arg__, const T1__& theta_arg__, + const std::vector& x_r, const std::vector& x_i, + std::ostream* pstream__); struct algebra_system_functor__ { template , @@ -6342,8 +6418,10 @@ struct algebra_system_functor__ { stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -6362,8 +6440,8 @@ struct binomialf_functor__ { stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, stan::base_type_t>>,-1,1> - operator()(const T0__& phi, const T1__& theta, const double& x_r, - const int& x_i, std::ostream* pstream__) const { + operator()(const T0__& phi, const T1__& theta, const std::vector& + x_r, const std::vector& x_i, std::ostream* pstream__) const { return binomialf(phi, theta, x_r, x_i, pstream__); } }; @@ -6392,19 +6470,24 @@ foo(const T0__& n, std::ostream* pstream__) { } } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::vector< std::decay_t, stan::base_type_t>>> -sho(const T0__& t, const T1__& y, const T2__& theta, const double& x, - const int& x_int, std::ostream* pstream__) { +sho(const T0__& t, const T1__& y, const T2__& theta, + const std::vector& x, const std::vector& x_int, + std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t>>; @@ -6455,8 +6538,8 @@ double foo_bar0(std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo_bar1(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6477,10 +6560,10 @@ foo_bar1(const T0__& x, std::ostream* pstream__) { } } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6502,8 +6585,8 @@ foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { } template , - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6522,8 +6605,8 @@ foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { } template , - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6545,8 +6628,8 @@ foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { } template , - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -6567,10 +6650,10 @@ foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { } } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__) { @@ -6593,8 +6676,8 @@ foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> void unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -6853,8 +6936,8 @@ foo_2(const T0__& a, std::ostream* pstream__) { } } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>*> std::vector>> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { @@ -6877,8 +6960,8 @@ foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -6898,8 +6981,10 @@ foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> void foo_4(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; @@ -6925,14 +7010,14 @@ void foo_4(const T0__& x, std::ostream* pstream__) { } } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__) { @@ -6994,7 +7079,8 @@ template , stan::base_type_t>>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, - const double& data_r, const int& data_i, std::ostream* pstream__) { + const std::vector& data_r, const std::vector& data_i, + std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; @@ -7018,16 +7104,16 @@ foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__) { @@ -7052,18 +7138,18 @@ foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t>>> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& @@ -7140,16 +7226,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7216,16 +7307,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7289,16 +7385,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7362,16 +7463,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7435,16 +7541,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7514,16 +7625,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7594,16 +7710,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7675,16 +7796,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7756,16 +7882,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7838,16 +7969,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -7921,16 +8057,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -8002,16 +8143,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -8084,16 +8230,21 @@ template , stan::is_std_vector>, std::is_integral>>, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, @@ -8234,8 +8385,8 @@ Eigen::Matrix vecfoo(std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> Eigen::Matrix>,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -8261,8 +8412,8 @@ vecmufoo(const T0__& mu, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> Eigen::Matrix>,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -8296,8 +8447,10 @@ template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> Eigen::Matrix, @@ -8345,8 +8498,9 @@ template >*> Eigen::Matrix, stan::base_type_t>>,-1,1> -binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const double& x_r, - const int& x_i, std::ostream* pstream__) { +binomialf(const T0__& phi_arg__, const T1__& theta_arg__, + const std::vector& x_r, const std::vector& x_i, + std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, stan::base_type_t>>; int current_statement__ = 0; @@ -14901,17 +15055,23 @@ static constexpr std::array locations_array__ = " (in 'motherHOF.stan', line 25, column 45 to line 30, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -14921,16 +15081,20 @@ sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, const T4__& x_int, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::decay_t, @@ -14943,8 +15107,10 @@ template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -14958,8 +15124,10 @@ template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -14968,8 +15136,8 @@ Eigen::Matrix, goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const T2__& data_r, const T3__& data_i, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> map_rectfake(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -14994,8 +15164,10 @@ struct goo_functor__ { stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -15013,8 +15185,10 @@ struct foo_functor__ { stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -15028,16 +15202,20 @@ struct foo_functor__ { struct integrand_functor__ { template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::decay_t, @@ -15054,8 +15232,10 @@ struct algebra_system_functor__ { stan::is_col_vector, stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> Eigen::Matrix, @@ -15069,17 +15249,23 @@ struct algebra_system_functor__ { struct sho_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -15092,17 +15278,23 @@ struct sho_functor__ { }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::vector< @@ -15144,16 +15336,20 @@ sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::decay_t, @@ -15185,8 +15381,10 @@ template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> Eigen::Matrix, @@ -15222,8 +15420,10 @@ template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> Eigen::Matrix, @@ -15254,8 +15454,8 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> map_rectfake(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -15281,8 +15481,10 @@ template , stan::is_vt_not_complex, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> Eigen::Matrix, @@ -17909,12 +18111,12 @@ static constexpr std::array locations_array__ = " (in 'new_integrate_interface.stan', line 3, column 4 to column 13)", " (in 'new_integrate_interface.stan', line 2, column 47 to line 4, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>*> Eigen::Matrix locations_array__ = " (in 'old_integrate_interface.stan', line 7, column 38 to line 19, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -23432,17 +23640,23 @@ dz_dt(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, struct dz_dt_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -23455,17 +23669,23 @@ struct dz_dt_functor__ { }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::vector< @@ -26401,8 +26621,8 @@ template >* = nullptr> double foo(const T0__& p, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo(const T0__& p, std::ostream* pstream__); template >> foo(const T0__& p_arg__, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t>> foo(const T0__& p, std::ostream* pstream__); template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> std::decay_t>> foo(const T0__& p, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -26568,8 +26793,10 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t>> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -26667,9 +26894,12 @@ foo(const T0__& p, std::ostream* pstream__) { template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>*> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>*> std::decay_t>> foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -28033,20 +28263,26 @@ static constexpr std::array locations_array__ = " (in 'promotion.stan', line 6, column 28 to line 8, column 4)"}; template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>* = nullptr> std::complex>> ident(const T0__& x, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t>> foo(const T0__& zs, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>*> std::complex>> ident(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -28068,8 +28304,10 @@ ident(const T0__& x, std::ostream* pstream__) { } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t>> foo(const T0__& zs, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -28501,8 +28739,8 @@ template >> foo(const T0__& a_arg__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo(const T0__& b, std::ostream* pstream__); template >>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -28538,8 +28776,8 @@ foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* pstream__); struct foo_variadic2_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -28650,8 +28888,8 @@ foo(const T0__& a_arg__, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo(const T0__& b, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -28809,8 +29047,8 @@ test7(const T0__& gamma_arg__, std::ostream* pstream__) { } } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -29330,28 +29568,36 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m1.stan', line 16, column 58 to line 18, column 3)"}; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, @@ -29359,13 +29605,17 @@ foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, struct h_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> operator()(const T0__& y_slice, const T1__& start, const T2__& end, @@ -29376,8 +29626,10 @@ struct h_rsfunctor__ { struct g_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -29390,8 +29642,10 @@ template struct foo_lpdf_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -29402,8 +29656,10 @@ struct foo_lpdf_rsfunctor__ { }; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>*> std::decay_t>> g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -29433,12 +29689,16 @@ g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t, stan::base_type_t>> h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, @@ -29471,8 +29731,10 @@ h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>*> std::decay_t>> foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, @@ -30137,8 +30399,10 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m2.stan', line 113, column 65 to line 121, column 3)"}; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -30170,9 +30434,12 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -30212,20 +30479,26 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_col_vector>, @@ -30236,8 +30509,10 @@ h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_row_vector>, @@ -30248,8 +30523,10 @@ h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_eigen_matrix_dynamic>, @@ -30260,22 +30537,29 @@ h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> std::decay_t, stan::base_type_t>> h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -30289,8 +30573,10 @@ h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -30304,8 +30590,10 @@ h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -30320,16 +30608,20 @@ h8(const T0__& y, const T1__& start, const T2__& end, const T3__& a, struct h5_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> std::decay_t, stan::base_type_t>> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* @@ -30340,13 +30632,17 @@ struct h5_rsfunctor__ { struct h1_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* @@ -30370,8 +30666,10 @@ struct g3_rsfunctor__ { struct h7_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -30390,8 +30688,10 @@ struct h7_rsfunctor__ { struct h3_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -30436,8 +30736,10 @@ struct g8_rsfunctor__ { struct h2_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -30453,8 +30755,10 @@ struct h2_rsfunctor__ { struct h8_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -30502,8 +30806,10 @@ struct g4_rsfunctor__ { struct h4_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -30536,10 +30842,12 @@ struct g5_rsfunctor__ { template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -30551,8 +30859,10 @@ struct g5_rsfunctor__ { struct h6_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -30571,8 +30881,10 @@ struct h6_rsfunctor__ { struct g1_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -30583,8 +30895,10 @@ struct g1_rsfunctor__ { }; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>*> std::decay_t>> g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -30718,9 +31032,12 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, std::is_integral, std::is_integral>*> std::decay_t>> g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -30899,12 +31216,16 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t, stan::base_type_t>> h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, @@ -30931,8 +31252,10 @@ h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_col_vector>, @@ -30971,8 +31294,10 @@ h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_row_vector>, @@ -31011,8 +31336,10 @@ h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_eigen_matrix_dynamic>, @@ -31052,14 +31379,19 @@ h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>*> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>*> std::decay_t, stan::base_type_t>> h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, @@ -31100,8 +31432,10 @@ h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -31150,8 +31484,10 @@ h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -31200,8 +31536,10 @@ h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -33412,16 +33750,20 @@ static constexpr std::array locations_array__ = " (in 'reduce_sum_m3.stan', line 86, column 11 to line 149, column 3)"}; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -33453,9 +33795,12 @@ f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -33524,29 +33869,36 @@ template >, stan::is_std_vector>>, - stan::is_autodiff>>>, - std::is_floating_point>>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t, T3__>> g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> @@ -33556,8 +33908,10 @@ g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> @@ -33567,8 +33921,10 @@ g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> @@ -33578,20 +33934,26 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_col_vector>, @@ -33602,8 +33964,10 @@ g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_row_vector>, @@ -33614,8 +33978,10 @@ g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_eigen_matrix_dynamic>, @@ -33626,22 +33992,29 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> std::decay_t, stan::base_type_t>> g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -33655,8 +34028,10 @@ g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -33670,8 +34045,10 @@ g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -33689,12 +34066,14 @@ template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_row_vector, @@ -33704,8 +34083,10 @@ template , std::is_integral>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_col_vector>, stan::is_vt_not_complex>, @@ -33720,9 +34101,12 @@ template >>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_std_vector, stan::is_std_vector>, stan::is_col_vector>, stan::is_std_vector>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>* = nullptr> + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> std::decay_t, T4__, stan::base_type_t, stan::base_type_t, stan::base_type_t, @@ -33807,8 +34194,10 @@ struct f10_rsfunctor__ { struct g8_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -33824,8 +34213,10 @@ struct g8_rsfunctor__ { struct g7_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -33841,8 +34232,10 @@ struct g7_rsfunctor__ { struct g4_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_eigen_matrix_dynamic, @@ -33857,8 +34250,10 @@ struct g4_rsfunctor__ { struct g6_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -33874,8 +34269,10 @@ struct g6_rsfunctor__ { struct g11_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -33895,10 +34292,12 @@ struct f5_rsfunctor__ { template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -33910,8 +34309,10 @@ struct f5_rsfunctor__ { struct f1_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -33923,13 +34324,17 @@ struct f1_rsfunctor__ { struct g5_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> operator()(const T0__& y_slice, const T1__& start, const T2__& end, @@ -33940,16 +34345,20 @@ struct g5_rsfunctor__ { struct g9_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>* = nullptr> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> std::decay_t, stan::base_type_t>> operator()(const T0__& y_slice, const T1__& start, const T2__& end, @@ -33960,12 +34369,14 @@ struct g9_rsfunctor__ { struct g1_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t, T3__>> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { @@ -33978,12 +34389,14 @@ struct f12_rsfunctor__ { stan::is_std_vector>, stan::is_std_vector>>, - stan::is_autodiff>>>, - std::is_floating_point>>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -33995,8 +34408,10 @@ struct f12_rsfunctor__ { struct g3_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_row_vector, @@ -34053,8 +34468,10 @@ struct f6_rsfunctor__ { struct g2_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_col_vector, @@ -34069,8 +34486,10 @@ struct g2_rsfunctor__ { struct g10_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -34105,8 +34524,10 @@ struct f8_rsfunctor__ { struct g12_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, @@ -34154,13 +34575,15 @@ struct s_rsfunctor__ { typename T12__, typename T13__, typename T14__, typename T15__, typename T16__, typename T17__, typename T18__, typename T19__, stan::require_all_t, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_row_vector, @@ -34170,8 +34593,10 @@ struct s_rsfunctor__ { stan::is_std_vector, std::is_integral>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_col_vector>, stan::is_vt_not_complex>, @@ -34186,10 +34611,12 @@ struct s_rsfunctor__ { std::is_integral>>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_std_vector, stan::is_std_vector>, stan::is_col_vector>, stan::is_std_vector>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>* = nullptr> + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> std::decay_t, T4__, stan::base_type_t, stan::base_type_t, stan::base_type_t, @@ -34265,8 +34694,10 @@ struct f7_rsfunctor__ { struct f1a_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> std::decay_t>> @@ -34277,8 +34708,10 @@ struct f1a_rsfunctor__ { }; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>*> std::decay_t>> f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -34302,8 +34735,10 @@ f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral>*> std::decay_t>> f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -34403,9 +34838,12 @@ f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* template , stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, std::is_integral, std::is_integral>*> std::decay_t>> f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -34593,11 +35031,14 @@ template >, stan::is_std_vector>>, - stan::is_autodiff>>>, - std::is_floating_point>>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>, std::is_integral, std::is_integral>*> std::decay_t>> f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* @@ -34621,11 +35062,13 @@ f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t, T3__>> g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { @@ -34649,8 +35092,10 @@ g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>*> @@ -34679,8 +35124,10 @@ g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>*> @@ -34709,8 +35156,10 @@ g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> @@ -34739,12 +35188,16 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t, stan::base_type_t>> g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, @@ -34769,8 +35222,10 @@ g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_col_vector>, @@ -34799,8 +35254,10 @@ g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_row_vector>, @@ -34829,8 +35286,10 @@ g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_eigen_matrix_dynamic>, @@ -34859,14 +35318,19 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>>*> + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>*> std::decay_t, stan::base_type_t>> g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, @@ -34891,8 +35355,10 @@ g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -34924,8 +35390,10 @@ g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -34957,8 +35425,10 @@ g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, } template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, stan::is_std_vector, stan::is_std_vector>, @@ -34994,12 +35464,14 @@ template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_row_vector, @@ -35009,8 +35481,10 @@ template , std::is_integral>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, stan::is_col_vector>, stan::is_vt_not_complex>, @@ -35025,9 +35499,12 @@ template >>, stan::is_std_vector, stan::is_std_vector>, - stan::is_autodiff>>, - std::is_floating_point>>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, stan::is_std_vector, stan::is_std_vector>, stan::is_col_vector>, stan::is_std_vector>>, - stan::is_autodiff>>>, - std::is_floating_point>>>>*> + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>*> std::decay_t, T4__, stan::base_type_t, stan::base_type_t, stan::base_type_t, @@ -37628,24 +38108,24 @@ static constexpr std::array locations_array__ = " (in 'return-position-types.stan', line 11, column 4 to column 24)", " (in 'return-position-types.stan', line 10, column 30 to line 12, column 3)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::vector>> foo(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::tuple>>, std::decay_t>> baz(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::vector>>> bar(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::vector>> foo(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -37666,8 +38146,8 @@ foo(const T0__& a, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::tuple>>, std::decay_t>> baz(const T0__& a, std::ostream* pstream__) { @@ -37690,8 +38170,8 @@ baz(const T0__& a, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::vector>>> bar(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -38140,24 +38620,24 @@ static constexpr std::array locations_array__ = " (in 'shadowing.stan', line 5, column 4 to column 14)", " (in 'shadowing.stan', line 2, column 43 to line 6, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__>>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* pstream__); struct rhs_variadic2_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__>>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, @@ -38166,12 +38646,12 @@ struct rhs_variadic2_functor__ { } }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> Eigen::Matrix, T2__>>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* @@ -39639,19 +40119,19 @@ double foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo2_lpdf(const T0__& y, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo3_lpdf(const T0__& y, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -39709,8 +40189,8 @@ foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo2_lpdf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -39728,8 +40208,8 @@ foo2_lpdf(const T0__& y, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo3_lpdf(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -39748,8 +40228,8 @@ foo3_lpdf(const T0__& y, std::ostream* pstream__) { } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -44265,13 +44745,13 @@ static constexpr std::array locations_array__ = " (in 'udf_tilde_stmt_conflict.stan', line 3, column 4 to column 21)", " (in 'udf_tilde_stmt_conflict.stan', line 2, column 22 to line 4, column 3)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> normal(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> normal(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -44644,17 +45124,17 @@ static constexpr std::array locations_array__ = " (in 'user_constrain.stan', line 3, column 4 to column 13)", " (in 'user_constrain.stan', line 2, column 36 to line 4, column 3)"}; template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index f90475f8e..10e95d9db 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -610,12 +610,14 @@ static constexpr std::array locations_array__ = " (in 'simple_function.stan', line 11, column 37 to line 13, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -659,12 +661,14 @@ Eigen::Matrix, add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 561f0c2f7..19b745caf 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -802,7 +802,9 @@ (Literal "\" (in 'mother.stan', line 341, column 41 to line 345, column 3)\""))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) true)) + ((((Typename T0__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)))) + true)) (inline false) (return_type Int) (name foo) (args (((Const (Ref (TemplateType T0__))) n) @@ -811,17 +813,13 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T2__)))))) true)) (inline false) @@ -834,8 +832,9 @@ (name sho) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) - ((Const (Ref (TemplateType T2__))) theta) ((Const (Ref Double)) x) - ((Const (Ref Int)) x_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T2__))) theta) ((Const (Ref (StdVector Double))) x) + ((Const (Ref (StdVector Int))) x_int) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((()) true)) (inline false) (return_type Double) @@ -843,8 +842,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type @@ -857,10 +857,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) true)) (inline false) (return_type @@ -874,9 +874,9 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) true)) (inline false) (return_type @@ -888,9 +888,10 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) true)) (inline false) (return_type @@ -902,9 +903,10 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) true)) (inline false) (return_type @@ -917,10 +919,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) true)) (inline false) (return_type @@ -935,8 +937,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -946,7 +948,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) true)) + ((((Typename T0__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)))) + true)) (inline false) (return_type Int) (name foo_1) (args (((Const (Ref (TemplateType T0__))) a) @@ -954,7 +958,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) true)) + ((((Typename T0__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)))) + true)) (inline false) (return_type Int) (name foo_2) (args (((Const (Ref (TemplateType T0__))) a) @@ -963,9 +969,9 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs std::is_integral (TemplateType T1__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) true)) (inline false) (return_type @@ -979,8 +985,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type @@ -993,10 +999,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_std_vector (TemplateType T0__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T0__)))) - (RequireIs std::is_floating_point + ((((Typename T0__) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T0__)))))) true)) (inline false) (return_type Void) (name foo_4) @@ -1007,14 +1012,14 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)) - (RequireIs stan::is_autodiff (TemplateType T2__)) - (RequireIs std::is_floating_point (TemplateType T2__)) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)))) true)) (inline false) (return_type @@ -1031,10 +1036,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)))) true)) (inline false) (return_type @@ -1046,22 +1051,24 @@ (name foo_5) (args (((Const (Ref (TemplateType T0__))) shared_params_arg__) - ((Const (Ref (TemplateType T1__))) job_params_arg__) ((Const (Ref Double)) data_r) - ((Const (Ref Int)) data_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) job_params_arg__) + ((Const (Ref (StdVector Double))) data_r) ((Const (Ref (StdVector Int))) data_i) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (Typename T4__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)) - (RequireIs stan::is_autodiff (TemplateType T2__)) - (RequireIs std::is_floating_point (TemplateType T2__)) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_autodiff (TemplateType T4__)) - (RequireIs std::is_floating_point (TemplateType T4__)))) + (Typename T4__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T4__)))) true)) (inline false) (return_type @@ -1080,18 +1087,19 @@ ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T_lp__) - (Typename T_lp_accum__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)) - (RequireIs stan::is_autodiff (TemplateType T2__)) - (RequireIs std::is_floating_point (TemplateType T2__)) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_autodiff (TemplateType T4__)) - (RequireIs std::is_floating_point (TemplateType T4__)) - (RequireIs stan::is_autodiff (TemplateType T5__)) - (RequireIs std::is_floating_point (TemplateType T5__)))) + (Typename T_lp_accum__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T5__)))) true)) (inline false) (return_type @@ -1112,9 +1120,9 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs std::is_integral (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) true)) (inline false) (return_type @@ -1133,62 +1141,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1208,62 +1211,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1283,62 +1281,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1358,62 +1351,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1433,62 +1421,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1521,62 +1504,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1610,62 +1588,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1700,62 +1673,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1790,62 +1758,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1881,62 +1844,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -1974,62 +1932,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -2064,62 +2017,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -2155,62 +2103,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) @@ -2257,8 +2200,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type @@ -2272,8 +2216,9 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type @@ -2288,17 +2233,15 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs stan::is_std_vector (TemplateType T3__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T3__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T3__)))))) true)) (inline false) @@ -2320,10 +2263,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)))) true)) (inline false) (return_type @@ -2335,8 +2278,9 @@ (name binomialf) (args (((Const (Ref (TemplateType T0__))) phi_arg__) - ((Const (Ref (TemplateType T1__))) theta_arg__) ((Const (Ref Double)) x_r) - ((Const (Ref Int)) x_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) theta_arg__) + ((Const (Ref (StdVector Double))) x_r) ((Const (Ref (StdVector Int))) x_i) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (Struct ((param ()) (struct_name algebra_system_functor__) @@ -2344,17 +2288,15 @@ ((FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs stan::is_std_vector (TemplateType T3__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T3__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T3__)))))) true)) (inline false) @@ -2383,10 +2325,10 @@ ((FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)))) true)) (inline false) (return_type @@ -2399,8 +2341,9 @@ (name "operator()") (args (((Const (Ref (TemplateType T0__))) phi) - ((Const (Ref (TemplateType T1__))) theta) ((Const (Ref Double)) x_r) - ((Const (Ref Int)) x_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) theta) + ((Const (Ref (StdVector Double))) x_r) ((Const (Ref (StdVector Int))) x_i) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers (Const)) (body (((Return @@ -2408,7 +2351,9 @@ ((Var phi) (Var theta) (Var x_r) (Var x_i) (Var pstream__)))))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) false)) + ((((Typename T0__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)))) + false)) (inline false) (return_type Int) (name foo) (args (((Const (Ref (TemplateType T0__))) n) @@ -2451,17 +2396,13 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T2__)))))) false)) (inline false) @@ -2474,8 +2415,9 @@ (name sho) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) - ((Const (Ref (TemplateType T2__))) theta) ((Const (Ref Double)) x) - ((Const (Ref Int)) x_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T2__))) theta) ((Const (Ref (StdVector Double))) x) + ((Const (Ref (StdVector Int))) x_int) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ @@ -2573,8 +2515,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type @@ -2613,10 +2556,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) false)) (inline false) (return_type @@ -2656,9 +2599,9 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) false)) (inline false) (return_type @@ -2692,9 +2635,10 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) false)) (inline false) (return_type @@ -2732,9 +2676,10 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (Typename T1__) (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + ((((Typename T0__) (Typename T1__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) false)) (inline false) (return_type @@ -2773,10 +2718,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)))) false)) (inline false) (return_type @@ -2818,8 +2763,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -2859,7 +2804,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) false)) + ((((Typename T0__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)))) + false)) (inline false) (return_type Int) (name foo_1) (args (((Const (Ref (TemplateType T0__))) a) @@ -3201,7 +3148,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs std::is_integral (TemplateType T0__)))) false)) + ((((Typename T0__) + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)))) + false)) (inline false) (return_type Int) (name foo_2) (args (((Const (Ref (TemplateType T0__))) a) @@ -3260,9 +3209,9 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs std::is_integral (TemplateType T1__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) false)) (inline false) (return_type @@ -3302,8 +3251,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type @@ -3341,10 +3290,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_std_vector (TemplateType T0__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T0__)))) - (RequireIs std::is_floating_point + ((((Typename T0__) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T0__)))))) false)) (inline false) (return_type Void) (name foo_4) @@ -3399,14 +3347,14 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)) - (RequireIs stan::is_autodiff (TemplateType T2__)) - (RequireIs std::is_floating_point (TemplateType T2__)) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)))) false)) (inline false) (return_type @@ -3528,10 +3476,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)))) false)) (inline false) (return_type @@ -3543,8 +3491,9 @@ (name foo_5) (args (((Const (Ref (TemplateType T0__))) shared_params_arg__) - ((Const (Ref (TemplateType T1__))) job_params_arg__) ((Const (Ref Double)) data_r) - ((Const (Ref Int)) data_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) job_params_arg__) + ((Const (Ref (StdVector Double))) data_r) ((Const (Ref (StdVector Int))) data_i) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ @@ -3591,16 +3540,17 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (Typename T4__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)) - (RequireIs stan::is_autodiff (TemplateType T2__)) - (RequireIs std::is_floating_point (TemplateType T2__)) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_autodiff (TemplateType T4__)) - (RequireIs std::is_floating_point (TemplateType T4__)))) + (Typename T4__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T4__)))) false)) (inline false) (return_type @@ -3647,18 +3597,19 @@ ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T_lp__) - (Typename T_lp_accum__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)) - (RequireIs stan::is_autodiff (TemplateType T1__)) - (RequireIs std::is_floating_point (TemplateType T1__)) - (RequireIs stan::is_autodiff (TemplateType T2__)) - (RequireIs std::is_floating_point (TemplateType T2__)) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_autodiff (TemplateType T4__)) - (RequireIs std::is_floating_point (TemplateType T4__)) - (RequireIs stan::is_autodiff (TemplateType T5__)) - (RequireIs std::is_floating_point (TemplateType T5__)))) + (Typename T_lp_accum__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T1__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T5__)))) false)) (inline false) (return_type @@ -3705,9 +3656,9 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs std::is_integral (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) false)) (inline false) (return_type @@ -3800,62 +3751,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -3923,62 +3869,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4041,62 +3982,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4159,62 +4095,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4277,62 +4208,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4408,62 +4334,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4540,62 +4461,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4673,62 +4589,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4806,62 +4717,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -4940,62 +4846,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -5076,62 +4977,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -5209,62 +5105,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -5343,62 +5234,57 @@ ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) (Typename T4__) (Typename T5__) (Typename T6__) (Typename T7__) (Typename T8__) (Typename T9__) (Typename T10__) (Typename T11__) - (RequireIs std::is_integral (TemplateType T0__)) - (RequireIs stan::is_std_vector (TemplateType T1__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T1__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T1__)))) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_integral + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) - (RequireIs stan::is_autodiff (TemplateType T3__)) - (RequireIs std::is_floating_point (TemplateType T3__)) - (RequireIs stan::is_std_vector (TemplateType T4__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T3__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T4__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T4__)))) - (RequireIs stan::is_std_vector (TemplateType T5__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T5__)))) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t - ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs std::is_floating_point + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) - (RequireIs stan::is_col_vector (TemplateType T6__)) - (RequireIs stan::is_vt_not_complex (TemplateType T6__)) - (RequireIs stan::is_std_vector (TemplateType T7__)) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T6__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T7__)) + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T7__)))) - (RequireIs stan::is_std_vector (TemplateType T8__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T8__)))) - (RequireIs stan::is_col_vector + (RequireAllCondition (Exact stan::is_col_vector) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) - (RequireIs stan::is_eigen_matrix_dynamic (TemplateType T9__)) - (RequireIs stan::is_vt_not_complex (TemplateType T9__)) - (RequireIs stan::is_std_vector (TemplateType T10__)) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T9__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T10__)) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TemplateType T10__)))) - (RequireIs stan::is_std_vector (TemplateType T11__)) - (RequireIs stan::is_std_vector + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) (TypeTrait stan::value_type_t ((TemplateType T11__)))) - (RequireIs stan::is_eigen_matrix_dynamic + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) - (RequireIs stan::is_vt_not_complex + (RequireAllCondition (Exact stan::is_vt_not_complex) (TypeTrait stan::value_type_t ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) @@ -5631,8 +5517,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type @@ -5687,8 +5574,9 @@ ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) (FunDef ((templates_init - ((((Typename T0__) (RequireIs stan::is_autodiff (TemplateType T0__)) - (RequireIs std::is_floating_point (TemplateType T0__)))) + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type @@ -5755,17 +5643,15 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)) - (RequireIs stan::is_std_vector (TemplateType T2__)) - (RequireIs stan::is_autodiff - (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs std::is_floating_point + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TypeTrait stan::value_type_t ((TemplateType T2__)))) - (RequireIs stan::is_std_vector (TemplateType T3__)) - (RequireIs std::is_integral + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T3__)) + (RequireAllCondition (Exact std::is_integral) (TypeTrait stan::value_type_t ((TemplateType T3__)))))) false)) (inline false) @@ -5860,10 +5746,10 @@ (FunDef ((templates_init ((((Typename T0__) (Typename T1__) - (RequireIs stan::is_col_vector (TemplateType T0__)) - (RequireIs stan::is_vt_not_complex (TemplateType T0__)) - (RequireIs stan::is_col_vector (TemplateType T1__)) - (RequireIs stan::is_vt_not_complex (TemplateType T1__)))) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T0__)) + (RequireAllCondition (Exact stan::is_col_vector) (TemplateType T1__)) + (RequireAllCondition (Exact stan::is_vt_not_complex) (TemplateType T1__)))) false)) (inline false) (return_type @@ -5875,8 +5761,9 @@ (name binomialf) (args (((Const (Ref (TemplateType T0__))) phi_arg__) - ((Const (Ref (TemplateType T1__))) theta_arg__) ((Const (Ref Double)) x_r) - ((Const (Ref Int)) x_i) ((Pointer (TypeLiteral std::ostream)) pstream__))) + ((Const (Ref (TemplateType T1__))) theta_arg__) + ((Const (Ref (StdVector Double))) x_r) ((Const (Ref (StdVector Int))) x_i) + ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body (((Using local_scalar_t__ diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index 4bb44c07d..1fea95188 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -43,44 +43,44 @@ static constexpr std::array locations_array__ = " (in 'ode_adjoint_test_model.stan', line 9, column 4 to column 13)", " (in 'ode_adjoint_test_model.stan', line 8, column 50 to line 10, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix>>,-1,1> f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__>>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, std::is_integral, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T3__>>,-1,1> f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, std::ostream* pstream__); struct f_1_arg_variadic2_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, @@ -90,13 +90,13 @@ struct f_1_arg_variadic2_functor__ { }; struct f_2_arg_variadic2_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, std::is_integral, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T3__>>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, @@ -106,8 +106,8 @@ struct f_2_arg_variadic2_functor__ { }; struct f_0_arg_variadic2_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>*> Eigen::Matrix, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> Eigen::Matrix, T2__>>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* @@ -174,13 +174,13 @@ f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* } } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, std::is_integral, - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> Eigen::Matrix, T3__>>,-1,1> f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, @@ -901,20 +901,20 @@ static constexpr std::array locations_array__ = " (in 'overloaded-ode.stan', line 29, column 22 to line 39, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -923,20 +923,20 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, std::is_integral>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, @@ -947,20 +947,20 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& struct simple_SIR_variadic2_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -971,20 +971,20 @@ struct simple_SIR_variadic2_functor__ { } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, std::is_integral>* = nullptr> Eigen::Matrix, T2__, T3__, T4__, @@ -997,20 +997,20 @@ struct simple_SIR_variadic2_functor__ { }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> Eigen::Matrix, T2__, T3__, T4__, std::decay_t>>>,-1,1> @@ -1065,20 +1065,20 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, std::is_integral>*> Eigen::Matrix, T2__, T3__, T4__, diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index e5e3371f7..4da8c2513 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -32,14 +32,16 @@ static constexpr std::array locations_array__ = " (in 'basic.stan', line 46, column 4 to column 13)", " (in 'basic.stan', line 45, column 51 to line 47, column 3)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t>> array_fun(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); template >>, stan::is_complex>>>, - stan::is_autodiff>>>>, - std::is_floating_point>>>>>* = nullptr> + stan::math::disjunction>>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>>* = nullptr> std::vector< std::vector< std::vector< std::complex>>>>>> array_fun(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -127,8 +132,10 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t>> array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -223,8 +230,8 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -246,8 +253,8 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -266,8 +273,8 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -288,10 +295,10 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { } } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -338,13 +345,16 @@ template >>, stan::is_complex>>>, - stan::is_autodiff>>>>, - std::is_floating_point>>>>>*> + stan::math::disjunction>>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>>*> std::vector< std::vector< std::vector< @@ -457,14 +467,16 @@ static constexpr std::array locations_array__ = " (in 'basic.stanfunctions', line 36, column 2 to column 31)", " (in 'basic.stanfunctions', line 35, column 31 to line 37, column 1)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t>> array_fun(const T0__& a, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> my_log1p_exp(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -528,8 +540,10 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { } template , - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t>> array_fun(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -624,8 +638,8 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> test_lgamma(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -647,8 +661,8 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> void test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { @@ -667,8 +681,8 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -689,10 +703,10 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { } } template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -783,17 +797,23 @@ Eigen::Matrix>>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -805,17 +825,23 @@ double ode_integrate(std::ostream* pstream__); struct integrand_ode_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -851,17 +877,23 @@ integrand(const T0__& x_arg__, std::ostream* pstream__) { } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::vector< diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 62bb76f95..2e77a8700 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1912,17 +1912,23 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -1933,17 +1939,23 @@ simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, struct simple_SIR_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -1956,17 +1968,23 @@ struct simple_SIR_functor__ { }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::vector< @@ -14875,8 +14893,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -15134,8 +15152,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -23420,8 +23438,8 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 13, column 8 to column 43)", " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template >> summer(const T0__& et_arg__, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -33753,28 +33771,28 @@ static constexpr std::array locations_array__ = " (in 'lupdf-inlining.stan', line 9, column 8 to column 32)", " (in 'lupdf-inlining.stan', line 8, column 26 to line 10, column 5)"}; template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template , - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -33796,8 +33814,8 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { } template , - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -33818,8 +33836,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -36398,8 +36416,8 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>* = nullptr> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& @@ -36411,8 +36429,8 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>*> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& @@ -38047,16 +38065,16 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 7, column 5 to column 20)", " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -38437,8 +38455,8 @@ foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 51148a079..507b527f3 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -696,17 +696,23 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -717,17 +723,23 @@ simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, struct simple_SIR_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -740,17 +752,23 @@ struct simple_SIR_functor__ { }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::vector< @@ -9725,8 +9743,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -9879,8 +9897,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -14238,8 +14256,8 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 15, column 4 to column 23)", " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template >> summer(const T0__& et_arg__, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -20682,28 +20700,28 @@ static constexpr std::array locations_array__ = " (in 'lupdf-inlining.stan', line 9, column 8 to column 32)", " (in 'lupdf-inlining.stan', line 8, column 26 to line 10, column 5)"}; template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template , - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -20722,8 +20740,8 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { } template , - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -20741,8 +20759,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -23004,8 +23022,8 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>* = nullptr> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& @@ -23017,8 +23035,8 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>*> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& @@ -24111,16 +24129,16 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 7, column 5 to column 20)", " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -24487,8 +24505,8 @@ foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 54d053828..30d4e8941 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -678,17 +678,23 @@ static constexpr std::array locations_array__ = " (in 'ad-level-failing.stan', line 11, column 61 to line 20, column 3)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -699,17 +705,23 @@ simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, struct simple_SIR_functor__ { template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< @@ -722,17 +734,23 @@ struct simple_SIR_functor__ { }; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, std::is_integral>>*> std::vector< @@ -9986,8 +10004,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -10141,8 +10159,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -15351,8 +15369,8 @@ static constexpr std::array locations_array__ = " (in 'function-in-function-loops.stan', line 13, column 8 to column 43)", " (in 'function-in-function-loops.stan', line 9, column 24 to line 16, column 3)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> do_something(const T0__& x, std::ostream* pstream__); template >> summer(const T0__& et_arg__, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> do_something(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -22821,28 +22839,28 @@ static constexpr std::array locations_array__ = " (in 'lupdf-inlining.stan', line 9, column 8 to column 32)", " (in 'lupdf-inlining.stan', line 8, column 26 to line 10, column 5)"}; template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template , - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -22861,8 +22879,8 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { } template , - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -22880,8 +22898,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { } } template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -25148,8 +25166,8 @@ static constexpr std::array locations_array__ = " (in 'optimizations.stan', line 14, column 18 to line 17, column 5)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>* = nullptr> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& @@ -25161,8 +25179,8 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>*> void nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& @@ -26317,16 +26335,16 @@ static constexpr std::array locations_array__ = " (in 'overloaded-fn.stan', line 7, column 5 to column 20)", " (in 'overloaded-fn.stan', line 6, column 19 to line 8, column 4)"}; template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::decay_t> dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> std::decay_t> dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; @@ -26693,8 +26711,8 @@ foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); template , - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>>*> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>; diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index 8fe3deb53..f1205d3dd 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -7333,8 +7333,8 @@ template >>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> Eigen::Matrix>>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> Eigen::Matrix locations_array__ = " (in 'tuple-dataonly2.stan', line 3, column 4 to column 18)", " (in 'tuple-dataonly2.stan', line 2, column 53 to line 4, column 3)"}; double -tuple_tester(const std::tuple& x, std::ostream* pstream__); +tuple_tester(const std::tuple, int>& x, std::ostream* + pstream__); double -tuple_tester(const std::tuple& x, std::ostream* pstream__) { +tuple_tester(const std::tuple, int>& x, std::ostream* + pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; // suppress unused var warning @@ -9493,21 +9495,29 @@ static constexpr std::array locations_array__ = " (in 'tuple-promotion.stan', line 2, column 53 to line 4, column 3)"}; template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t, stan::base_type_t>> dummy(const std::tuple& test, std::ostream* pstream__); template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t, stan::base_type_t>> dummy(const std::tuple& test, std::ostream* pstream__) { @@ -10552,8 +10562,10 @@ template , std::is_integral>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> std::decay_t>> tsum(const std::tuple& s, std::ostream* pstream__); template >& test, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> void foo3(const std::tuple& test, std::ostream* pstream__); @@ -10577,8 +10589,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> @@ -10616,8 +10628,10 @@ template , std::is_integral>, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> std::decay_t>> tsum(const std::tuple& s, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t>>; @@ -10667,8 +10681,8 @@ foo2(const std::vector>& test, std::ostream* } } template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> void foo3(const std::tuple& test, std::ostream* pstream__) { @@ -10701,8 +10715,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> @@ -11192,8 +11206,10 @@ template , std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>* = nullptr> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> void g(const std::tuple& x, std::ostream* pstream__); template , std::is_integral, stan::is_std_vector, - stan::is_autodiff>, - std::is_floating_point>>*> + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> void g(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = std::decay_t, @@ -11825,11 +11843,13 @@ static constexpr std::array locations_array__ = template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, std::is_integral>>* = nullptr> std::decay_t, T3__0__>> @@ -11839,12 +11859,14 @@ struct fun_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, std::is_integral>>* = nullptr> std::decay_t, T3__0__>> @@ -11856,11 +11878,13 @@ struct fun_rsfunctor__ { template , - stan::is_autodiff>, - std::is_floating_point>, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, std::is_integral, std::is_integral, - stan::is_autodiff, - std::is_floating_point, + stan::math::disjunction, + std::is_floating_point>, stan::is_std_vector, std::is_integral>>*> std::decay_t, T3__0__>> @@ -12314,16 +12338,16 @@ static constexpr std::array locations_array__ = " (in 'tuple_lpdf.stan', line 2, column 63 to line 4, column 4)"}; template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lpdf(const std::tuple& x, @@ -12331,16 +12355,16 @@ foo_lpdf(const std::tuple& x, pstream__); template , - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point, - stan::is_autodiff, - std::is_floating_point>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lpdf(const std::tuple& x, @@ -12680,14 +12704,14 @@ static constexpr std::array locations_array__ = " (in 'tuple_lpdf2.stan', line 3, column 5 to column 14)", " (in 'tuple_lpdf2.stan', line 2, column 37 to line 4, column 4)"}; template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>* = nullptr> std::decay_t> foo_lpdf(const std::tuple& x, std::ostream* pstream__); template , - std::is_floating_point, + stan::require_all_t, + std::is_floating_point>, std::is_integral>*> std::decay_t> foo_lpdf(const std::tuple& x, std::ostream* pstream__) { @@ -13026,16 +13050,16 @@ static constexpr std::array locations_array__ = template , std::is_integral, - stan::is_autodiff, - std::is_floating_point>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> std::decay_t> foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__); template , std::is_integral, - stan::is_autodiff, - std::is_floating_point>*> + stan::math::disjunction, + std::is_floating_point>>*> std::decay_t> foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__) { From 85229acffdee189c31967b9e22c7c6f12a5ec0cd Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 16:38:40 -0400 Subject: [PATCH 06/16] Fix template expansion in HOFs --- src/stan_math_backend/Lower_expr.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stan_math_backend/Lower_expr.ml b/src/stan_math_backend/Lower_expr.ml index 6e7b2df1f..f67d3c008 100644 --- a/src/stan_math_backend/Lower_expr.ml +++ b/src/stan_math_backend/Lower_expr.ml @@ -373,7 +373,8 @@ and lower_functionals fname suffix es mem_pattern = | _, args -> (fname, args @ [msgs]) in let fname = stan_namespace_qualify fname in let templates = templates false suffix in - Exprs.templated_fun_call fname templates (lower_exprs args) in + Exprs.templated_fun_call fname templates + (lower_exprs ~promote_reals:true args) in Some lower_hov and lower_fun_app suffix fname es mem_pattern From 2edcba074ebf605ff5d57d962da732622e086a7b Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 16:58:10 -0400 Subject: [PATCH 07/16] Dune promote --- test/integration/good/code-gen/cpp.expected | 483 ++++++++++-------- test/integration/good/code-gen/lir.expected | 27 +- .../good/compiler-optimizations/cpp.expected | 13 +- .../compiler-optimizations/cppO1.expected | 15 +- 4 files changed, 309 insertions(+), 229 deletions(-) diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 9b4d25ff2..975c38270 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -11072,11 +11072,13 @@ class mother_model final : public model_base_crtp { current_statement__ = 97; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x, y, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 98; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x, y_p, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 99; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y, dat, @@ -11084,7 +11086,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 100; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 101; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y_p, dat, @@ -11092,7 +11095,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 102; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y_p, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 103; tp_real = (p_real * p_real); current_statement__ = 104; @@ -11591,11 +11595,13 @@ class mother_model final : public model_base_crtp { current_statement__ = 97; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x, y, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 98; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x, y_p, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 99; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y, dat, @@ -11603,7 +11609,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 100; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 101; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y_p, dat, @@ -11611,7 +11618,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 102; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y_p, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 103; tp_real = (p_real * p_real); current_statement__ = 104; @@ -12241,11 +12249,13 @@ class mother_model final : public model_base_crtp { current_statement__ = 97; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x, y, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 98; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x, y_p, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 99; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y, dat, @@ -12253,7 +12263,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 100; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 101; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y_p, dat, @@ -12261,7 +12272,8 @@ class mother_model final : public model_base_crtp { current_statement__ = 102; stan::model::assign(theta_p, stan::math::algebra_solver(algebra_system_functor__(), x_p, y_p, dat, - dat_int, pstream__, 0.01, 0.01, 10), "assigning variable theta_p"); + dat_int, pstream__, 0.01, 0.01, static_cast(10)), + "assigning variable theta_p"); current_statement__ = 103; tp_real = (p_real * p_real); current_statement__ = 104; @@ -15822,12 +15834,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 27; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 28; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 29; stan::model::assign(theta_p_as, @@ -15836,7 +15848,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 30; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 31; stan::model::assign(theta_p_as, @@ -15845,7 +15857,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 32; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 33; stan::model::assign(theta_p_as, @@ -15854,12 +15866,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 34; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 35; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 36; stan::model::assign(theta_p_as, @@ -15868,7 +15880,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 37; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 38; stan::model::assign(theta_p_as, @@ -15877,7 +15889,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 39; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); { current_statement__ = 80; @@ -15966,69 +15978,76 @@ class motherHOF_model final : public model_base_crtp { theta_p, x, x_int, pstream__), "assigning variable y_hat"); local_scalar_t__ y_1d = DUMMY_VAR__; current_statement__ = 100; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__); current_statement__ = 101; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, + static_cast(1), x, x_d_r, x_d_i, pstream__); current_statement__ = 102; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1.0, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), 1.0, x, x_d_r, x_d_i, pstream__); current_statement__ = 103; y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1.0, x, x_d_r, x_d_i, pstream__); current_statement__ = 104; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__); current_statement__ = 105; - y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x, x_d_r, x_d_i, pstream__); current_statement__ = 106; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x, x_d_r, x_d_i, pstream__); current_statement__ = 107; y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x, x_d_r, x_d_i, pstream__); current_statement__ = 108; - y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x_d_r, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x_d_r, x_d_r, x_d_i, pstream__); current_statement__ = 109; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x_d_r, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x_d_r, x_d_r, x_d_i, pstream__); current_statement__ = 110; y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x_d_r, x_d_r, x_d_i, pstream__); local_scalar_t__ z_1d = DUMMY_VAR__; current_statement__ = 111; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__, 1e-8); current_statement__ = 112; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, + static_cast(1), x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 113; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1.0, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), 1.0, x, x_d_r, x_d_i, pstream__, + 1e-8); current_statement__ = 114; z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1.0, x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 115; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__, 1e-8); current_statement__ = 116; - z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 117; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x, x_d_r, x_d_i, pstream__, + 1e-8); current_statement__ = 118; z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 119; - z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x_d_r, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x_d_r, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 120; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x_d_r, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x_d_r, x_d_r, x_d_i, pstream__, + 1e-8); current_statement__ = 121; z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x_d_r, x_d_r, x_d_i, pstream__, 1e-8); @@ -16139,12 +16158,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 27; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 28; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 29; stan::model::assign(theta_p_as, @@ -16153,7 +16172,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 30; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 31; stan::model::assign(theta_p_as, @@ -16162,7 +16181,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 32; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 33; stan::model::assign(theta_p_as, @@ -16171,12 +16190,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 34; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 35; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 36; stan::model::assign(theta_p_as, @@ -16185,7 +16204,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 37; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 38; stan::model::assign(theta_p_as, @@ -16194,7 +16213,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 39; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); { current_statement__ = 80; @@ -16283,69 +16302,76 @@ class motherHOF_model final : public model_base_crtp { theta_p, x, x_int, pstream__), "assigning variable y_hat"); local_scalar_t__ y_1d = DUMMY_VAR__; current_statement__ = 100; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__); current_statement__ = 101; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, + static_cast(1), x, x_d_r, x_d_i, pstream__); current_statement__ = 102; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1.0, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), 1.0, x, x_d_r, x_d_i, pstream__); current_statement__ = 103; y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1.0, x, x_d_r, x_d_i, pstream__); current_statement__ = 104; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__); current_statement__ = 105; - y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x, x_d_r, x_d_i, pstream__); current_statement__ = 106; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x, x_d_r, x_d_i, pstream__); current_statement__ = 107; y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x, x_d_r, x_d_i, pstream__); current_statement__ = 108; - y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x_d_r, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x_d_r, x_d_r, x_d_i, pstream__); current_statement__ = 109; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x_d_r, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x_d_r, x_d_r, x_d_i, pstream__); current_statement__ = 110; y_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x_d_r, x_d_r, x_d_i, pstream__); local_scalar_t__ z_1d = DUMMY_VAR__; current_statement__ = 111; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__, 1e-8); current_statement__ = 112; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, + static_cast(1), x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 113; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1.0, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), 1.0, x, x_d_r, x_d_i, pstream__, + 1e-8); current_statement__ = 114; z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1.0, x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 115; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, + x_d_i, pstream__, 1e-8); current_statement__ = 116; - z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 117; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x, x_d_r, x_d_i, pstream__, + 1e-8); current_statement__ = 118; z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 119; - z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, 1, x_d_r, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, + static_cast(1), x_d_r, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 120; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, x_r, x_d_r, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), x_r, x_d_r, x_d_r, x_d_i, pstream__, + 1e-8); current_statement__ = 121; z_1d = stan::math::integrate_1d(integrand_functor__(), x_r, x_r, x_d_r, x_d_r, x_d_i, pstream__, 1e-8); @@ -16494,12 +16520,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 27; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 28; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 29; stan::model::assign(theta_p_as, @@ -16508,7 +16534,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 30; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 31; stan::model::assign(theta_p_as, @@ -16517,7 +16543,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 32; stan::model::assign(theta_p_as, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 33; stan::model::assign(theta_p_as, @@ -16526,12 +16552,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 34; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 35; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 36; stan::model::assign(theta_p_as, @@ -16540,7 +16566,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 37; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); current_statement__ = 38; stan::model::assign(theta_p_as, @@ -16549,7 +16575,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 39; stan::model::assign(theta_p_as, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_p_as"); if (emit_transformed_parameters__) { out__.write(abc1_p); @@ -16655,27 +16681,29 @@ class motherHOF_model final : public model_base_crtp { theta_p, x, x_int, pstream__), "assigning variable y_hat"); double y_1d = std::numeric_limits::quiet_NaN(); current_statement__ = 19; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, x_d_r, + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, x_d_i, pstream__); current_statement__ = 60; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, + static_cast(1), x, x_d_r, x_d_i, pstream__); current_statement__ = 61; - y_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1.0, x, - x_d_r, x_d_i, pstream__); + y_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), 1.0, x, x_d_r, x_d_i, pstream__); current_statement__ = 62; y_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1.0, x, x_d_r, x_d_i, pstream__); double z_1d = std::numeric_limits::quiet_NaN(); current_statement__ = 20; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1, x, x_d_r, + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), static_cast(1), x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 63; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, + static_cast(1), x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 64; - z_1d = stan::math::integrate_1d(integrand_functor__(), 0, 1.0, x, - x_d_r, x_d_i, pstream__, 1e-8); + z_1d = stan::math::integrate_1d(integrand_functor__(), + static_cast(0), 1.0, x, x_d_r, x_d_i, pstream__, 1e-8); current_statement__ = 65; z_1d = stan::math::integrate_1d(integrand_functor__(), 0.0, 1.0, x, x_d_r, x_d_i, pstream__, 1e-8); @@ -16713,12 +16741,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 67; stan::model::assign(theta_dbl, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 68; stan::model::assign(theta_dbl, stan::math::algebra_solver(algebra_system_functor__(), x_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 69; stan::model::assign(theta_dbl, @@ -16727,7 +16755,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 70; stan::model::assign(theta_dbl, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_v, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 71; stan::model::assign(theta_dbl, @@ -16736,7 +16764,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 72; stan::model::assign(theta_dbl, stan::math::algebra_solver(algebra_system_functor__(), x_p_v, y_p, - x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 73; stan::model::assign(theta_dbl, @@ -16745,12 +16773,12 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 74; stan::model::assign(theta_dbl, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 75; stan::model::assign(theta_dbl, stan::math::algebra_solver_newton(algebra_system_functor__(), x_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 76; stan::model::assign(theta_dbl, @@ -16759,7 +16787,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 77; stan::model::assign(theta_dbl, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_v, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 78; stan::model::assign(theta_dbl, @@ -16768,7 +16796,7 @@ class motherHOF_model final : public model_base_crtp { current_statement__ = 79; stan::model::assign(theta_dbl, stan::math::algebra_solver_newton(algebra_system_functor__(), x_p_v, - y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, 10), + y_p, x_d_r, x_d_i, pstream__, 0.01, 0.01, static_cast(10)), "assigning variable theta_dbl"); current_statement__ = 18; for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { @@ -18268,48 +18296,54 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zd"); current_statement__ = 612; stan::model::assign(zd, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, 1e-6, 100, pstream__, rd, vd), "assigning variable zd"); current_statement__ = 613; stan::model::assign(zd, - stan::math::ode_adams_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable zd"); + stan::math::ode_adams_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zd"); current_statement__ = 614; stan::model::assign(zd, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, 1e-6, 100, pstream__, rd, vd), "assigning variable zd"); current_statement__ = 615; stan::model::assign(zd, - stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable zd"); + stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zd"); current_statement__ = 616; stan::model::assign(zd, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, pstream__, rd, vd), "assigning variable zd"); current_statement__ = 617; stan::model::assign(zd, - stan::math::ode_bdf(f_variadic2_functor__(), vd, id, rad, pstream__, - rd, vd), "assigning variable zd"); + stan::math::ode_bdf(f_variadic2_functor__(), vd, + static_cast(id), rad, pstream__, rd, vd), + "assigning variable zd"); current_statement__ = 618; stan::model::assign(zd, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, pstream__, rd, vd), "assigning variable zd"); current_statement__ = 619; stan::model::assign(zd, - stan::math::ode_adams(f_variadic2_functor__(), vd, id, rad, - pstream__, rd, vd), "assigning variable zd"); + stan::math::ode_adams(f_variadic2_functor__(), vd, + static_cast(id), rad, pstream__, rd, vd), + "assigning variable zd"); current_statement__ = 620; stan::model::assign(zd, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, pstream__, rd, vd), "assigning variable zd"); current_statement__ = 621; stan::model::assign(zd, - stan::math::ode_rk45(f_variadic2_functor__(), vd, id, rad, pstream__, - rd, vd), "assigning variable zd"); + stan::math::ode_rk45(f_variadic2_functor__(), vd, + static_cast(id), rad, pstream__, rd, vd), + "assigning variable zd"); current_statement__ = 622; stan::math::validate_non_negative_index("ra", "N", N); current_statement__ = 623; @@ -18374,8 +18408,9 @@ class new_integrate_interface_model final : public model_base_crtp::Constant(N, DUMMY_VAR__)); current_statement__ = 4; stan::model::assign(z, - stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable z"); + stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 6; stan::model::assign(z, stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -18506,8 +18541,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 39; stan::model::assign(z, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -18638,8 +18674,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 72; stan::model::assign(z, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -18770,8 +18807,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 105; stan::model::assign(z, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, @@ -18902,8 +18940,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 138; stan::model::assign(z, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -19034,8 +19073,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 171; stan::model::assign(z, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -19174,8 +19214,9 @@ class new_integrate_interface_model final : public model_base_crtp::Constant(N, DUMMY_VAR__)); current_statement__ = 402; stan::model::assign(zm, - stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable zm"); + stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 403; stan::model::assign(zm, stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -19306,8 +19347,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 436; stan::model::assign(zm, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, @@ -19438,8 +19480,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 469; stan::model::assign(zm, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, @@ -19570,8 +19613,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 502; stan::model::assign(zm, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, @@ -19702,8 +19746,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 535; stan::model::assign(zm, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, @@ -19834,8 +19879,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 568; stan::model::assign(zm, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, @@ -20013,8 +20059,9 @@ class new_integrate_interface_model final : public model_base_crtp::Constant(N, DUMMY_VAR__)); current_statement__ = 4; stan::model::assign(z, - stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable z"); + stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 6; stan::model::assign(z, stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -20145,8 +20192,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 39; stan::model::assign(z, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -20277,8 +20325,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 72; stan::model::assign(z, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -20409,8 +20458,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 105; stan::model::assign(z, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, @@ -20541,8 +20591,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 138; stan::model::assign(z, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -20673,8 +20724,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 171; stan::model::assign(z, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -20813,8 +20865,9 @@ class new_integrate_interface_model final : public model_base_crtp::Constant(N, DUMMY_VAR__)); current_statement__ = 402; stan::model::assign(zm, - stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable zm"); + stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 403; stan::model::assign(zm, stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -20945,8 +20998,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 436; stan::model::assign(zm, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, @@ -21077,8 +21131,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 469; stan::model::assign(zm, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, @@ -21209,8 +21264,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 502; stan::model::assign(zm, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, @@ -21341,8 +21397,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 535; stan::model::assign(zm, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, @@ -21473,8 +21530,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zm"); current_statement__ = 568; stan::model::assign(zm, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, @@ -21673,8 +21731,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 6; stan::model::assign(z, stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -21805,8 +21864,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 39; stan::model::assign(z, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -21937,8 +21997,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 72; stan::model::assign(z, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -22069,8 +22130,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 105; stan::model::assign(z, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, @@ -22201,8 +22263,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 138; stan::model::assign(z, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -22333,8 +22396,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable z"); current_statement__ = 171; stan::model::assign(z, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -22480,8 +22544,9 @@ class new_integrate_interface_model final : public model_base_crtp::quiet_NaN())); current_statement__ = 5; stan::model::assign(zg, - stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, id, rad, 1e-6, - 1e-6, 100, pstream__, rd, vd), "assigning variable zg"); + stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, + static_cast(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zg"); current_statement__ = 203; stan::model::assign(zg, stan::math::ode_bdf_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -22612,8 +22677,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zg"); current_statement__ = 236; stan::model::assign(zg, stan::math::ode_adams_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -22744,8 +22810,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, 1e-6, 1e-6, 100, pstream__, rd, vd), + "assigning variable zg"); current_statement__ = 269; stan::model::assign(zg, stan::math::ode_rk45_tol(f_variadic2_functor__(), vd, rd, rad, 1e-6, @@ -22876,8 +22943,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zg"); current_statement__ = 302; stan::model::assign(zg, stan::math::ode_rk45(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -23008,8 +23076,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zg"); current_statement__ = 335; stan::model::assign(zg, stan::math::ode_adams(f_variadic2_functor__(), vd, rd, rad, @@ -23140,8 +23209,9 @@ class new_integrate_interface_model final : public model_base_crtp(id), rad, pstream__, rd, vd), + "assigning variable zg"); current_statement__ = 368; stan::model::assign(zg, stan::math::ode_bdf(f_variadic2_functor__(), vd, rd, rad, pstream__, @@ -23881,7 +23951,8 @@ class old_integrate_interface_model final : public model_base_crtp(2, DUMMY_VAR__)); current_statement__ = 7; stan::model::assign(z, - stan::math::integrate_ode_bdf(dz_dt_functor__(), z_init, 0, ts, + stan::math::integrate_ode_bdf(dz_dt_functor__(), z_init, + static_cast(0), ts, std::vector{alpha, beta, gamma, delta}, stan::math::rep_array(0.0, 0), stan::math::rep_array(0, 0), pstream__, 1e-5, 1e-3, 5e2), "assigning variable z"); @@ -23984,7 +24055,8 @@ class old_integrate_interface_model final : public model_base_crtp(2, DUMMY_VAR__)); current_statement__ = 7; stan::model::assign(z, - stan::math::integrate_ode_bdf(dz_dt_functor__(), z_init, 0, ts, + stan::math::integrate_ode_bdf(dz_dt_functor__(), z_init, + static_cast(0), ts, std::vector{alpha, beta, gamma, delta}, stan::math::rep_array(0.0, 0), stan::math::rep_array(0, 0), pstream__, 1e-5, 1e-3, 5e2), "assigning variable z"); @@ -24109,7 +24181,8 @@ class old_integrate_interface_model final : public model_base_crtp(0), ts, std::vector{alpha, beta, gamma, delta}, stan::math::rep_array(0.0, 0), stan::math::rep_array(0, 0), pstream__, 1e-5, 1e-3, 5e2), "assigning variable z"); diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 19b745caf..388b73cd0 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -6960,7 +6960,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x) (Var y) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 98))) (Expression @@ -6969,7 +6969,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x) (Var y_p) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 99))) (Expression @@ -6986,7 +6986,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x_p) (Var y) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 101))) (Expression @@ -7003,7 +7003,8 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x_p) (Var y_p) (Var dat) (Var dat_int) (Var pstream__) - (Literal 0.01) (Literal 0.01) (Literal 10))) + (Literal 0.01) (Literal 0.01) + (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 103))) (Expression @@ -8116,7 +8117,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x) (Var y) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 98))) (Expression @@ -8125,7 +8126,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x) (Var y_p) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 99))) (Expression @@ -8142,7 +8143,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x_p) (Var y) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 101))) (Expression @@ -8159,7 +8160,8 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x_p) (Var y_p) (Var dat) (Var dat_int) (Var pstream__) - (Literal 0.01) (Literal 0.01) (Literal 10))) + (Literal 0.01) (Literal 0.01) + (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 103))) (Expression @@ -9441,7 +9443,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x) (Var y) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 98))) (Expression @@ -9450,7 +9452,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x) (Var y_p) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 99))) (Expression @@ -9467,7 +9469,7 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x_p) (Var y) (Var dat) (Var dat_int) (Var pstream__) (Literal 0.01) - (Literal 0.01) (Literal 10))) + (Literal 0.01) (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 101))) (Expression @@ -9484,7 +9486,8 @@ (FunCall stan::math::algebra_solver () ((FunCall algebra_system_functor__ () ()) (Var x_p) (Var y_p) (Var dat) (Var dat_int) (Var pstream__) - (Literal 0.01) (Literal 0.01) (Literal 10))) + (Literal 0.01) (Literal 0.01) + (FunCall static_cast (Double) ((Literal 10))))) (Literal "\"assigning variable theta_p\"")))) (Expression (Assign (Var current_statement__) (Literal 103))) (Expression diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 2e77a8700..78e753e0c 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -2210,8 +2210,8 @@ class ad_level_failing_model final : public model_base_crtp{beta, 1000000, gamma, xi, delta}, "assigning variable lcm_sym35__"); stan::model::assign(lcm_sym30__, - stan::math::integrate_ode_rk45(simple_SIR_functor__(), y0, 0, t, - lcm_sym35__, x_r, x_i, pstream__), + stan::math::integrate_ode_rk45(simple_SIR_functor__(), y0, + static_cast(0), t, lcm_sym35__, x_r, x_i, pstream__), "assigning variable lcm_sym30__"); stan::model::assign(y, lcm_sym30__, "assigning variable y"); } @@ -2333,8 +2333,8 @@ class ad_level_failing_model final : public model_base_crtp{beta, 1000000, gamma, xi, delta}, "assigning variable lcm_sym24__"); stan::model::assign(lcm_sym19__, - stan::math::integrate_ode_rk45(simple_SIR_functor__(), y0, 0, t, - lcm_sym24__, x_r, x_i, pstream__), + stan::math::integrate_ode_rk45(simple_SIR_functor__(), y0, + static_cast(0), t, lcm_sym24__, x_r, x_i, pstream__), "assigning variable lcm_sym19__"); stan::model::assign(y, lcm_sym19__, "assigning variable y"); } @@ -2474,8 +2474,9 @@ class ad_level_failing_model final : public model_base_crtp{beta, 1000000, gamma, xi, delta}, "assigning variable lcm_sym9__"); stan::model::assign(lcm_sym8__, - stan::math::integrate_ode_rk45(simple_SIR_functor__(), y0, 0, t, - lcm_sym9__, x_r, x_i, pstream__), "assigning variable lcm_sym8__"); + stan::math::integrate_ode_rk45(simple_SIR_functor__(), y0, + static_cast(0), t, lcm_sym9__, x_r, x_i, pstream__), + "assigning variable lcm_sym8__"); stan::model::assign(y, lcm_sym8__, "assigning variable y"); } current_statement__ = 5; diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 30d4e8941..e20eb4042 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -960,8 +960,9 @@ class ad_level_failing_model final : public model_base_crtp(0), t, theta, x_r, x_i, pstream__), + "assigning variable y"); } current_statement__ = 5; stan::math::check_greater_or_equal(function__, "y", y, 0); @@ -1059,8 +1060,9 @@ class ad_level_failing_model final : public model_base_crtp(0), t, theta, x_r, x_i, pstream__), + "assigning variable y"); } current_statement__ = 5; stan::math::check_greater_or_equal(function__, "y", y, 0); @@ -1178,8 +1180,9 @@ class ad_level_failing_model final : public model_base_crtp(0), t, theta, x_r, x_i, pstream__), + "assigning variable y"); } current_statement__ = 5; stan::math::check_greater_or_equal(function__, "y", y, 0); From 599774d7e64706519b3a113be8914b105b3e9e15 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 17:09:24 -0400 Subject: [PATCH 08/16] Always use improved logic rather than forward_as_tuple --- src/stan_math_backend/Lower_expr.ml | 41 +++++++------------ test/integration/good/code-gen/cpp.expected | 9 ++-- .../compiler-optimizations/cppO0.expected | 4 +- test/integration/good/tuples/cpp.expected | 30 ++++++++------ 4 files changed, 39 insertions(+), 45 deletions(-) diff --git a/src/stan_math_backend/Lower_expr.ml b/src/stan_math_backend/Lower_expr.ml index f67d3c008..4ac3d0efc 100644 --- a/src/stan_math_backend/Lower_expr.ml +++ b/src/stan_math_backend/Lower_expr.ml @@ -401,32 +401,21 @@ and lower_user_defined_fun f suffix es = and lower_compiler_internal ad ut f es = let open Expression_syntax in - let gen_tuple_literal es : expr = - let is_simple (e : Expr.Typed.t) = - match e.pattern with - | Var _ -> - (* Because the data members are [const], they can't be passed without more templating *) - e.meta.adlevel <> DataOnly - | Lit _ -> true - | Promotion ({pattern= Var _ | Lit _; _}, _, _) -> is_scalar e - | _ -> false in - if List.for_all ~f:is_simple es then - fun_call "std::forward_as_tuple" (lower_exprs es) - else - (* we make full copies of tuples - due to a lack of templating sophistication - in function generation *) - let types = - List.map es ~f:(fun {meta= {adlevel; type_; _}; _} -> - let base_type = lower_unsizedtype_local adlevel type_ in - if - UnsizedType.is_dataonlytype adlevel - && not - ( UnsizedType.is_scalar_type type_ - || UnsizedType.contains_tuple type_ ) - then Types.const_ref base_type - else base_type ) in - Constructor (Tuple types, lower_exprs es) in + let gen_tuple_literal (es : Expr.Typed.t list) : expr = + (* we make full copies of tuples + due to a lack of templating sophistication + in function generation *) + let types = + List.map es ~f:(fun {meta= {adlevel; type_; _}; _} -> + let base_type = lower_unsizedtype_local adlevel type_ in + if + UnsizedType.is_dataonlytype adlevel + && not + ( UnsizedType.is_scalar_type type_ + || UnsizedType.contains_tuple type_ ) + then Types.const_ref base_type + else base_type ) in + Constructor (Tuple types, lower_exprs es) in match f with | Internal_fun.FnMakeArray -> let ut = diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 975c38270..576ab317a 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -942,8 +942,9 @@ f(const T0__& x, try { current_statement__ = 9; return std::tuple>>(1, - std::vector>{std::forward_as_tuple( - 2, 3.4)}); + std::vector>{std::tuple(2, + 3.4)}); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -1045,8 +1046,8 @@ class complex_tuples_model final : public model_base_crtp current_statement__ = 8; stan::model::assign(d, std::tuple>>(1, 2.5, - std::vector>{std::forward_as_tuple(1, 2), - std::forward_as_tuple(3, 4)}), "assigning variable d"); + std::vector>{std::tuple(1, 2), + std::tuple(3, 4)}), "assigning variable d"); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 507b527f3..b5ae55ede 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -24952,7 +24952,7 @@ class partial_eval_tuple_model final : public model_base_crtp(x) = 0.4; { current_statement__ = 3; - lp_accum__.add(std::get<0>(std::forward_as_tuple(0.3, 3.5))); + lp_accum__.add(std::get<0>(std::tuple(0.3, 3.5))); current_statement__ = 4; lp_accum__.add(std::get<0>(x)); } @@ -24994,7 +24994,7 @@ class partial_eval_tuple_model final : public model_base_crtp(x) = 0.4; { current_statement__ = 3; - lp_accum__.add(std::get<0>(std::forward_as_tuple(0.3, 3.5))); + lp_accum__.add(std::get<0>(std::tuple(0.3, 3.5))); current_statement__ = 4; lp_accum__.add(std::get<0>(x)); } diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index b305a81fe..32b10a0cd 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -3005,7 +3005,8 @@ class infer_tuple_ad_model final : public model_base_crtp current_statement__ = 2; stan::model::assign(z, std::vector>{ - std::forward_as_tuple(1, x), std::forward_as_tuple(x, 1)}, + std::tuple(1, x), + std::tuple(x, 1)}, "assigning variable z"); } } catch (const std::exception& e) { @@ -3049,7 +3050,8 @@ class infer_tuple_ad_model final : public model_base_crtp current_statement__ = 2; stan::model::assign(z, std::vector>{ - std::forward_as_tuple(1, x), std::forward_as_tuple(x, 1)}, + std::tuple(1, x), + std::tuple(x, 1)}, "assigning variable z"); } } catch (const std::exception& e) { @@ -3332,7 +3334,7 @@ class simple_model final : public model_base_crtp { x = std::tuple{std::numeric_limits::quiet_NaN(), std::numeric_limits::min()}; current_statement__ = 1; - stan::model::assign(x, std::forward_as_tuple(3.14, 2), + stan::model::assign(x, std::tuple(3.14, 2), "assigning variable x"); current_statement__ = 2; if (pstream__) { @@ -4743,7 +4745,7 @@ std::tuple foo(std::ostream* pstream__) { (void) DUMMY_VAR__; try { current_statement__ = 8; - return std::forward_as_tuple(1.0, 2.0); + return std::tuple(1.0, 2.0); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -10100,7 +10102,7 @@ class tuple_promotion_model final : public model_base_crtp{std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN()}; current_statement__ = 7; - stan::model::assign(x, std::forward_as_tuple(y, 3), + stan::model::assign(x, std::tuple(y, 3), "assigning variable x"); std::tuple, double> z = std::tuple, double>{std::complex( @@ -12442,8 +12444,9 @@ class tuple_lpdf_model final : public model_base_crtp { (void) function__; try { current_statement__ = 1; - lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), - std::forward_as_tuple(1.2, 1.5, 4.5), pstream__)); + lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), + std::tuple(1.2, 1.5, 4.5), + pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -12475,8 +12478,9 @@ class tuple_lpdf_model final : public model_base_crtp { (void) function__; try { current_statement__ = 1; - lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), - std::forward_as_tuple(1.2, 1.5, 4.5), pstream__)); + lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), + std::tuple(1.2, 1.5, 4.5), + pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -12786,7 +12790,7 @@ class tuple_lpdf2_model final : public model_base_crtp { (void) function__; try { current_statement__ = 1; - lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), + lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); @@ -12819,7 +12823,7 @@ class tuple_lpdf2_model final : public model_base_crtp { (void) function__; try { current_statement__ = 1; - lp_accum__.add(foo_lpdf(std::forward_as_tuple(1.5, 2), + lp_accum__.add(foo_lpdf(std::tuple(1.5, 2), pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); @@ -13134,7 +13138,7 @@ class tuple_lpmf_model final : public model_base_crtp { (void) function__; try { current_statement__ = 1; - lp_accum__.add(foo_lpmf(std::forward_as_tuple(1, 3), 0.5, + lp_accum__.add(foo_lpmf(std::tuple(1, 3), 0.5, pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); @@ -13167,7 +13171,7 @@ class tuple_lpmf_model final : public model_base_crtp { (void) function__; try { current_statement__ = 1; - lp_accum__.add(foo_lpmf(std::forward_as_tuple(1, 3), 0.5, + lp_accum__.add(foo_lpmf(std::tuple(1, 3), 0.5, pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); From 5acf9b3baa7f5d790f31c457da1c4de101e1b499 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 19:03:34 -0400 Subject: [PATCH 09/16] More template fixes --- src/frontend/Ast_to_Mir.ml | 18 +++++++++++++----- src/stan_math_backend/Lower_functions.ml | 10 +++++----- .../good/code-gen/complex_numbers/cpp.expected | 12 ++++++------ test/integration/good/code-gen/cpp.expected | 6 +++--- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index 06b9ffb6c..f3b8908ad 100644 --- a/src/frontend/Ast_to_Mir.ml +++ b/src/frontend/Ast_to_Mir.ml @@ -143,10 +143,17 @@ let truncate_dist ud_dists (id : Ast.identifier) , Some y ) } in let funapp meta kind name args = Expr.{Fixed.pattern= FunApp (trans_fn_kind kind name, args); meta} in + let ensure_type tp lb : Expr.Typed.t = + match (tp, Expr.Typed.type_of lb) with + | UnsizedType.UInt, _ -> lb + | _, UInt -> + { pattern= Promotion (lb, UReal, lb.meta.adlevel) + ; meta= {lb.meta with type_= UReal} } + | _ -> lb in let inclusive_bound tp (lb : Expr.Typed.t) = if UnsizedType.is_int_type tp then Expr.Helpers.binop lb Minus Expr.Helpers.one - else lb in + else ensure_type tp lb in let size_adjust e = if (not (UnsizedType.is_container ast_obs.Ast.emeta.type_)) @@ -172,18 +179,19 @@ let truncate_dist ud_dists (id : Ast.identifier) (funapp lb.meta fk fn (inclusive_bound tp lb :: trans_exprs ast_args) ) ) ) ] | TruncateDownFrom ub -> - let fk, fn, _ = find_function_info cdf_suffices in + let fk, fn, tp = find_function_info cdf_suffices in let ub = trans_expr ub in [ trunc Greater "max" ub (targetme ub.meta.loc - (size_adjust (funapp ub.meta fk fn (ub :: trans_exprs ast_args))) ) - ] + (size_adjust + (funapp ub.meta fk fn + (ensure_type tp ub :: trans_exprs ast_args) ) ) ) ] | TruncateBetween (lb, ub) -> let fk, fn, tp = find_function_info cdf_suffices in let lb, ub = (trans_expr lb, trans_expr ub) in let expr args = funapp ub.meta (Ast.StanLib FnPlain) "log_diff_exp" - [ funapp ub.meta fk fn (ub :: args) + [ funapp ub.meta fk fn (ensure_type tp ub :: args) ; funapp ub.meta fk fn (inclusive_bound tp lb :: args) ] in let statement = match diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 0490baaf1..6ab2855ac 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -95,11 +95,11 @@ let return_optional_arg_types (args : Program.fun_arg_decl) = (internal : UnsizedType.t) (ad : UnsizedType.autodifftype)] ) | UnsizedType.DataOnly, ut when not (UnsizedType.is_eigen_type ut) -> [] - | _, UnsizedType.UArray _ -> [sprintf "stan::base_type_t<%s%d__>" start i] - | _ -> - if UnsizedType.is_eigen_type typ then - [sprintf "stan::base_type_t<%s%d__>" start i] - else [sprintf "%s%d__" start i] in + | ( _ + , ( UnsizedType.UArray _ | UComplex | UVector | URowVector | UMatrix + | UComplexRowVector | UComplexVector | UComplexMatrix ) ) -> + [sprintf "stan::base_type_t<%s%d__>" start i] + | _ -> [sprintf "%s%d__" start i] in List.mapi args ~f:(fun i (ad, _, ty) -> template_p "T" i (ad, ty)) (** Print template arguments for C++ functions that need templates diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index d0c410b20..a09c730c4 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -7224,7 +7224,7 @@ template >, std::is_floating_point< stan::base_type_t>>>* = nullptr> -std::decay_t> +std::decay_t>> foo1(const T0__& z, std::ostream* pstream__); template , @@ -7237,7 +7237,7 @@ template >, std::is_floating_point< stan::base_type_t>>>* = nullptr> -std::complex>> +std::complex>>> foo3(const T0__& z, std::ostream* pstream__); std::vector> foo4(std::ostream* pstream__); template >, std::is_floating_point< stan::base_type_t>>>*> -std::decay_t> +std::decay_t>> foo1(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7376,9 +7376,9 @@ template >, std::is_floating_point< stan::base_type_t>>>*> -std::complex>> +std::complex>>> foo3(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 576ab317a..a3a7073a1 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -28341,7 +28341,7 @@ template >, std::is_floating_point< stan::base_type_t>>>* = nullptr> -std::complex>> +std::complex>>> ident(const T0__& x, std::ostream* pstream__); template , @@ -28357,9 +28357,9 @@ template >, std::is_floating_point< stan::base_type_t>>>*> -std::complex>> +std::complex>>> ident(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = std::decay_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; From 2704f13cf7725377089e53056dd035c865bed6e9 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 09:33:45 -0400 Subject: [PATCH 10/16] SoA: Properly demote matrices used inside of tuples --- .../Memory_patterns.ml | 20 +- .../mem_patterns/cpp.expected | 509 +++++++++++++ .../mem_patterns/transformed_mir.expected | 682 ++++++++++++++++++ .../mem_patterns/tuple_test2.stan | 11 + 4 files changed, 1212 insertions(+), 10 deletions(-) create mode 100644 test/integration/good/compiler-optimizations/mem_patterns/tuple_test2.stan diff --git a/src/analysis_and_optimization/Memory_patterns.ml b/src/analysis_and_optimization/Memory_patterns.ml index 281bfc575..80321e662 100644 --- a/src/analysis_and_optimization/Memory_patterns.ml +++ b/src/analysis_and_optimization/Memory_patterns.ml @@ -189,17 +189,17 @@ and query_initial_demotable_funs (in_loop : bool) (acc : string Set.Poly.t) match is_fun_soa_supported name exprs with | true -> Set.Poly.union acc demoted_eigen_names | false -> Set.Poly.union acc demoted_and_top_level_names ) ) - | CompilerInternal (Internal_fun.FnMakeArray | FnMakeRowVec) -> + | CompilerInternal (Internal_fun.FnMakeArray | FnMakeRowVec | FnMakeTuple) -> Set.Poly.union acc demoted_and_top_level_names | CompilerInternal (_ : 'a Internal_fun.t) -> acc | UserDefined ((_ : string), (_ : bool Fun_kind.suffix)) -> Set.Poly.union acc demoted_and_top_level_names -(** - * Recurse through subexpressions and return a list of Unsized types. - * Recursion continues until - * 1. A non-autodiffable type is found - * 2. An autodiffable scalar is found +(** + * Recurse through subexpressions and return a list of Unsized types. + * Recursion continues until + * 1. A non-autodiffable type is found + * 2. An autodiffable scalar is found * 3. A `Var` type is found that is an autodiffable matrix *) let rec extract_nonderived_admatrix_types @@ -225,11 +225,11 @@ let rec extract_nonderived_admatrix_types else [(adlevel, type_)] (** - * Recurse through functions to find nonderived ad matrix types. - * Special cases for StanLib functions are for + * Recurse through functions to find nonderived ad matrix types. + * Special cases for StanLib functions are for * - `check_matching_dims`: compiler function that has no effect on optimization - * - `rep_*vector` These are templated in the C++ to cast up to `Var` types - * - `rep_matrix`. When it's only a scalar being propogated an math library overload can upcast to `Var` + * - `rep_*vector` These are templated in the C++ to cast up to `Var` types + * - `rep_matrix`. When it's only a scalar being propogated an math library overload can upcast to `Var` *) and extract_nonderived_admatrix_types_fun (kind : 'a Fun_kind.t) (exprs : Expr.Typed.t list) = diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index f1205d3dd..c1e6d8bee 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -10435,4 +10435,513 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return tuple_test_model_namespace::profiles__; } +#endif + $ ../../../../../../install/default/bin/stanc -fsoa --print-cpp tuple_test2.stan +// Code generated by %%NAME%% %%VERSION%% +#include +namespace tuple_test2_model_namespace { +using stan::model::model_base_crtp; +using namespace stan::math; +stan::math::profile_map profiles__; +static constexpr std::array locations_array__ = + {" (found before start of program)", + " (in 'tuple_test2.stan', line 5, column 2 to column 22)", + " (in 'tuple_test2.stan', line 8, column 2 to column 56)", + " (in 'tuple_test2.stan', line 9, column 2 to column 16)", + " (in 'tuple_test2.stan', line 10, column 2 to column 16)", + " (in 'tuple_test2.stan', line 2, column 2 to column 17)"}; +class tuple_test2_model final : public model_base_crtp { + private: + Eigen::Matrix x_data__; + Eigen::Map> x{nullptr, 0, 0}; + public: + ~tuple_test2_model() {} + tuple_test2_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* pstream__ = nullptr) + : model_base_crtp(0) { + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + using local_scalar_t__ = double; + boost::ecuyer1988 base_rng__ = + stan::services::util::create_rng(random_seed__, 0); + // suppress unused var warning + (void) base_rng__; + static constexpr const char* function__ = + "tuple_test2_model_namespace::tuple_test2_model"; + // suppress unused var warning + (void) function__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 5; + context__.validate_dims("data initialization", "x", "double", + std::vector{static_cast(2), static_cast(2)}); + x_data__ = Eigen::Matrix::Constant(2, 2, + std::numeric_limits::quiet_NaN()); + new (&x) Eigen::Map>(x_data__.data(), 2, 2); + { + std::vector x_flat__; + current_statement__ = 5; + x_flat__ = context__.vals_r("x"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 2; ++sym2__) { + stan::model::assign(x, x_flat__[(pos__ - 1)], + "assigning variable x", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + num_params_r__ = (3 * 3) + (3 * 3); + } + inline std::string model_name() const final { + return "tuple_test2_model"; + } + inline std::vector model_compile_info() const noexcept { + return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", + "stancflags = -fsoa --print-cpp"}; + } + // Base log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_not_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_test2_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m1 = in__.template read>(3, 3); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m2 = in__.template read>(3, 3); + { + std::tuple, + Eigen::Matrix> temp = + std::tuple, + Eigen::Matrix>{Eigen::Matrix::Constant(2, + 2, DUMMY_VAR__), + Eigen::Matrix::Constant(3, 3, + DUMMY_VAR__)}; + current_statement__ = 2; + stan::model::assign(temp, + std::tuple&, + Eigen::Matrix>(x, + stan::math::multiply(m1, m2)), "assigning variable temp"); + current_statement__ = 3; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(temp)); + *(pstream__) << std::endl; + } + current_statement__ = 4; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(temp)); + *(pstream__) << std::endl; + } + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + // Reverse mode autodiff log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "tuple_test2_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m1 = in__.template read>(3, 3); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + m2 = in__.template read>(3, 3); + { + std::tuple, + Eigen::Matrix> temp = + std::tuple, + Eigen::Matrix>{Eigen::Matrix::Constant(2, + 2, DUMMY_VAR__), + Eigen::Matrix::Constant(3, 3, + DUMMY_VAR__)}; + current_statement__ = 2; + stan::model::assign(temp, + std::tuple&, + Eigen::Matrix>(x, + stan::math::multiply(m1, m2)), "assigning variable temp"); + current_statement__ = 3; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(temp)); + *(pstream__) << std::endl; + } + current_statement__ = 4; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(temp)); + *(pstream__) << std::endl; + } + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + template * = nullptr, stan::require_vector_like_vt* = nullptr, stan::require_vector_vt* = nullptr> + inline void + write_array_impl(RNG& base_rng__, VecR& params_r__, VecI& params_i__, + VecVar& vars__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true, std::ostream* + pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + double lp__ = 0.0; + // suppress unused var warning + (void) lp__; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + stan::math::accumulator lp_accum__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + constexpr bool jacobian__ = false; + // suppress unused var warning + (void) jacobian__; + static constexpr const char* function__ = + "tuple_test2_model_namespace::write_array"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, + std::numeric_limits::quiet_NaN()); + current_statement__ = 1; + m1 = in__.template read>(3, 3); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, + std::numeric_limits::quiet_NaN()); + current_statement__ = 1; + m2 = in__.template read>(3, 3); + out__.write(m1); + out__.write(m2); + if (stan::math::logical_negation( + (stan::math::primitive_value(emit_transformed_parameters__) || + stan::math::primitive_value(emit_generated_quantities__)))) { + return ; + } + if (stan::math::logical_negation(emit_generated_quantities__)) { + return ; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr, + stan::require_vector_like_vt* = nullptr> + inline void + unconstrain_array_impl(const VecVar& params_r__, const VecI& params_i__, + VecVar& vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + stan::model::assign(m1, + in__.read>(3, 3), + "assigning variable m1"); + out__.write(m1); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + current_statement__ = 1; + stan::model::assign(m2, + in__.read>(3, 3), + "assigning variable m2"); + out__.write(m2); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr> + inline void + transform_inits_impl(const stan::io::var_context& context__, VecVar& + vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "m1", "double", + std::vector{static_cast(3), static_cast(3)}); + current_statement__ = 1; + context__.validate_dims("parameter initialization", "m2", "double", + std::vector{static_cast(3), static_cast(3)}); + int pos__ = std::numeric_limits::min(); + pos__ = 1; + Eigen::Matrix m1 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + { + std::vector m1_flat__; + current_statement__ = 1; + m1_flat__ = context__.vals_r("m1"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + stan::model::assign(m1, m1_flat__[(pos__ - 1)], + "assigning variable m1", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + out__.write(m1); + Eigen::Matrix m2 = + Eigen::Matrix::Constant(3, 3, DUMMY_VAR__); + { + std::vector m2_flat__; + current_statement__ = 1; + m2_flat__ = context__.vals_r("m2"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + stan::model::assign(m2, m2_flat__[(pos__ - 1)], + "assigning variable m2", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + out__.write(m2); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + inline void + get_param_names(std::vector& names__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + names__ = std::vector{"m1", "m2"}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + get_dims(std::vector>& dimss__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + dimss__ = std::vector>{std::vector{static_cast< + size_t>(3), + static_cast(3)}, + std::vector{static_cast(3), + static_cast(3)}}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + constrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m1" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m2" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + unconstrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m1" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + for (int sym1__ = 1; sym1__ <= 3; ++sym1__) { + for (int sym2__ = 1; sym2__ <= 3; ++sym2__) { + param_names__.emplace_back(std::string() + "m2" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline std::string get_constrained_sizedtypes() const { + return std::string("[{\"name\":\"m1\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"},{\"name\":\"m2\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"}]"); + } + inline std::string get_unconstrained_sizedtypes() const { + return std::string("[{\"name\":\"m1\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"},{\"name\":\"m2\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(3) + ",\"cols\":" + std::to_string(3) + "},\"block\":\"parameters\"}]"); + } + // Begin method overload boilerplate + template inline void + write_array(RNG& base_rng, Eigen::Matrix& params_r, + Eigen::Matrix& vars, const bool + emit_transformed_parameters = true, const bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = ((3 * 3) + (3 * 3)); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + std::vector params_i; + vars = Eigen::Matrix::Constant(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline void + write_array(RNG& base_rng, std::vector& params_r, std::vector& + params_i, std::vector& vars, bool + emit_transformed_parameters = true, bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = ((3 * 3) + (3 * 3)); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + vars = std::vector(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline T_ + log_prob(Eigen::Matrix& params_r, std::ostream* pstream = nullptr) const { + Eigen::Matrix params_i; + return log_prob_impl(params_r, params_i, pstream); + } + template inline T_ + log_prob(std::vector& params_r, std::vector& params_i, + std::ostream* pstream = nullptr) const { + return log_prob_impl(params_r, params_i, pstream); + } + inline void + transform_inits(const stan::io::var_context& context, + Eigen::Matrix& params_r, std::ostream* + pstream = nullptr) const final { + std::vector params_r_vec(params_r.size()); + std::vector params_i; + transform_inits(context, params_i, params_r_vec, pstream); + params_r = Eigen::Map>(params_r_vec.data(), + params_r_vec.size()); + } + inline void + transform_inits(const stan::io::var_context& context, std::vector& + params_i, std::vector& vars, std::ostream* + pstream__ = nullptr) const { + vars.resize(num_params_r__); + transform_inits_impl(context, vars, pstream__); + } + inline void + unconstrain_array(const std::vector& params_constrained, + std::vector& params_unconstrained, std::ostream* + pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = std::vector(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } + inline void + unconstrain_array(const Eigen::Matrix& params_constrained, + Eigen::Matrix& params_unconstrained, + std::ostream* pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = Eigen::Matrix::Constant(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } +}; +} +using stan_model = tuple_test2_model_namespace::tuple_test2_model; +#ifndef USING_R +// Boilerplate +stan::model::model_base& +new_model(stan::io::var_context& data_context, unsigned int seed, + std::ostream* msg_stream) { + stan_model* m = new stan_model(data_context, seed, msg_stream); + return *m; +} +stan::math::profile_map& get_stan_profile_data() { + return tuple_test2_model_namespace::profiles__; +} #endif diff --git a/test/integration/good/compiler-optimizations/mem_patterns/transformed_mir.expected b/test/integration/good/compiler-optimizations/mem_patterns/transformed_mir.expected index c675b30d0..32f3aaf2e 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/transformed_mir.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/transformed_mir.expected @@ -21982,3 +21982,685 @@ matrix[1, 1] x: AoS ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) (out_block TransformedParameters) (out_trans Identity))))) (prog_name tuple_test_model) (prog_path tuple_test.stan)) + $ ../../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir --debug-mem-patterns tuple_test2.stan +matrix[3, 3] m1: AoS +matrix[3, 3] m2: AoS +tuple(matrix[2, 2], matrix[3, 3]) temp: AoS +((functions_block ()) + (input_vars + ((x + ((begin_loc + ((filename tuple_test2.stan) (line_num 2) (col_num 2) (included_from ()))) + (end_loc ((filename tuple_test2.stan) (line_num 2) (col_num 17) (included_from ())))) + (SMatrix AoS + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (prepare_data + (((pattern + (Decl (decl_adtype DataOnly) (decl_id pos__) (decl_type (Sized SInt)) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id x) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id x_flat__) + (decl_type (Unsized (UArray UReal))) (initialize false))) + (meta )) + ((pattern + (Assignment ((LVariable x_flat__) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + ((LVariable x) + ((Single + ((pattern (Var sym2__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + UMatrix + ((pattern + (Indexed + ((pattern (Var x_flat__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )))) + (log_prob + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype (TupleAD (AutoDiffable AutoDiffable))) (decl_id temp) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SMatrix AoS + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp) ()) (UTuple (UMatrix UMatrix)) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var temp)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var temp)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (reverse_mode_log_prob + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype (TupleAD (AutoDiffable AutoDiffable))) (decl_id temp) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SMatrix AoS + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp) ()) (UTuple (UMatrix UMatrix)) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern (Var m1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))) + ((pattern (Var m2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var temp)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var temp)) + (meta + ((type_ (UTuple (UMatrix UMatrix))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 2)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (generate_quantities + (((pattern + (Decl (decl_adtype DataOnly) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (Decl (decl_adtype DataOnly) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp + (CompilerInternal + (FnReadParam (constrain Identity) + (dims + (((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (mem_pattern AoS))) + ())) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt ()) + (var + ((pattern (Var m1)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt ()) + (var + ((pattern (Var m2)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern + (EOr + ((pattern (Var emit_transformed_parameters__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )) + ((pattern + (IfElse + ((pattern + (FunApp (StanLib PNot__ FnPlain AoS) + (((pattern (Var emit_generated_quantities__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Block (((pattern (Return ())) (meta ))))) (meta )) ())) + (meta )))) + (transform_inits + (((pattern + (Decl (decl_adtype DataOnly) (decl_id pos__) (decl_type (Sized SInt)) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1_flat__) + (decl_type (Unsized (UArray UReal))) (initialize false))) + (meta )) + ((pattern + (Assignment ((LVariable m1_flat__) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str m1)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + ((LVariable m1) + ((Single + ((pattern (Var sym2__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + UMatrix + ((pattern + (Indexed + ((pattern (Var m1_flat__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m1)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Block + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2_flat__) + (decl_type (Unsized (UArray UReal))) (initialize false))) + (meta )) + ((pattern + (Assignment ((LVariable m2_flat__) ()) (UArray UReal) + ((pattern + (FunApp (CompilerInternal FnReadData) + (((pattern (Lit Str m2)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern (Lit Int 1)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (For (loopvar sym1__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (For (loopvar sym2__) + (lower + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (upper + ((pattern (Lit Int 3)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (body + ((pattern + (Block + (((pattern + (Assignment + ((LVariable m2) + ((Single + ((pattern (Var sym2__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Var sym1__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + UMatrix + ((pattern + (Indexed + ((pattern (Var m2_flat__)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Assignment ((LVariable pos__) ()) UInt + ((pattern + (FunApp (StanLib Plus__ FnPlain AoS) + (((pattern (Var pos__)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta ))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m2)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )))) + (unconstrain_array + (((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m1) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m1) ()) UMatrix + ((pattern + (FunApp (CompilerInternal FnReadDeserializer) + (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m1)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )) + ((pattern + (Decl (decl_adtype AutoDiffable) (decl_id m2) + (decl_type + (Sized + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable m2) ()) UMatrix + ((pattern + (FunApp (CompilerInternal FnReadDeserializer) + (((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable)))))) + (meta )) + ((pattern + (NRFunApp + (CompilerInternal + (FnWriteParam (unconstrain_opt (Identity)) + (var + ((pattern (Var m2)) (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + ())) + (meta )))) + (output_vars + ((m1 + ((begin_loc + ((filename tuple_test2.stan) (line_num 5) (col_num 2) (included_from ()))) + (end_loc ((filename tuple_test2.stan) (line_num 5) (col_num 22) (included_from ())))) + ((out_unconstrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_constrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_block Parameters) (out_trans Identity))) + (m2 + ((begin_loc + ((filename tuple_test2.stan) (line_num 5) (col_num 2) (included_from ()))) + (end_loc ((filename tuple_test2.stan) (line_num 5) (col_num 22) (included_from ())))) + ((out_unconstrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_constrained_st + (SMatrix AoS + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) + (out_block Parameters) (out_trans Identity))))) + (prog_name tuple_test2_model) (prog_path tuple_test2.stan)) diff --git a/test/integration/good/compiler-optimizations/mem_patterns/tuple_test2.stan b/test/integration/good/compiler-optimizations/mem_patterns/tuple_test2.stan new file mode 100644 index 000000000..d4c85876e --- /dev/null +++ b/test/integration/good/compiler-optimizations/mem_patterns/tuple_test2.stan @@ -0,0 +1,11 @@ +data { + matrix[2, 2] x; +} +parameters { + matrix[3, 3] m1, m2; +} +model { + tuple(matrix[2, 2], matrix[3, 3]) temp = (x, m1 * m2); + print(temp.1); + print(temp.2); +} From 2f6e50805b6013738e4b8d7d2631332e89b3c527 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 09:47:57 -0400 Subject: [PATCH 11/16] Add Stan signatures as comments in C++ --- src/stan_math_backend/Lower_functions.ml | 27 ++- .../cli-args/allow-undefined/cpp.expected | 1 + .../allow-undefined/standalone-cpp.expected | 1 + .../code-gen/complex_numbers/cpp.expected | 19 ++ test/integration/good/code-gen/cpp.expected | 197 ++++++++++++++++++ .../good/code-gen/expressions/cpp.expected | 4 + test/integration/good/code-gen/lir.expected | 82 ++++++++ .../good/code-gen/ode/cpp.expected | 5 + .../standalone_functions/cpp.expected | 25 +++ .../good/compiler-optimizations/cpp.expected | 48 +++++ .../compiler-optimizations/cppO0.expected | 48 +++++ .../compiler-optimizations/cppO1.expected | 48 +++++ .../mem_patterns/cpp.expected | 8 + test/integration/good/tuples/cpp.expected | 17 ++ 14 files changed, 522 insertions(+), 8 deletions(-) diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 6ab2855ac..e1d731286 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -110,6 +110,7 @@ let template_parameters (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = match (ad, fst (UnsizedType.unwind_array_type typ)) with | _, UTuple tys -> + (* TODO/future: use [std::tuple_element] to fully templatize tuples *) let temps, reqs, sclrs = List.map ~f:(fun ty -> (ad, ty)) tys |> List.mapi ~f:(template_p (sprintf "%s%d__" start i)) @@ -280,7 +281,13 @@ let extra_suffix_args fdsuffix = let lower_fun_def (functors : Lower_expr.variadic list) Program.{fdrt; fdname; fdsuffix; fdargs; fdbody; _} : - fun_defn * struct_defn list = + defn * fun_defn * struct_defn list = + let comment = + GlobalComment + Fmt.( + str "%a %s(@[%a@])" UnsizedType.pp_returntype fdrt fdname + (list ~sep:comma UnsizedType.pp_fun_arg) + (List.map ~f:(fun (ad, _id, ty) -> (ad, ty)) fdargs)) in let extra_arg_names, extra_template_names = extra_suffix_args fdsuffix in let template_parameter_and_arg_names is_possibly_eigen_expr variadic_fun_type = @@ -340,7 +347,7 @@ let lower_fun_def (functors : Lower_expr.variadic list) ~args:cpp_args ~cv_qualifiers:[Const] ~body:defn_body () in make_struct_defn ~param:struct_template ~name:functor_name ~body:[FunDef functor_decl] () in - (fd, functors |> List.map ~f:register_functor) + (comment, fd, functors |> List.map ~f:register_functor) let get_functor_requirements (p : Program.Numbered.t) = let open Expr.Fixed in @@ -376,24 +383,24 @@ let collect_functors_functions (p : Program.Numbered.t) : defn list = |> List.stable_dedup |> List.filter_map ~f:(fun (hof, types) -> if matching_argtypes d types then Some hof else None ) in - let fn, st = lower_fun_def functors d in + let comment, fn, st = lower_fun_def functors d in List.iter st ~f:(fun s -> (* Side effecting, collates functor structs *) Hashtbl.update structs s.struct_name ~f:(function | Some x -> {x with body= x.body @ s.body} | None -> s ) ) ; - fn in + (comment, fn) in let fun_decls, fun_defns = p.functions_block |> List.filter_map ~f:(fun d -> - let fn = register_functors d in + let comment, fn = register_functors d in if Option.is_none d.fdbody then None else let decl, defn = Cpp.split_fun_decl_defn fn in - Some (FunDef decl, FunDef defn) ) + Some (FunDef decl, [comment; FunDef defn]) ) |> List.unzip in let structs = Hashtbl.data structs |> List.map ~f:(fun s -> Struct s) in - fun_decls @ structs @ fun_defns + fun_decls @ structs @ List.concat fun_defns let lower_standalone_fun_def namespace_fun Program.{fdname; fdsuffix; fdargs; fdrt; _} = @@ -437,7 +444,9 @@ module Testing = struct open Fmt let pp_fun_def_test ppf a = - let defn, st = lower_fun_def [FixedArgs] a in + let comment, defn, st = lower_fun_def [FixedArgs] a in + Cpp.Printing.pp_defn ppf comment ; + cut ppf () ; Cpp.Printing.pp_fun_defn ppf defn ; cut ppf () ; (list ~sep:cut Cpp.Printing.pp_struct_defn) ppf st @@ -464,6 +473,7 @@ module Testing = struct |> print_endline ; [%expect {| + // void sars(data matrix, row_vector) template , stan::is_vt_not_complex, @@ -526,6 +536,7 @@ module Testing = struct |> print_endline ; [%expect {| + // matrix sars(data matrix, row_vector, row_vector, array[] matrix) template , stan::is_vt_not_complex, diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index d4458f297..78d7f4289 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -25,6 +25,7 @@ struct external_map_rectable_functor__ { return external_map_rectable(phi, theta, x_r, x_i, pstream__); } }; +// real internal_fun(data array[,] real, data array[,] int) double internal_fun(const std::vector>& a, const std::vector>& d, std::ostream* pstream__) { diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index 57136050a..1250622da 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -25,6 +25,7 @@ struct external_map_rectable_functor__ { return external_map_rectable(phi, theta, x_r, x_i, pstream__); } }; +// real internal_fun(data array[,] real, data array[,] int) double internal_fun(const std::vector>& a, const std::vector>& d, std::ostream* pstream__) { diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index a09c730c4..62e6f59cd 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -7304,6 +7304,7 @@ std::vector< std::vector< std::complex>>>>> foo10(const T0__& z, std::ostream* pstream__); +// complex foo() std::complex foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -7323,6 +7324,7 @@ std::complex foo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo1(complex) template , stan::math::disjunction, std::is_floating_point>>*> @@ -7370,6 +7373,7 @@ foo2(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// complex foo3(complex) template , stan::math::disjunction> foo4(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -7418,6 +7423,7 @@ std::vector> foo4(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo5(array[] complex) template , stan::is_complex>, @@ -7446,6 +7452,7 @@ foo5(const T0__& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] complex foo6(real) template , std::is_floating_point>>*> @@ -7470,6 +7477,7 @@ foo6(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] complex foo7(array[] complex) template , stan::is_complex>, @@ -7499,6 +7507,7 @@ foo7(const T0__& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo8(array[,] complex) template , stan::is_std_vector>, @@ -7530,6 +7539,7 @@ foo8(const T0__& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[,] complex foo9(real) template , std::is_floating_point>>*> @@ -7563,6 +7573,7 @@ foo9(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[,] complex foo10(array[,] complex) template , stan::is_std_vector>, @@ -10525,6 +10536,7 @@ template >>,-1,-1>> foo(const T0__& A, std::ostream* pstream__); +// complex_matrix foo(complex_matrix) template , stan::is_vt_complex>*> @@ -10548,6 +10560,7 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix foo(matrix) template , stan::is_vt_not_complex>*> @@ -10573,6 +10586,7 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// complex_vector foo(complex_vector) template , stan::is_vt_complex>*> @@ -10596,6 +10610,7 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -10621,6 +10636,7 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// complex_row_vector foo(complex_row_vector) template , stan::is_vt_complex>*> @@ -10644,6 +10660,7 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// row_vector foo(row_vector) template , stan::is_vt_not_complex>*> @@ -10669,6 +10686,7 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] complex_matrix foo(array[] complex_matrix) template , stan::is_eigen_matrix_dynamic>, @@ -10693,6 +10711,7 @@ foo(const T0__& Z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] matrix foo(array[] matrix) template , stan::is_eigen_matrix_dynamic>, diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index a3a7073a1..863e8877a 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -915,6 +915,11 @@ f(const T0__& x, std::vector< std::tuple>, T1__1__>>>& x2, std::ostream* pstream__); +/* tuple(int, array[] tuple(int, real)) f(int, + array[,] tuple(array[] tuple(int, + int), + array[,] int)) + */ template , @@ -2153,6 +2158,7 @@ void _stan_catch(std::ostream* pstream__); void _stan_char(std::ostream* pstream__); void _stan_char16_t(std::ostream* pstream__); void _stan_char32_t(std::ostream* pstream__); +// void _stan_alignas(int) template >*> void _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -2166,6 +2172,7 @@ _stan_alignas(const T0__& _stan_asm, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_alignof(int) template >*> void _stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -2179,6 +2186,7 @@ _stan_alignof(const T0__& _stan_char, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// int _stan_and(int) template >*> int _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -2198,6 +2206,7 @@ _stan_and(const T0__& _stan_STAN_MAJOR, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void _stan_and_eq(real) template , std::is_floating_point>>*> @@ -2213,6 +2222,7 @@ void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_asm(vector) template , stan::is_vt_not_complex>*> @@ -2229,6 +2239,7 @@ void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_bitand(int) template >*> void _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -2242,6 +2253,7 @@ _stan_bitand(const T0__& _stan_constexpr, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_bitor() void _stan_bitor(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -2254,6 +2266,7 @@ void _stan_bitor(std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_bool() void _stan_bool(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -2266,6 +2279,7 @@ void _stan_bool(std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_case() void _stan_case(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -2278,6 +2292,7 @@ void _stan_case(std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_catch() void _stan_catch(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -2290,6 +2305,7 @@ void _stan_catch(std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_char() void _stan_char(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -2302,6 +2318,7 @@ void _stan_char(std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_char16_t() void _stan_char16_t(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -2314,6 +2331,7 @@ void _stan_char16_t(std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; } +// void _stan_char32_t() void _stan_char32_t(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -3779,6 +3797,7 @@ template , std::is_floating_point>>* = nullptr> void bar(const T0__& x, const T1__& y, std::ostream* pstream__); +// real foo(real, real) template , std::is_floating_point>, @@ -3803,6 +3822,7 @@ foo(const T0__& x, const T1__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void bar(real, real) template , std::is_floating_point>, @@ -6446,6 +6466,7 @@ struct binomialf_functor__ { return binomialf(phi, theta, x_r, x_i, pstream__); } }; +// int foo(int) template >*> int foo(const T0__& n, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -6470,6 +6491,9 @@ foo(const T0__& n, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* array[] real sho(real, array[] real, array[] real, data array[] real, + data array[] int) + */ template , std::is_floating_point>, @@ -6520,6 +6544,7 @@ sho(const T0__& t, const T1__& y, const T2__& theta, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_bar0() double foo_bar0(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -6538,6 +6563,7 @@ double foo_bar0(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_bar1(real) template , std::is_floating_point>>*> @@ -6560,6 +6586,7 @@ foo_bar1(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_bar2(real, real) template , std::is_floating_point>, @@ -6584,6 +6611,7 @@ foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_lpmf(int, real) template , stan::math::disjunction, @@ -6604,6 +6632,7 @@ foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_lcdf(int, real) template , stan::math::disjunction, @@ -6627,6 +6656,7 @@ foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_lccdf(int, real) template , stan::math::disjunction, @@ -6650,6 +6680,7 @@ foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_rng(real, real) template , std::is_floating_point>, @@ -6675,6 +6706,7 @@ foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void unit_normal_lp(real) template , @@ -6698,6 +6730,7 @@ unit_normal_lp(const T0__& u, T_lp__& lp__, T_lp_accum__& lp_accum__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int foo_1(int) template >*> int foo_1(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -6906,6 +6939,7 @@ foo_1(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int foo_2(int) template >*> int foo_2(const T0__& a, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -6936,6 +6970,7 @@ foo_2(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] real foo_3(real, int) template , std::is_floating_point>, @@ -6959,6 +6994,7 @@ foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_lp(real) template , @@ -6980,6 +7016,7 @@ foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void foo_4(array[] real) template , stan::math::disjunction, std::is_floating_point>, @@ -7072,6 +7110,7 @@ relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo_5(vector, vector, data array[] real, data array[] int) template , stan::is_vt_not_complex, @@ -7103,6 +7142,7 @@ foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_five_args(real, real, real, real, real) template , @@ -7136,6 +7176,7 @@ foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_five_args_lp(real, real, real, real, real, real) template , stan::is_vt_not_complex, @@ -7218,6 +7260,10 @@ covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void f0(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ template matfoo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -8366,6 +8464,7 @@ Eigen::Matrix matfoo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector vecfoo() Eigen::Matrix vecfoo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -8385,6 +8484,7 @@ Eigen::Matrix vecfoo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector vecmufoo(real) template , std::is_floating_point>>*> @@ -8412,6 +8512,7 @@ vecmufoo(const T0__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector vecmubar(real) template , std::is_floating_point>>*> @@ -8442,6 +8543,7 @@ vecmubar(const T0__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector algebra_system(vector, vector, array[] real, array[] int) template , stan::is_vt_not_complex, @@ -8492,6 +8594,7 @@ algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector binomialf(vector, vector, data array[] real, data array[] int) template , stan::is_vt_not_complex, @@ -15289,6 +15392,7 @@ struct sho_functor__ { return sho(t, y, theta, x, x_int, pstream__); } }; +// array[] real sho(real, array[] real, array[] real, array[] real, array[] int) template , @@ -15347,6 +15451,7 @@ sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real integrand(real, real, array[] real, array[] real, array[] int) template , @@ -15388,6 +15493,7 @@ integrand(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(vector, vector, array[] real, array[] int) template , stan::is_vt_not_complex, @@ -15427,6 +15533,7 @@ foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector goo(vector, vector, array[] real, array[] int) template , stan::is_vt_not_complex, @@ -15466,6 +15573,7 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real map_rectfake(real) template , std::is_floating_point>>*> @@ -15488,6 +15596,7 @@ map_rectfake(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector algebra_system(vector, vector, array[] real, array[] int) template , stan::is_vt_not_complex, @@ -18171,6 +18280,7 @@ struct f_variadic2_functor__ { return f(t, z, a, b, pstream__); } }; +// vector f(real, vector, real, vector) template , std::is_floating_point>, @@ -23738,6 +23848,9 @@ struct dz_dt_functor__ { return dz_dt(t, z, theta, x_r, x_i, pstream__); } }; +/* array[] real dz_dt(real, array[] real, array[] real, array[] real, + array[] int) + */ template , @@ -26755,6 +26868,7 @@ template , std::is_integral>>* = nullptr> double foo(const T0__& p, std::ostream* pstream__); +// real foo(int) template >*> double foo(const T0__& p, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -26774,6 +26888,7 @@ foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(real) template , std::is_floating_point>>*> @@ -26796,6 +26911,7 @@ foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(row_vector) template , stan::is_vt_not_complex>*> @@ -26819,6 +26935,7 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -26842,6 +26959,7 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(matrix) template , stan::is_vt_not_complex>*> @@ -26865,6 +26983,7 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(array[] real) template , stan::math::disjunction, stan::is_row_vector>, @@ -26915,6 +27035,7 @@ foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(array[] vector) template , stan::is_col_vector>, @@ -26940,6 +27061,7 @@ foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(array[] matrix) template , stan::is_eigen_matrix_dynamic>, @@ -26965,6 +27087,7 @@ foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(array[,] real) template , stan::is_std_vector>, @@ -26995,6 +27118,7 @@ foo(const T0__& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(array[] int) template , std::is_integral>>*> @@ -28351,6 +28475,7 @@ template >>>* = nullptr> std::decay_t>> foo(const T0__& zs, std::ostream* pstream__); +// complex ident(complex) template , stan::math::disjunction, stan::math::disjunction, stan::is_vt_not_complex>*> @@ -28900,6 +29027,7 @@ test2(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix matrix_pow(matrix, int) template , stan::is_vt_not_complex, @@ -28938,6 +29066,7 @@ matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(matrix) template , stan::is_vt_not_complex>*> @@ -28961,6 +29090,7 @@ foo(const T0__& a_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(real) template , std::is_floating_point>>*> @@ -28990,6 +29120,7 @@ foo(const T0__& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector test4(vector) template , stan::is_vt_not_complex>*> @@ -29025,6 +29156,7 @@ test4(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector test3(vector) template , stan::is_vt_not_complex>*> @@ -29048,6 +29180,7 @@ test3(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void test6(vector) template , stan::is_vt_not_complex>*> @@ -29086,6 +29219,7 @@ void test6(const T0__& alpha_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector test7(vector) template , stan::is_vt_not_complex>*> @@ -29120,6 +29254,7 @@ test7(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(real, vector, matrix) template , std::is_floating_point>, @@ -29728,6 +29863,7 @@ struct foo_lpdf_rsfunctor__ { return foo_lpdf(y_slice, (start + 1), (end + 1), pstream__); } }; +// real g(array[] real, int, int) template , stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::is_col_vector>, @@ -31030,6 +31170,7 @@ g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g3(array[] row_vector, int, int) template , stan::is_row_vector>, @@ -31066,6 +31207,7 @@ g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g4(array[] matrix, int, int) template , stan::is_eigen_matrix_dynamic>, @@ -31103,6 +31245,7 @@ g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g5(array[,] real, int, int) template , stan::is_std_vector>, @@ -31150,6 +31293,7 @@ g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g6(array[,] vector, int, int) template , stan::is_std_vector>, @@ -31196,6 +31340,7 @@ g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g7(array[,] row_vector, int, int) template , stan::is_std_vector>, @@ -31242,6 +31387,7 @@ g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g8(array[,] matrix, int, int) template , stan::is_std_vector>, @@ -31288,6 +31434,7 @@ g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real h1(array[] real, int, int, array[] real) template , stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::is_col_vector>, @@ -34859,6 +35016,7 @@ f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f3(array[] row_vector, int, int) template , stan::is_row_vector>, @@ -34884,6 +35042,7 @@ f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f4(array[] matrix, int, int) template , stan::is_eigen_matrix_dynamic>, @@ -34909,6 +35068,7 @@ f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f5(array[,] real, int, int) template , stan::is_std_vector>, @@ -34939,6 +35099,7 @@ f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f6(array[,] vector, int, int) template , stan::is_std_vector>, @@ -34967,6 +35128,7 @@ f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f7(array[,] row_vector, int, int) template , stan::is_std_vector>, @@ -34995,6 +35157,7 @@ f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f8(array[,] matrix, int, int) template , stan::is_std_vector>, @@ -35023,6 +35186,7 @@ f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f9(array[] int, int, int) template , std::is_integral>, @@ -35047,6 +35211,7 @@ f9(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f10(array[,] int, int, int) template , stan::is_std_vector>, @@ -35072,6 +35237,7 @@ f10(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f11(array[,,] int, int, int) template , stan::is_std_vector>, @@ -35100,6 +35266,7 @@ f11(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f12(array[,,] real, int, int) template , stan::is_std_vector>, @@ -35134,6 +35301,7 @@ f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real g1(array[] real, int, int, real) template , stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction, stan::math::disjunction>>* = nullptr> std::vector>>> bar(const T0__& a, std::ostream* pstream__); +// array[] real foo(real) template , std::is_floating_point>>*> @@ -38219,6 +38405,7 @@ foo(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// tuple(array[] real, real) baz(real) template , std::is_floating_point>>*> @@ -38243,6 +38430,7 @@ baz(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] complex bar(real) template , std::is_floating_point>>*> @@ -38719,6 +38907,7 @@ struct rhs_variadic2_functor__ { return rhs(t, y, alpha, pstream__); } }; +// vector rhs(real, vector, real) template , std::is_floating_point>, @@ -40209,6 +40398,7 @@ template > foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// real foo0_lpmf(int) template >*> double foo0_lpmf(const T0__& y, std::ostream* pstream__) { @@ -40226,6 +40416,7 @@ double foo0_lpmf(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo1_lpmf(int) template >*> double foo1_lpmf(const T0__& y, std::ostream* pstream__) { @@ -40243,6 +40434,7 @@ double foo1_lpmf(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo4_lp(int) template >*> double @@ -40262,6 +40454,7 @@ foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo2_lpdf(real) template , std::is_floating_point>>*> @@ -40281,6 +40474,7 @@ foo2_lpdf(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo3_lpdf(real) template , std::is_floating_point>>*> @@ -40300,6 +40494,7 @@ foo3_lpdf(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo5_lp(real) template , @@ -44823,6 +45018,7 @@ template >>* = nullptr> std::decay_t> normal(const T0__& a, std::ostream* pstream__); +// real normal(real) template , std::is_floating_point>>*> @@ -45204,6 +45400,7 @@ template >>* = nullptr> std::decay_t> lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__); +// real lb_constrain(real, real) template , std::is_floating_point>, diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 10e95d9db..05107742e 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -659,6 +659,7 @@ template , stan::base_type_t>>,-1,-1> add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); +// real foo1(real, int, array[] real, vector, matrix, row_vector) template , @@ -704,6 +705,7 @@ foo1(const T0__& a, const T1__& b, const T2__& c, const T3__& d_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo2(vector, array[] matrix, array[] row_vector) template , stan::is_vt_not_complex, @@ -738,6 +740,7 @@ foo2(const T0__& a_arg__, const T1__& b, const T2__& c, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix foo3(vector, matrix) template , stan::is_vt_not_complex, @@ -766,6 +769,7 @@ foo3(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix add_udf(matrix, matrix) template , stan::is_vt_not_complex, diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 388b73cd0..b1a422f1a 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -2349,6 +2349,7 @@ (((Return ((FunCall binomialf () ((Var phi) (Var theta) (Var x_r) (Var x_i) (Var pstream__)))))))))))))) + (GlobalComment "int foo(int)") (FunDef ((templates_init ((((Typename T0__) @@ -2393,6 +2394,9 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] real sho(real, array[] real, array[] real, data array[] real,\ + \n data array[] int)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) @@ -2485,6 +2489,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_bar0()") (FunDef ((templates_init ((()) false)) (inline false) (return_type Double) (name foo_bar0) (args (((Pointer (TypeLiteral std::ostream)) pstream__))) @@ -2513,6 +2518,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_bar1(real)") (FunDef ((templates_init ((((Typename T0__) @@ -2553,6 +2559,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_bar2(real, real)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) @@ -2596,6 +2603,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_lpmf(int, real)") (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) @@ -2633,6 +2641,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_lcdf(int, real)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) @@ -2674,6 +2683,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_lccdf(int, real)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) @@ -2715,6 +2725,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_rng(real, real)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename RNG) @@ -2760,6 +2771,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "void unit_normal_lp(real)") (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) @@ -2802,6 +2814,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "int foo_1(int)") (FunDef ((templates_init ((((Typename T0__) @@ -3146,6 +3159,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "int foo_2(int)") (FunDef ((templates_init ((((Typename T0__) @@ -3206,6 +3220,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "array[] real foo_3(real, int)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) @@ -3248,6 +3263,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_lp(real)") (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) @@ -3288,6 +3304,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "void foo_4(array[] real)") (FunDef ((templates_init ((((Typename T0__) @@ -3344,6 +3361,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real relative_diff(real, real, real, real)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -3473,6 +3491,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector foo_5(vector, vector, data array[] real, data array[] int)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) @@ -3537,6 +3556,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_five_args(real, real, real, real, real)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -3593,6 +3613,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "real foo_five_args_lp(real, real, real, real, real, real)") (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T1__) (Typename T2__) @@ -3653,6 +3674,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "matrix covsqrt2corsqrt(matrix, int)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) @@ -3746,6 +3768,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "void f0(int, array[] int, array[,] int, real, array[] real, array[,] real,\ + \n vector, array[] vector, array[,] vector, matrix, array[] matrix,\ + \n array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -3864,6 +3890,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "int f1(int, array[] int, array[,] int, real, array[] real, array[,] real,\ + \n vector, array[] vector, array[,] vector, matrix, array[] matrix,\ + \n array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -3977,6 +4007,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] int f2(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4090,6 +4124,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] int f3(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4203,6 +4241,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "real f4(int, array[] int, array[,] int, real, array[] real, array[,] real,\ + \n vector, array[] vector, array[,] vector, matrix, array[] matrix,\ + \n array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4329,6 +4371,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] real f5(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4456,6 +4502,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] real f6(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4584,6 +4634,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "vector f7(int, array[] int, array[,] int, real, array[] real, array[,] real,\ + \n vector, array[] vector, array[,] vector, matrix, array[] matrix,\ + \n array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4712,6 +4766,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] vector f8(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4841,6 +4899,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] vector f9(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -4972,6 +5034,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "matrix f10(int, array[] int, array[,] int, real, array[] real, array[,] real,\ + \n vector, array[] vector, array[,] vector, matrix, array[] matrix,\ + \n array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -5100,6 +5166,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] matrix f11(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -5229,6 +5299,10 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] matrix f12(int, array[] int, array[,] int, real, array[] real,\ + \n array[,] real, vector, array[] vector, array[,] vector,\ + \n matrix, array[] matrix, array[,] matrix)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -5360,6 +5434,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "void foo_6()") (FunDef ((templates_init ((()) false)) (inline false) (return_type Void) (name foo_6) (args (((Pointer (TypeLiteral std::ostream)) pstream__))) @@ -5425,6 +5500,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "matrix matfoo()") (FunDef ((templates_init ((()) false)) (inline false) (return_type (Matrix Double -1 -1 AoS)) (name matfoo) (args (((Pointer (TypeLiteral std::ostream)) pstream__))) @@ -5480,6 +5556,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector vecfoo()") (FunDef ((templates_init ((()) false)) (inline false) (return_type (Matrix Double -1 1 AoS)) (name vecfoo) (args (((Pointer (TypeLiteral std::ostream)) pstream__))) @@ -5515,6 +5592,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector vecmufoo(real)") (FunDef ((templates_init ((((Typename T0__) @@ -5572,6 +5650,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector vecmubar(real)") (FunDef ((templates_init ((((Typename T0__) @@ -5640,6 +5719,7 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector algebra_system(vector, vector, array[] real, array[] int)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) (Typename T2__) (Typename T3__) @@ -5743,6 +5823,8 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "vector binomialf(vector, vector, data array[] real, data array[] int)") (FunDef ((templates_init ((((Typename T0__) (Typename T1__) diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index 1fea95188..a59cc0c66 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -116,6 +116,7 @@ struct f_0_arg_variadic2_functor__ { return f_0_arg(t, z, pstream__); } }; +// vector f_0_arg(real, vector) template , std::is_floating_point>, @@ -143,6 +144,7 @@ f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector f_1_arg(real, vector, real) template , std::is_floating_point>, @@ -173,6 +175,7 @@ f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector f_2_arg(real, vector, int, real) template , std::is_floating_point>, @@ -995,6 +998,7 @@ struct simple_SIR_variadic2_functor__ { return simple_SIR(t, y, beta, kappa, gamma, xi, delta, unused, pstream__); } }; +// vector simple_SIR(real, vector, real, real, real, real, real) template , @@ -1063,6 +1067,7 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector simple_SIR(real, vector, real, real, real, real, real, int) template , diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index 4da8c2513..3bfe1282e 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -108,6 +108,7 @@ std::vector< std::vector< std::complex>>>>>> array_fun(const T0__& a, std::ostream* pstream__); +// real my_log1p_exp(real) template , std::is_floating_point>>*> @@ -130,6 +131,7 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real array_fun(array[] real) template , stan::math::disjunction, std::is_integral>>*> @@ -176,6 +179,7 @@ double int_array_fun(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector my_vector_mul_by_5(vector) template , stan::is_vt_not_complex>*> @@ -208,6 +212,7 @@ my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int int_only_multiplication(int, int) template , std::is_integral>*> int @@ -229,6 +234,7 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real test_lgamma(real) template , std::is_floating_point>>*> @@ -251,6 +257,7 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void test_lp(real) template , @@ -272,6 +279,7 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real test_rng(real) template , std::is_floating_point>>*> @@ -294,6 +302,7 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real test_lpdf(real, real) template , std::is_floating_point>, @@ -315,6 +324,7 @@ test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// complex_matrix test_complex(complex_matrix) template , stan::is_vt_complex>*> @@ -338,6 +348,7 @@ test_complex(const T0__& a_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[,,] complex array_fun(array[,,] complex) template , stan::is_std_vector>, @@ -516,6 +527,7 @@ template >>* = nullptr> std::decay_t> test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); +// real my_log1p_exp(real) template , std::is_floating_point>>*> @@ -538,6 +550,7 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real array_fun(array[] real) template , stan::math::disjunction, std::is_integral>>*> @@ -584,6 +598,7 @@ double int_array_fun(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector my_vector_mul_by_5(vector) template , stan::is_vt_not_complex>*> @@ -616,6 +631,7 @@ my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int int_only_multiplication(int, int) template , std::is_integral>*> int @@ -637,6 +653,7 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real test_lgamma(real) template , std::is_floating_point>>*> @@ -659,6 +676,7 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void test_lp(real) template , @@ -680,6 +698,7 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real test_rng(real) template , std::is_floating_point>>*> @@ -702,6 +721,7 @@ test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real test_lpdf(real, real) template , std::is_floating_point>, @@ -852,6 +872,7 @@ struct integrand_ode_functor__ { return integrand_ode(r, f, theta, x_r, x_i, pstream__); } }; +// vector integrand(vector) template , stan::is_vt_not_complex>*> @@ -875,6 +896,9 @@ integrand(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* array[] real integrand_ode(real, array[] real, array[] real, array[] real, + array[] int) + */ template , @@ -930,6 +954,7 @@ integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real ode_integrate() double ode_integrate(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 78e753e0c..582d7bf56 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1966,6 +1966,9 @@ struct simple_SIR_functor__ { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; +/* array[] real simple_SIR(real, array[] real, array[] real, array[] real, + array[] int) + */ template , @@ -5073,6 +5076,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -5115,6 +5119,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -5163,6 +5168,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -12752,6 +12758,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -12794,6 +12801,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -12842,6 +12850,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -14905,6 +14914,7 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -14947,6 +14957,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -14995,6 +15006,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(matrix, matrix) template , stan::is_vt_not_complex, @@ -15139,6 +15151,9 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void js_super_lp(array[,] int, array[] int, array[] int, matrix, matrix, + real, vector, matrix) + */ template , stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -21007,6 +21023,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -21055,6 +21072,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -22964,6 +22982,7 @@ template >* = nullptr> std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); +// real inner_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -22987,6 +23006,7 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real outer_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -23448,6 +23468,7 @@ template >* = nullptr> std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); +// real do_something(real) template , std::is_floating_point>>*> @@ -23470,6 +23491,7 @@ do_something(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real summer(vector) template , stan::is_vt_not_complex>*> @@ -25028,6 +25050,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); +// vector single_ret_fun(vector) template , stan::is_vt_not_complex>*> @@ -25051,6 +25074,7 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector multi_ret_fun(vector) template , stan::is_vt_not_complex>*> @@ -25711,6 +25735,7 @@ template , std::is_integral>* = nullptr> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__); +// matrix foo(int, int) template , std::is_integral>*> Eigen::Matrix @@ -26136,6 +26161,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -26772,6 +26798,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -26814,6 +26841,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -26862,6 +26890,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(matrix, matrix) template , stan::is_vt_not_complex, @@ -27006,6 +27035,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void jolly_seber_lp(array[,] int, array[] int, array[] int, matrix, + matrix, + vector, matrix) + */ template , stan::is_vt_not_complex>*> @@ -31942,6 +31976,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -31984,6 +32019,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -32032,6 +32068,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -33789,6 +33826,7 @@ template >>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); +// real foo_lpdf(real, real) template , std::is_floating_point>, @@ -33813,6 +33851,7 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real bar_lpmf(int, real) template , stan::math::disjunction, @@ -33836,6 +33875,7 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real baz_lpdf(real) template , std::is_floating_point>>*> @@ -36428,6 +36468,7 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// void nrfun_lp(real, int) template , @@ -36458,6 +36499,7 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int rfun(int) template >*> int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -36487,6 +36529,7 @@ rfun(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int rfun_lp() template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -38073,6 +38116,7 @@ dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); +// real dumb(real) template , std::is_floating_point>>*> @@ -38098,6 +38142,7 @@ dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real dumb(int) template >*> double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -38460,6 +38505,7 @@ template >>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -38486,6 +38532,7 @@ foo(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void bar_lp() template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -38506,6 +38553,7 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(real) template , std::is_floating_point>>*> diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index b5ae55ede..edae4af24 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -750,6 +750,9 @@ struct simple_SIR_functor__ { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; +/* array[] real simple_SIR(real, array[] real, array[] real, array[] real, + array[] int) + */ template , @@ -2548,6 +2551,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -2577,6 +2581,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -2609,6 +2614,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -8544,6 +8550,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -8573,6 +8580,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -8605,6 +8613,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -9754,6 +9763,7 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -9783,6 +9793,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -9815,6 +9826,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(matrix, matrix) template , stan::is_vt_not_complex, @@ -9883,6 +9895,9 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void js_super_lp(array[,] int, array[] int, array[] int, matrix, matrix, + real, vector, matrix) + */ template , stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -12902,6 +12918,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -12934,6 +12951,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -13854,6 +13872,7 @@ template >* = nullptr> std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); +// real inner_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -13874,6 +13893,7 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real outer_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -14265,6 +14285,7 @@ template >* = nullptr> std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); +// real do_something(real) template , std::is_floating_point>>*> @@ -14293,6 +14314,7 @@ do_something(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real summer(vector) template , stan::is_vt_not_complex>*> @@ -15566,6 +15588,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); +// vector single_ret_fun(vector) template , stan::is_vt_not_complex>*> @@ -15589,6 +15612,7 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector multi_ret_fun(vector) template , stan::is_vt_not_complex>*> @@ -16126,6 +16150,7 @@ template , std::is_integral>* = nullptr> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__); +// matrix foo(int, int) template , std::is_integral>*> Eigen::Matrix @@ -16542,6 +16567,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -17151,6 +17177,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -17180,6 +17207,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -17212,6 +17240,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(matrix, matrix) template , stan::is_vt_not_complex, @@ -17280,6 +17309,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void jolly_seber_lp(array[,] int, array[] int, array[] int, matrix, + matrix, + vector, matrix) + */ template , stan::is_vt_not_complex>*> @@ -19804,6 +19838,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -19833,6 +19868,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -19865,6 +19901,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -20717,6 +20754,7 @@ template >>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); +// real foo_lpdf(real, real) template , std::is_floating_point>, @@ -20738,6 +20776,7 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real bar_lpmf(int, real) template , stan::math::disjunction, @@ -20758,6 +20797,7 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real baz_lpdf(real) template , std::is_floating_point>>*> @@ -23033,6 +23073,7 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// void nrfun_lp(real, int) template , @@ -23060,6 +23101,7 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int rfun(int) template >*> int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -23084,6 +23126,7 @@ rfun(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int rfun_lp() template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -24136,6 +24179,7 @@ dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); +// real dumb(real) template , std::is_floating_point>>*> @@ -24158,6 +24202,7 @@ dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real dumb(int) template >*> double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -24509,6 +24554,7 @@ template >>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -24532,6 +24578,7 @@ foo(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void bar_lp() template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -24549,6 +24596,7 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(real) template , std::is_floating_point>>*> diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index e20eb4042..beb7af33f 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -732,6 +732,9 @@ struct simple_SIR_functor__ { return simple_SIR(t, y, theta, x_r, x_i, pstream__); } }; +/* array[] real simple_SIR(real, array[] real, array[] real, array[] real, + array[] int) + */ template , @@ -2511,6 +2514,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -2540,6 +2544,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -2572,6 +2577,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -8636,6 +8642,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -8665,6 +8672,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -8697,6 +8705,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -10018,6 +10027,7 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -10047,6 +10057,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -10079,6 +10090,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(matrix, matrix) template , stan::is_vt_not_complex, @@ -10148,6 +10160,9 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void js_super_lp(array[,] int, array[] int, array[] int, matrix, matrix, + real, vector, matrix) + */ template , stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -13830,6 +13846,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -13862,6 +13879,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -14953,6 +14971,7 @@ template >* = nullptr> std::decay_t>> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); +// real inner_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -14973,6 +14992,7 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real outer_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -15381,6 +15401,7 @@ template >* = nullptr> std::decay_t>> summer(const T0__& et_arg__, std::ostream* pstream__); +// real do_something(real) template , std::is_floating_point>>*> @@ -15403,6 +15424,7 @@ do_something(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real summer(vector) template , stan::is_vt_not_complex>*> @@ -16715,6 +16737,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); +// vector single_ret_fun(vector) template , stan::is_vt_not_complex>*> @@ -16738,6 +16761,7 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector multi_ret_fun(vector) template , stan::is_vt_not_complex>*> @@ -17335,6 +17359,7 @@ template , std::is_integral>* = nullptr> Eigen::Matrix foo(const T0__& N, const T1__& M, std::ostream* pstream__); +// matrix foo(int, int) template , std::is_integral>*> Eigen::Matrix @@ -17751,6 +17776,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -18398,6 +18424,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -18427,6 +18454,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -18459,6 +18487,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(matrix, matrix) template , stan::is_vt_not_complex, @@ -18528,6 +18557,10 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void jolly_seber_lp(array[,] int, array[] int, array[] int, matrix, + matrix, + vector, matrix) + */ template , stan::is_vt_not_complex>*> @@ -21771,6 +21805,7 @@ Eigen::Matrix, stan::base_type_t>>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); +// int first_capture(array[] int) template , std::is_integral>>*> @@ -21800,6 +21835,7 @@ int first_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int last_capture(array[] int) template , std::is_integral>>*> @@ -21832,6 +21868,7 @@ int last_capture(const T0__& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix prob_uncaptured(int, int, matrix, matrix) template , std::is_integral, stan::is_eigen_matrix_dynamic, @@ -22859,6 +22896,7 @@ template >>* = nullptr> std::decay_t> baz_lpdf(const T0__& x, std::ostream* pstream__); +// real foo_lpdf(real, real) template , std::is_floating_point>, @@ -22880,6 +22918,7 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real bar_lpmf(int, real) template , stan::math::disjunction, @@ -22900,6 +22939,7 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real baz_lpdf(real) template , std::is_floating_point>>*> @@ -25180,6 +25220,7 @@ template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); +// void nrfun_lp(real, int) template , @@ -25207,6 +25248,7 @@ nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int rfun(int) template >*> int rfun(const T0__& y, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -25231,6 +25273,7 @@ rfun(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// int rfun_lp() template int rfun_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -26345,6 +26388,7 @@ dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); +// real dumb(real) template , std::is_floating_point>>*> @@ -26367,6 +26411,7 @@ dumb(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real dumb(int) template >*> double dumb(const T0__& x, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -26718,6 +26763,7 @@ template >>* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& x, std::ostream* pstream__); +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -26741,6 +26787,7 @@ foo(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void bar_lp() template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -26758,6 +26805,7 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(real) template , std::is_floating_point>>*> diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index c1e6d8bee..d6f1d8a82 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -4341,6 +4341,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__); +// int mask_fun(int) template >*> int mask_fun(const T0__& i, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -4360,6 +4361,7 @@ mask_fun(const T0__& i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector udf_fun(vector) template , stan::is_vt_not_complex>*> @@ -7341,6 +7343,7 @@ Eigen::Matrix>>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__); +// matrix nono_func(matrix) template , stan::is_vt_not_complex>*> @@ -7364,6 +7367,7 @@ nono_func(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix okay_reduction(real, matrix) template , std::is_floating_point>, @@ -8033,6 +8037,7 @@ template >* = nullptr> Eigen::Matrix>>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__); +// matrix empty_user_func() Eigen::Matrix empty_user_func(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -8053,6 +8058,7 @@ Eigen::Matrix empty_user_func(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix mat_ret_user_func(matrix) template , stan::is_vt_not_complex>*> @@ -9272,6 +9278,7 @@ Eigen::Matrix>>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__); +// matrix nono_func(matrix) template , stan::is_vt_not_complex>*> @@ -9295,6 +9302,7 @@ nono_func(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix okay_reduction(real, matrix) template , std::is_floating_point>, diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index 32b10a0cd..711486356 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -4732,6 +4732,7 @@ static constexpr std::array locations_array__ = " (in 'tuple-constraints-params.stan', line 3, column 4 to column 22)", " (in 'tuple-constraints-params.stan', line 2, column 26 to line 4, column 3)"}; std::tuple foo(std::ostream* pstream__); +// tuple(real, real) foo() std::tuple foo(std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -5874,6 +5875,7 @@ static constexpr std::array locations_array__ = " (in 'tuple-dataonly.stan', line 3, column 4 to column 15)", " (in 'tuple-dataonly.stan', line 2, column 37 to line 4, column 3)"}; double foo(const std::tuple& x, std::ostream* pstream__); +// real foo(data tuple(real, real)) double foo(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = double; int current_statement__ = 0; @@ -6227,6 +6229,7 @@ static constexpr std::array locations_array__ = double tuple_tester(const std::tuple, int>& x, std::ostream* pstream__); +// real tuple_tester(data tuple(array[] real, int)) double tuple_tester(const std::tuple, int>& x, std::ostream* pstream__) { @@ -9509,6 +9512,7 @@ template , stan::base_type_t>> dummy(const std::tuple& test, std::ostream* pstream__); +// real dummy(tuple(array[] real, array[] real)) template , stan::math::disjunction, T0__2__>& t1, const std::vector>& t2, std::ostream* pstream__); +// void foo(tuple(matrix, int)) template , stan::is_vt_not_complex, @@ -10626,6 +10631,7 @@ void foo(const std::tuple& test, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real tsum(tuple(array[] int, array[] real)) template , std::is_integral>, @@ -10653,6 +10659,7 @@ tsum(const std::tuple& s, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void foo2(array[] tuple(matrix, int)) template , stan::is_vt_not_complex, @@ -10682,6 +10689,7 @@ foo2(const std::vector>& test, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void foo3(tuple(real, matrix)) template , std::is_floating_point>, @@ -10709,6 +10717,9 @@ void foo3(const std::tuple& test, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +/* void overly_complicated(tuple(array[] matrix, tuple(int, matrix), real), + array[] tuple(int, matrix)) + */ template , @@ -11214,6 +11225,7 @@ template >>>* = nullptr> void g(const std::tuple& x, std::ostream* pstream__); +// void f(tuple(matrix, matrix)) template , stan::is_vt_not_complex, @@ -11246,6 +11258,7 @@ void f(const std::tuple& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void g(tuple(matrix, int, array[] real)) template , stan::is_vt_not_complex, @@ -11877,6 +11890,7 @@ struct fun_rsfunctor__ { return fun(y_slice, (start + 1), (end + 1), m, pstream__); } }; +// real fun(array[] real, int, int, tuple(real, array[] int)) template , @@ -12355,6 +12369,7 @@ std::decay_t& x, const std::tuple& y, std::ostream* pstream__); +// real foo_lpdf(tuple(real, real), tuple(real, real, real)) template , @@ -12713,6 +12728,7 @@ template >* = nullptr> std::decay_t> foo_lpdf(const std::tuple& x, std::ostream* pstream__); +// real foo_lpdf(tuple(real, int)) template , std::is_floating_point>, @@ -13059,6 +13075,7 @@ template > foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__); +// real foo_lpmf(tuple(int, int), real) template , std::is_integral, From fd50edb15c55b5b126926fef9e9363e660c5aa4a Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 11:48:19 -0400 Subject: [PATCH 12/16] More testing --- src/stan_math_backend/Lower_functions.ml | 7 +- test/integration/good/code-gen/cpp.expected | 693 ++++++++++++++++++ .../good/code-gen/data_only_functions.stan | 41 ++ test/integration/good/tuples/cpp.expected | 119 ++- test/integration/good/tuples/pretty.expected | 8 + .../good/tuples/transformed_mir.expected | 228 +++++- .../good/tuples/tuple-dataonly.stan | 8 + 7 files changed, 1091 insertions(+), 13 deletions(-) create mode 100644 test/integration/good/code-gen/data_only_functions.stan diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index e1d731286..8f42121e1 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -6,9 +6,8 @@ open Cpp let rec arg_type_prim (t : UnsizedType.t) : type_ = match t with - | UInt -> Int - | UReal | UMatrix | URowVector | UVector | UComplexVector | UComplexMatrix - |UComplexRowVector | UTuple _ -> + | UInt | UReal | UMatrix | URowVector | UVector | UComplexVector + |UComplexMatrix | UComplexRowVector | UTuple _ -> stantype_prim t | UComplex -> Types.complex (stantype_prim t) | UArray t when UnsizedType.contains_tuple t -> StdVector (arg_type_prim t) @@ -119,7 +118,7 @@ let template_parameters (args : Program.fun_arg_decl) = let requires = List.concat reqs in let scalar = Tuple sclrs in (templates, requires, template_arg_type scalar typ) - | UnsizedType.DataOnly, ut when not (UnsizedType.is_eigen_type ut) -> + | UnsizedType.DataOnly, _ when not (UnsizedType.is_eigen_type typ) -> ([], [], arg_type_prim typ) | _ -> let template = sprintf "%s%d__" start i in diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 863e8877a..2b587e452 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -3232,6 +3232,699 @@ new_model(stan::io::var_context& data_context, unsigned int seed, stan::math::profile_map& get_stan_profile_data() { return cpp_reserved_words_model_namespace::profiles__; } +#endif + $ ../../../../../install/default/bin/stanc --print-cpp data_only_functions.stan +// Code generated by %%NAME%% %%VERSION%% +#include +namespace data_only_functions_model_namespace { +using stan::model::model_base_crtp; +using namespace stan::math; +stan::math::profile_map profiles__; +static constexpr std::array locations_array__ = + {" (found before start of program)", + " (in 'data_only_functions.stan', line 31, column 2 to column 17)", + " (in 'data_only_functions.stan', line 34, column 2 to column 19)", + " (in 'data_only_functions.stan', line 35, column 2 to column 24)", + " (in 'data_only_functions.stan', line 36, column 2 to column 37)", + " (in 'data_only_functions.stan', line 38, column 2 to column 25)", + " (in 'data_only_functions.stan', line 39, column 2 to column 30)", + " (in 'data_only_functions.stan', line 40, column 2 to column 43)", + " (in 'data_only_functions.stan', line 27, column 2 to column 8)", + " (in 'data_only_functions.stan', line 28, column 9 to column 10)", + " (in 'data_only_functions.stan', line 28, column 12 to column 13)", + " (in 'data_only_functions.stan', line 28, column 2 to column 17)", + " (in 'data_only_functions.stan', line 31, column 9 to column 10)", + " (in 'data_only_functions.stan', line 31, column 12 to column 13)", + " (in 'data_only_functions.stan', line 3, column 4 to column 19)", + " (in 'data_only_functions.stan', line 2, column 26 to line 4, column 3)", + " (in 'data_only_functions.stan', line 7, column 4 to column 22)", + " (in 'data_only_functions.stan', line 6, column 34 to line 8, column 3)", + " (in 'data_only_functions.stan', line 11, column 4 to column 22)", + " (in 'data_only_functions.stan', line 10, column 55 to line 12, column 3)", + " (in 'data_only_functions.stan', line 15, column 4 to column 19)", + " (in 'data_only_functions.stan', line 14, column 27 to line 16, column 3)", + " (in 'data_only_functions.stan', line 19, column 4 to column 22)", + " (in 'data_only_functions.stan', line 18, column 35 to line 20, column 3)", + " (in 'data_only_functions.stan', line 23, column 4 to column 22)", + " (in 'data_only_functions.stan', line 22, column 51 to line 24, column 3)"}; +template , + stan::is_vt_not_complex>* = nullptr> +std::decay_t>> +baz(const T0__& y_arg__, std::ostream* pstream__); +double +bar(const std::vector>& z, std::ostream* + pstream__); +double +foo(const std::vector>>& x, + const std::vector>& y, std::ostream* pstream__); +template , + stan::is_vt_not_complex>* = nullptr> +std::decay_t>> +baz_param(const T0__& y_arg__, std::ostream* pstream__); +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> +std::decay_t>> +bar_param(const T0__& z, std::ostream* pstream__); +template , + stan::is_std_vector>, + stan::is_std_vector>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>>* = nullptr> +std::decay_t>> +foo_param(const T0__& x, const T1__& y, std::ostream* pstream__); +// real baz(data matrix) +template , + stan::is_vt_not_complex>*> +std::decay_t>> +baz(const T0__& y_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + const auto& y = stan::math::to_ref(y_arg__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 14; + return stan::model::rvalue(y, "y", stan::model::index_uni(1), + stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +// real bar(data array[] matrix) +double +bar(const std::vector>& z, std::ostream* + pstream__) { + using local_scalar_t__ = double; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 16; + return stan::model::rvalue( + stan::model::rvalue(z, "z", stan::model::index_uni(1)), "z[1]", + stan::model::index_uni(1), stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +// real foo(data array[,,] real, data array[,] int) +double +foo(const std::vector>>& x, + const std::vector>& y, std::ostream* pstream__) { + using local_scalar_t__ = double; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 18; + return stan::model::rvalue(x, "x", stan::model::index_uni(1), + stan::model::index_uni(1), stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +// real baz_param(matrix) +template , + stan::is_vt_not_complex>*> +std::decay_t>> +baz_param(const T0__& y_arg__, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + const auto& y = stan::math::to_ref(y_arg__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 20; + return stan::model::rvalue(y, "y", stan::model::index_uni(1), + stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +// real bar_param(array[] matrix) +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>*> +std::decay_t>> +bar_param(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 22; + return stan::model::rvalue( + stan::model::rvalue(z, "z", stan::model::index_uni(1)), "z[1]", + stan::model::index_uni(1), stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +// real foo_param(array[,,] real, array[,] int) +template , + stan::is_std_vector>, + stan::is_std_vector>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>>*> +std::decay_t>> +foo_param(const T0__& x, const T1__& y, std::ostream* pstream__) { + using local_scalar_t__ = std::decay_t>>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 24; + return stan::model::rvalue(x, "x", stan::model::index_uni(1), + stan::model::index_uni(1), stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +class data_only_functions_model final : public model_base_crtp { + private: + int N; + Eigen::Matrix d_data__; + Eigen::Map> d{nullptr, 0, 0}; + public: + ~data_only_functions_model() {} + data_only_functions_model(stan::io::var_context& context__, unsigned int + random_seed__ = 0, std::ostream* + pstream__ = nullptr) : model_base_crtp(0) { + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + using local_scalar_t__ = double; + boost::ecuyer1988 base_rng__ = + stan::services::util::create_rng(random_seed__, 0); + // suppress unused var warning + (void) base_rng__; + static constexpr const char* function__ = + "data_only_functions_model_namespace::data_only_functions_model"; + // suppress unused var warning + (void) function__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 8; + context__.validate_dims("data initialization", "N", "int", + std::vector{}); + N = std::numeric_limits::min(); + current_statement__ = 8; + N = context__.vals_i("N")[(1 - 1)]; + current_statement__ = 9; + stan::math::validate_non_negative_index("d", "N", N); + current_statement__ = 10; + stan::math::validate_non_negative_index("d", "N", N); + current_statement__ = 11; + context__.validate_dims("data initialization", "d", "double", + std::vector{static_cast(N), static_cast(N)}); + d_data__ = Eigen::Matrix::Constant(N, N, + std::numeric_limits::quiet_NaN()); + new (&d) Eigen::Map>(d_data__.data(), N, N); + { + std::vector d_flat__; + current_statement__ = 11; + d_flat__ = context__.vals_r("d"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + for (int sym2__ = 1; sym2__ <= N; ++sym2__) { + stan::model::assign(d, d_flat__[(pos__ - 1)], + "assigning variable d", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + current_statement__ = 12; + stan::math::validate_non_negative_index("p", "N", N); + current_statement__ = 13; + stan::math::validate_non_negative_index("p", "N", N); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + num_params_r__ = (N * N); + } + inline std::string model_name() const final { + return "data_only_functions_model"; + } + inline std::vector model_compile_info() const noexcept { + return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", + "stancflags = --print-cpp"}; + } + // Base log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_not_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "data_only_functions_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix p = + Eigen::Matrix::Constant(N, N, DUMMY_VAR__); + current_statement__ = 1; + p = in__.template read>(N, N); + { + current_statement__ = 2; + lp_accum__.add(baz(d, pstream__)); + current_statement__ = 3; + lp_accum__.add(bar(std::vector>{d, d}, + pstream__)); + current_statement__ = 4; + lp_accum__.add(foo( + std::vector>>{ + std::vector>{std::vector< + double>{1.5}}}, + std::vector>{std::vector{1, 2}}, + pstream__)); + current_statement__ = 5; + lp_accum__.add(baz_param(d, pstream__)); + current_statement__ = 6; + lp_accum__.add(bar_param( + std::vector>{d, d}, + pstream__)); + current_statement__ = 7; + lp_accum__.add(foo_param( + std::vector>>{ + std::vector>{std::vector< + double>{1.5}}}, + std::vector>{std::vector{1, 2}}, + pstream__)); + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + // Reverse mode autodiff log prob + template * = nullptr, + stan::require_vector_like_vt* = nullptr, + stan::require_st_var* = nullptr> + inline stan::scalar_type_t + log_prob_impl(VecR& params_r__, VecI& params_i__, std::ostream* + pstream__ = nullptr) const { + using T__ = stan::scalar_type_t; + using local_scalar_t__ = T__; + T__ lp__(0.0); + stan::math::accumulator lp_accum__; + stan::io::deserializer in__(params_r__, params_i__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + static constexpr const char* function__ = + "data_only_functions_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix p = + Eigen::Matrix::Constant(N, N, DUMMY_VAR__); + current_statement__ = 1; + p = in__.template read>(N, N); + { + current_statement__ = 2; + lp_accum__.add(baz(d, pstream__)); + current_statement__ = 3; + lp_accum__.add(bar(std::vector>{d, d}, + pstream__)); + current_statement__ = 4; + lp_accum__.add(foo( + std::vector>>{ + std::vector>{std::vector< + double>{1.5}}}, + std::vector>{std::vector{1, 2}}, + pstream__)); + current_statement__ = 5; + lp_accum__.add(baz_param(d, pstream__)); + current_statement__ = 6; + lp_accum__.add(bar_param( + std::vector>{d, d}, + pstream__)); + current_statement__ = 7; + lp_accum__.add(foo_param( + std::vector>>{ + std::vector>{std::vector< + double>{1.5}}}, + std::vector>{std::vector{1, 2}}, + pstream__)); + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + lp_accum__.add(lp__); + return lp_accum__.sum(); + } + template * = nullptr, stan::require_vector_like_vt* = nullptr, stan::require_vector_vt* = nullptr> + inline void + write_array_impl(RNG& base_rng__, VecR& params_r__, VecI& params_i__, + VecVar& vars__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true, std::ostream* + pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + double lp__ = 0.0; + // suppress unused var warning + (void) lp__; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + stan::math::accumulator lp_accum__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + constexpr bool jacobian__ = false; + // suppress unused var warning + (void) jacobian__; + static constexpr const char* function__ = + "data_only_functions_model_namespace::write_array"; + // suppress unused var warning + (void) function__; + try { + Eigen::Matrix p = + Eigen::Matrix::Constant(N, N, + std::numeric_limits::quiet_NaN()); + current_statement__ = 1; + p = in__.template read>(N, N); + out__.write(p); + if (stan::math::logical_negation( + (stan::math::primitive_value(emit_transformed_parameters__) || + stan::math::primitive_value(emit_generated_quantities__)))) { + return ; + } + if (stan::math::logical_negation(emit_generated_quantities__)) { + return ; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr, + stan::require_vector_like_vt* = nullptr> + inline void + unconstrain_array_impl(const VecVar& params_r__, const VecI& params_i__, + VecVar& vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::deserializer in__(params_r__, params_i__); + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + Eigen::Matrix p = + Eigen::Matrix::Constant(N, N, DUMMY_VAR__); + current_statement__ = 1; + stan::model::assign(p, + in__.read>(N, N), + "assigning variable p"); + out__.write(p); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + template * = nullptr> + inline void + transform_inits_impl(const stan::io::var_context& context__, VecVar& + vars__, std::ostream* pstream__ = nullptr) const { + using local_scalar_t__ = double; + stan::io::serializer out__(vars__); + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 1; + context__.validate_dims("parameter initialization", "p", "double", + std::vector{static_cast(N), static_cast(N)}); + int pos__ = std::numeric_limits::min(); + pos__ = 1; + Eigen::Matrix p = + Eigen::Matrix::Constant(N, N, DUMMY_VAR__); + { + std::vector p_flat__; + current_statement__ = 1; + p_flat__ = context__.vals_r("p"); + pos__ = 1; + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + for (int sym2__ = 1; sym2__ <= N; ++sym2__) { + stan::model::assign(p, p_flat__[(pos__ - 1)], + "assigning variable p", stan::model::index_uni(sym2__), + stan::model::index_uni(sym1__)); + pos__ = (pos__ + 1); + } + } + } + out__.write(p); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + } + inline void + get_param_names(std::vector& names__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + names__ = std::vector{"p"}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + get_dims(std::vector>& dimss__, const bool + emit_transformed_parameters__ = true, const bool + emit_generated_quantities__ = true) const { + dimss__ = std::vector>{std::vector{static_cast< + size_t>(N), + static_cast(N)}}; + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + constrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + for (int sym2__ = 1; sym2__ <= N; ++sym2__) { + param_names__.emplace_back(std::string() + "p" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline void + unconstrained_param_names(std::vector& param_names__, bool + emit_transformed_parameters__ = true, bool + emit_generated_quantities__ = true) const final { + for (int sym1__ = 1; sym1__ <= N; ++sym1__) { + for (int sym2__ = 1; sym2__ <= N; ++sym2__) { + param_names__.emplace_back(std::string() + "p" + '.' + + std::to_string(sym2__) + '.' + std::to_string(sym1__)); + } + } + if (emit_transformed_parameters__) {} + if (emit_generated_quantities__) {} + } + inline std::string get_constrained_sizedtypes() const { + return std::string("[{\"name\":\"p\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(N) + ",\"cols\":" + std::to_string(N) + "},\"block\":\"parameters\"}]"); + } + inline std::string get_unconstrained_sizedtypes() const { + return std::string("[{\"name\":\"p\",\"type\":{\"name\":\"matrix\",\"rows\":" + std::to_string(N) + ",\"cols\":" + std::to_string(N) + "},\"block\":\"parameters\"}]"); + } + // Begin method overload boilerplate + template inline void + write_array(RNG& base_rng, Eigen::Matrix& params_r, + Eigen::Matrix& vars, const bool + emit_transformed_parameters = true, const bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = (N * N); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + std::vector params_i; + vars = Eigen::Matrix::Constant(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline void + write_array(RNG& base_rng, std::vector& params_r, std::vector& + params_i, std::vector& vars, bool + emit_transformed_parameters = true, bool + emit_generated_quantities = true, std::ostream* + pstream = nullptr) const { + const size_t num_params__ = (N * N); + const size_t num_transformed = emit_transformed_parameters * (0); + const size_t num_gen_quantities = emit_generated_quantities * (0); + const size_t num_to_write = num_params__ + num_transformed + + num_gen_quantities; + vars = std::vector(num_to_write, + std::numeric_limits::quiet_NaN()); + write_array_impl(base_rng, params_r, params_i, vars, + emit_transformed_parameters, emit_generated_quantities, pstream); + } + template inline T_ + log_prob(Eigen::Matrix& params_r, std::ostream* pstream = nullptr) const { + Eigen::Matrix params_i; + return log_prob_impl(params_r, params_i, pstream); + } + template inline T_ + log_prob(std::vector& params_r, std::vector& params_i, + std::ostream* pstream = nullptr) const { + return log_prob_impl(params_r, params_i, pstream); + } + inline void + transform_inits(const stan::io::var_context& context, + Eigen::Matrix& params_r, std::ostream* + pstream = nullptr) const final { + std::vector params_r_vec(params_r.size()); + std::vector params_i; + transform_inits(context, params_i, params_r_vec, pstream); + params_r = Eigen::Map>(params_r_vec.data(), + params_r_vec.size()); + } + inline void + transform_inits(const stan::io::var_context& context, std::vector& + params_i, std::vector& vars, std::ostream* + pstream__ = nullptr) const { + vars.resize(num_params_r__); + transform_inits_impl(context, vars, pstream__); + } + inline void + unconstrain_array(const std::vector& params_constrained, + std::vector& params_unconstrained, std::ostream* + pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = std::vector(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } + inline void + unconstrain_array(const Eigen::Matrix& params_constrained, + Eigen::Matrix& params_unconstrained, + std::ostream* pstream = nullptr) const { + const std::vector params_i; + params_unconstrained = Eigen::Matrix::Constant(num_params_r__, + std::numeric_limits::quiet_NaN()); + unconstrain_array_impl(params_constrained, params_i, + params_unconstrained, pstream); + } +}; +} +using stan_model = data_only_functions_model_namespace::data_only_functions_model; +#ifndef USING_R +// Boilerplate +stan::model::model_base& +new_model(stan::io::var_context& data_context, unsigned int seed, + std::ostream* msg_stream) { + stan_model* m = new stan_model(data_context, seed, msg_stream); + return *m; +} +stan::math::profile_map& get_stan_profile_data() { + return data_only_functions_model_namespace::profiles__; +} #endif $ ../../../../../install/default/bin/stanc --print-cpp eight_schools_ncp.stan // Code generated by %%NAME%% %%VERSION%% diff --git a/test/integration/good/code-gen/data_only_functions.stan b/test/integration/good/code-gen/data_only_functions.stan new file mode 100644 index 000000000..7909f53a8 --- /dev/null +++ b/test/integration/good/code-gen/data_only_functions.stan @@ -0,0 +1,41 @@ +functions { + real baz(data matrix y) { + return y[1, 1]; + } + + real bar(data array[] matrix z) { + return z[1][1, 1]; + } + + real foo(data array[,,] real x, data array[,] int y) { + return x[1, 1, 1]; + } + + real baz_param(matrix y) { + return y[1, 1]; + } + + real bar_param(array[] matrix z) { + return z[1][1, 1]; + } + + real foo_param(array[,,] real x, array[,] int y) { + return x[1, 1, 1]; + } +} +data { + int N; + matrix[N, N] d; +} +parameters { + matrix[N, N] p; +} +model { + target += baz(d); + target += bar({d, d}); + target += foo({{{1.5}}}, {{1, 2}}); + + target += baz_param(d); + target += bar_param({d, d}); + target += foo_param({{{1.5}}}, {{1, 2}}); +} diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index 711486356..8a7422006 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -5868,13 +5868,25 @@ namespace tuple_dataonly_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple-dataonly.stan', line 10, column 2 to column 19)", - " (in 'tuple-dataonly.stan', line 7, column 2 to column 22)", + " (in 'tuple-dataonly.stan', line 16, column 2 to column 19)", + " (in 'tuple-dataonly.stan', line 17, column 2 to column 24)", + " (in 'tuple-dataonly.stan', line 18, column 2 to column 34)", + " (in 'tuple-dataonly.stan', line 13, column 2 to column 22)", " (in 'tuple-dataonly.stan', line 3, column 4 to column 15)", - " (in 'tuple-dataonly.stan', line 2, column 37 to line 4, column 3)"}; + " (in 'tuple-dataonly.stan', line 2, column 37 to line 4, column 3)", + " (in 'tuple-dataonly.stan', line 6, column 4 to column 18)", + " (in 'tuple-dataonly.stan', line 5, column 45 to line 7, column 3)", + " (in 'tuple-dataonly.stan', line 9, column 4 to column 27)", + " (in 'tuple-dataonly.stan', line 8, column 55 to line 10, column 3)"}; double foo(const std::tuple& x, std::ostream* pstream__); +double +bar(const std::vector>& x, std::ostream* pstream__); +double +baz(const std::vector< + std::tuple>, double>>& x, + std::ostream* pstream__); // real foo(data tuple(real, real)) double foo(const std::tuple& x, std::ostream* pstream__) { using local_scalar_t__ = double; @@ -5888,12 +5900,59 @@ double foo(const std::tuple& x, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; try { - current_statement__ = 3; + current_statement__ = 5; return std::get<0>(x); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real bar(data array[] tuple(real, real)) +double +bar(const std::vector>& x, std::ostream* pstream__) { + using local_scalar_t__ = double; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 7; + return std::get<1>(stan::model::rvalue(x, "x", stan::model::index_uni(1))); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} +// real baz(data array[] tuple(array[] matrix, real)) +double +baz(const std::vector< + std::tuple>, double>>& x, + std::ostream* pstream__) { + using local_scalar_t__ = double; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 9; + return stan::model::rvalue( + stan::model::rvalue( + std::get<0>( + stan::model::rvalue(x, "x", stan::model::index_uni(1))), + "x[1].1", stan::model::index_uni(1)), "x[1].1[1]", + stan::model::index_uni(1), stan::model::index_uni(1)); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} class tuple_dataonly_model final : public model_base_crtp { private: std::tuple d; @@ -5920,14 +5979,14 @@ class tuple_dataonly_model final : public model_base_crtp try { int pos__ = std::numeric_limits::min(); pos__ = 1; - current_statement__ = 2; + current_statement__ = 4; context__.validate_dims("data initialization", "d.1", "double", std::vector{}); context__.validate_dims("data initialization", "d.2", "double", std::vector{}); d = std::tuple{std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN()}; - current_statement__ = 2; + current_statement__ = 4; std::get<0>(d) = context__.vals_r("d.1")[(1 - 1)]; std::get<1>(d) = context__.vals_r("d.2")[(1 - 1)]; } catch (const std::exception& e) { @@ -5968,6 +6027,29 @@ class tuple_dataonly_model final : public model_base_crtp try { current_statement__ = 1; lp_accum__.add(foo(d, pstream__)); + current_statement__ = 2; + lp_accum__.add(bar( + std::vector>{stan::math::promote_scalar< + std::tuple< + double, + double>>(d), + stan::math::promote_scalar< + std::tuple>(d)}, pstream__)); + current_statement__ = 3; + lp_accum__.add(baz( + std::vector< + std::tuple>, + double>>{std::tuple< + const std::vector< + Eigen::Matrix>&, + double>(std::vector< + Eigen::Matrix>{ + stan::math::to_matrix( + std::vector< + Eigen::Matrix>{ + (Eigen::Matrix(1) << + 1).finished()})}, + std::get<1>(d))}, pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -6000,6 +6082,29 @@ class tuple_dataonly_model final : public model_base_crtp try { current_statement__ = 1; lp_accum__.add(foo(d, pstream__)); + current_statement__ = 2; + lp_accum__.add(bar( + std::vector>{stan::math::promote_scalar< + std::tuple< + double, + double>>(d), + stan::math::promote_scalar< + std::tuple>(d)}, pstream__)); + current_statement__ = 3; + lp_accum__.add(baz( + std::vector< + std::tuple>, + double>>{std::tuple< + const std::vector< + Eigen::Matrix>&, + double>(std::vector< + Eigen::Matrix>{ + stan::math::to_matrix( + std::vector< + Eigen::Matrix>{ + (Eigen::Matrix(1) << + 1).finished()})}, + std::get<1>(d))}, pstream__)); } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } diff --git a/test/integration/good/tuples/pretty.expected b/test/integration/good/tuples/pretty.expected index 5f478b3eb..0ddab9bd6 100644 --- a/test/integration/good/tuples/pretty.expected +++ b/test/integration/good/tuples/pretty.expected @@ -78,12 +78,20 @@ functions { real foo(data tuple(real, real) x) { return x.1; } + real bar(data array[] tuple(real, real) x) { + return x[1].2; + } + real baz(data array[] tuple(array[] matrix, real) x) { + return x[1].1[1][1, 1]; + } } data { tuple(real, real) d; } model { target += foo(d); + target += bar({d, d}); + target += baz({({[[1]]}, d.2)}); } $ ../../../../../install/default/bin/stanc --auto-format tuple-dataonly2.stan diff --git a/test/integration/good/tuples/transformed_mir.expected b/test/integration/good/tuples/transformed_mir.expected index 88ae92d5b..0bfa9992f 100644 --- a/test/integration/good/tuples/transformed_mir.expected +++ b/test/integration/good/tuples/transformed_mir.expected @@ -14235,13 +14235,89 @@ (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) (meta ))))) (meta )))) + (fdloc )) + ((fdrt (ReturnType UReal)) (fdname bar) (fdsuffix FnPlain) + (fdargs ((DataOnly x (UArray (UTuple (UReal UReal)))))) + (fdbody + (((pattern + (Block + (((pattern + (Return + (((pattern + (Promotion + ((pattern + (TupleProjection + ((pattern + (Indexed + ((pattern (Var x)) + (meta + ((type_ (UArray (UTuple (UReal UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + ((Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + 2)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + UReal AutoDiffable)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (fdloc )) + ((fdrt (ReturnType UReal)) (fdname baz) (fdsuffix FnPlain) + (fdargs ((DataOnly x (UArray (UTuple ((UArray UMatrix) UReal)))))) + (fdbody + (((pattern + (Block + (((pattern + (Return + (((pattern + (Promotion + ((pattern + (Indexed + ((pattern + (Indexed + ((pattern + (TupleProjection + ((pattern + (Indexed + ((pattern (Var x)) + (meta + ((type_ (UArray (UTuple ((UArray UMatrix) UReal)))) + (loc ) (adlevel (TupleAD (DataOnly DataOnly)))))) + ((Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta + ((type_ (UTuple ((UArray UMatrix) UReal))) + (loc ) (adlevel (TupleAD (DataOnly DataOnly)))))) + 1)) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (Single + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + UReal AutoDiffable)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) (fdloc )))) (input_vars ((d ((begin_loc - ((filename tuple-dataonly.stan) (line_num 7) (col_num 2) (included_from ()))) + ((filename tuple-dataonly.stan) (line_num 13) (col_num 2) (included_from ()))) (end_loc - ((filename tuple-dataonly.stan) (line_num 7) (col_num 22) (included_from ())))) + ((filename tuple-dataonly.stan) (line_num 13) (col_num 22) (included_from ())))) (STuple (SReal SReal))))) (prepare_data (((pattern @@ -14296,6 +14372,80 @@ ((type_ (UTuple (UReal UReal))) (loc ) (adlevel (TupleAD (DataOnly DataOnly))))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (UserDefined bar FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern + (Promotion + ((pattern (Var d)) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + (UTuple (UReal UReal)) (TupleAD (DataOnly DataOnly)))) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + ((pattern + (Promotion + ((pattern (Var d)) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + (UTuple (UReal UReal)) (TupleAD (DataOnly DataOnly)))) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UArray (UTuple (UReal UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (UserDefined baz FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern + (FunApp (CompilerInternal FnMakeRowVec) + (((pattern + (FunApp (CompilerInternal FnMakeRowVec) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta + ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ URowVector) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) + ((pattern + (TupleProjection + ((pattern (Var d)) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + 2)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple ((UArray UMatrix) UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UArray (UTuple ((UArray UMatrix) UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) (meta ))))) (meta )))) (reverse_mode_log_prob @@ -14310,6 +14460,80 @@ ((type_ (UTuple (UReal UReal))) (loc ) (adlevel (TupleAD (DataOnly DataOnly))))))))) (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (UserDefined bar FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern + (Promotion + ((pattern (Var d)) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + (UTuple (UReal UReal)) (TupleAD (DataOnly DataOnly)))) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + ((pattern + (Promotion + ((pattern (Var d)) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + (UTuple (UReal UReal)) (TupleAD (DataOnly DataOnly)))) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UArray (UTuple (UReal UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (TargetPE + ((pattern + (FunApp (UserDefined baz FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (FunApp (CompilerInternal FnMakeArray) + (((pattern + (FunApp (CompilerInternal FnMakeRowVec) + (((pattern + (FunApp (CompilerInternal FnMakeRowVec) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta + ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta + ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ URowVector) (loc ) (adlevel DataOnly))))))) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UArray UMatrix)) (loc ) (adlevel DataOnly)))) + ((pattern + (TupleProjection + ((pattern (Var d)) + (meta + ((type_ (UTuple (UReal UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly)))))) + 2)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple ((UArray UMatrix) UReal))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UArray (UTuple ((UArray UMatrix) UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))))) (meta ))))) (meta )))) (generate_quantities diff --git a/test/integration/good/tuples/tuple-dataonly.stan b/test/integration/good/tuples/tuple-dataonly.stan index 9388f1122..b431906f7 100644 --- a/test/integration/good/tuples/tuple-dataonly.stan +++ b/test/integration/good/tuples/tuple-dataonly.stan @@ -2,10 +2,18 @@ functions { real foo(data tuple(real, real) x) { return x.1; } + real bar(data array[] tuple(real, real) x) { + return x[1].2; + } + real baz(data array[] tuple(array[] matrix, real) x) { + return x[1].1[1][1, 1]; + } } data { tuple(real, real) d; } model { target += foo(d); + target += bar({d, d}); + target += baz({({[[1]]}, d.2)}); } From 45e4b82d1ce0ec2157a3fc84975eb3832bafc9a0 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 12:09:38 -0400 Subject: [PATCH 13/16] Clean up code --- src/stan_math_backend/Cpp.ml | 5 +- src/stan_math_backend/Lower_functions.ml | 65 +-- src/stan_math_backend/Lower_program.ml | 4 +- test/integration/good/code-gen/cpp.expected | 45 +- test/integration/good/code-gen/lir.expected | 552 ++++++++++---------- 5 files changed, 347 insertions(+), 324 deletions(-) diff --git a/src/stan_math_backend/Cpp.ml b/src/stan_math_backend/Cpp.ml index d694ebe66..7c1914d6e 100644 --- a/src/stan_math_backend/Cpp.ml +++ b/src/stan_math_backend/Cpp.ml @@ -31,7 +31,8 @@ module Types = struct let local_scalar = TypeLiteral "local_scalar_t__" (** A [std::vector] *) - let std_vector t = StdVector t + let rec std_vector ?(dims = 1) t = + if dims = 0 then t else std_vector ~dims:(dims - 1) (StdVector t) let bool = TypeLiteral "bool" let complex s = Complex s @@ -735,7 +736,7 @@ module Tests = struct let ts = let open Types in [ matrix (complex local_scalar); const_char_array 43 - ; std_vector (std_vector Double); const_ref (TemplateType "T0__") ] in + ; std_vector ~dims:2 Double; const_ref (TemplateType "T0__") ] in let open Fmt in pf stdout "@[%a@]" (list ~sep:comma Printing.pp_type_) ts ; [%expect diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 8f42121e1..46713592b 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -4,31 +4,6 @@ open Lower_expr open Lower_stmt open Cpp -let rec arg_type_prim (t : UnsizedType.t) : type_ = - match t with - | UInt | UReal | UMatrix | URowVector | UVector | UComplexVector - |UComplexMatrix | UComplexRowVector | UTuple _ -> - stantype_prim t - | UComplex -> Types.complex (stantype_prim t) - | UArray t when UnsizedType.contains_tuple t -> StdVector (arg_type_prim t) - | UArray t -> - (* Expressions are not accepted for arrays of Eigen::Matrix *) - StdVector (lower_type t (stantype_prim t)) - | UMathLibraryFunction | UFun _ -> - Common.FatalError.fatal_error_msg - [%message "Function types not implemented"] - -let template_arg_type template_or_type ut = - let rec lower_type_for_arg (t : UnsizedType.t) : type_ = - match t with - (* stdvectors are templates except for when they contain tuples*) - | UArray t when UnsizedType.contains_tuple t -> - StdVector (lower_type_for_arg t) - (* NB: tuples are handled by this function's caller, - [template_parameters] *) - | _ -> template_or_type in - lower_type_for_arg ut - let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = (* we add the _arg suffix for any Eigen types *) let opt_arg_suffix = @@ -37,6 +12,8 @@ let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = else name in (Types.const_ref type_, opt_arg_suffix) +(** Generate the require_* templates to constrain an argument to a specific type + NB: Currently, tuples are not handled by this function *) let requires ut t = let t = TemplateType t in let rec requires_in ut t = @@ -66,12 +43,19 @@ let requires ut t = | UArray inner_ut -> RequireAllCondition (`Exact "stan::is_std_vector", t) :: requires_in inner_ut (TypeTrait ("stan::value_type_t", [t])) - | _ -> + | UReal -> (* not using stan::is_stan_scalar to explictly exclude int *) [ RequireAllCondition - (`OneOf ["stan::is_autodiff"; "std::is_floating_point"], t) ] in + (`OneOf ["stan::is_autodiff"; "std::is_floating_point"], t) ] + | UTuple _ | UMathLibraryFunction | UFun _ -> + Common.FatalError.fatal_error_msg + [%message + "Cannot formulate require templates for type " (ut : UnsizedType.t)] + in requires_in ut t +(** Identify the templates which need to be considered in + the return type of the function (i.e., the scalar types) *) let return_optional_arg_types (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = match (ad, typ) with @@ -97,8 +81,9 @@ let return_optional_arg_types (args : Program.fun_arg_decl) = | ( _ , ( UnsizedType.UArray _ | UComplex | UVector | URowVector | UMatrix | UComplexRowVector | UComplexVector | UComplexMatrix ) ) -> - [sprintf "stan::base_type_t<%s%d__>" start i] - | _ -> [sprintf "%s%d__" start i] in + [ TypeTrait + ("stan::base_type_t", [TemplateType (sprintf "%s%d__" start i)]) ] + | _ -> [TemplateType (sprintf "%s%d__" start i)] in List.mapi args ~f:(fun i (ad, _, ty) -> template_p "T" i (ad, ty)) (** Print template arguments for C++ functions that need templates @@ -107,8 +92,9 @@ let return_optional_arg_types (args : Program.fun_arg_decl) = *) let template_parameters (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = - match (ad, fst (UnsizedType.unwind_array_type typ)) with - | _, UTuple tys -> + match (ad, UnsizedType.unwind_array_type typ) with + | _, (UTuple tys, dims) -> + (* (arrays of) Tuples directly print std::tuple *) (* TODO/future: use [std::tuple_element] to fully templatize tuples *) let temps, reqs, sclrs = List.map ~f:(fun ty -> (ad, ty)) tys @@ -117,14 +103,15 @@ let template_parameters (args : Program.fun_arg_decl) = let templates = List.concat temps in let requires = List.concat reqs in let scalar = Tuple sclrs in - (templates, requires, template_arg_type scalar typ) + (templates, requires, Types.std_vector ~dims scalar) | UnsizedType.DataOnly, _ when not (UnsizedType.is_eigen_type typ) -> - ([], [], arg_type_prim typ) + (* For types that are [DataOnly] as not either a tuple or eigen type, + we can just directly print the type *) + ([], [], lower_type typ (stantype_prim typ)) | _ -> + (* all other types are templated *) let template = sprintf "%s%d__" start i in - ( [template] - , requires typ template - , template_arg_type (TemplateType template) typ ) in + ([template], requires typ template, TemplateType template) in List.mapi args ~f:(fun i (ad, _, ty) -> template_p "T" i (ad, ty)) let%expect_test "arg types templated correctly" = @@ -192,11 +179,7 @@ let lower_promoted_scalar args = ("stan::promote_args_t", hd @ chunk_till_empty list_tail) ] ) in promote_args_chunked - List.( - chunks_of ~length:5 - (List.map - ~f:(fun t -> TemplateType t) - (concat (return_optional_arg_types args)) )) + List.(chunks_of ~length:5 (concat (return_optional_arg_types args))) (** Pretty-prints a function's return-type, taking into account templated argument promotion.*) diff --git a/src/stan_math_backend/Lower_program.ml b/src/stan_math_backend/Lower_program.ml index b1f119746..7cbc7d124 100644 --- a/src/stan_math_backend/Lower_program.ml +++ b/src/stan_math_backend/Lower_program.ml @@ -444,14 +444,14 @@ let gen_get_dims {Program.output_vars; _} = ( Var "emit_transformed_parameters__" , Stmts.block (gen_extend_vector dimss - (Types.std_vector (Types.std_vector Types.size_t)) + (Types.std_vector ~dims:2 Types.size_t) (List.concat tparams) ) , None ) ; IfElse ( Var "emit_generated_quantities__" , Stmts.block (gen_extend_vector dimss - (Types.std_vector (Types.std_vector Types.size_t)) + (Types.std_vector ~dims:2 Types.size_t) (List.concat gqs) ) , None ) ] in FunDef diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 2b587e452..513e5bcf5 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -8013,7 +8013,8 @@ f0(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8098,7 +8099,8 @@ f1(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8180,7 +8182,8 @@ f2(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8262,7 +8265,8 @@ f3(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8350,7 +8354,8 @@ f4(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8439,7 +8444,8 @@ f5(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8529,7 +8535,8 @@ f6(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8620,7 +8627,8 @@ f7(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8711,7 +8719,8 @@ f8(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8803,7 +8812,8 @@ f9(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8894,7 +8904,8 @@ f10(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -8985,7 +8996,8 @@ f11(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -9077,7 +9089,8 @@ f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>; @@ -36514,13 +36527,15 @@ s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, T4__, stan::base_type_t, stan::base_type_t, stan::base_type_t, - std::decay_t, + std::decay_t, stan::base_type_t, stan::base_type_t, stan::base_type_t, stan::base_type_t, std::decay_t< - stan::promote_args_t, + stan::promote_args_t< + stan::base_type_t, stan::base_type_t, stan::base_type_t, stan::base_type_t>>>>>>; diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index b1a422f1a..3f2532ec6 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -827,8 +827,8 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))) + ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) (name sho) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) @@ -1046,7 +1046,8 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) -1 1 AoS)) (name foo_5) (args @@ -1128,7 +1129,8 @@ (return_type (Matrix (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))))) -1 -1 AoS)) (name covsqrt2corsqrt) (args @@ -1479,15 +1481,16 @@ (return_type (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t)))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))) (name f4) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -1563,15 +1566,16 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (name f5) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -1648,15 +1652,16 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t)))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))))) (name f6) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -1732,15 +1737,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 1 AoS)) (name f7) (args @@ -1818,15 +1824,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 1 AoS))) (name f8) (args @@ -1905,16 +1912,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 1 AoS)))) (name f9) (args @@ -1991,15 +1998,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 -1 AoS)) (name f10) (args @@ -2077,15 +2085,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 -1 AoS))) (name f11) (args @@ -2164,16 +2173,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 -1 AoS)))) (name f12) (args @@ -2249,8 +2258,9 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) -1 1 AoS)) (name algebra_system) (args @@ -2273,7 +2283,8 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) -1 1 AoS)) (name binomialf) (args @@ -2304,9 +2315,9 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) -1 1 AoS)) (name "operator()") (args @@ -2335,8 +2346,8 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) -1 1 AoS)) (name "operator()") (args @@ -2414,8 +2425,8 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))) + ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) (name sho) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) @@ -2427,8 +2438,8 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))) + ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3320,7 +3331,8 @@ (body (((Using local_scalar_t__ ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3505,7 +3517,8 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) -1 1 AoS)) (name foo_5) (args @@ -3518,8 +3531,8 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3686,7 +3699,8 @@ (return_type (Matrix (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))))) -1 -1 AoS)) (name covsqrt2corsqrt) (args @@ -3697,7 +3711,8 @@ (body (((Using local_scalar_t__ ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3846,16 +3861,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3968,16 +3983,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4085,16 +4100,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4202,16 +4217,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4308,15 +4323,16 @@ (return_type (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t)))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))) (name f4) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -4332,16 +4348,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4439,15 +4455,16 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (name f5) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -4463,16 +4480,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4571,15 +4588,16 @@ (StdVector (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t)))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))))) (name f6) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -4595,16 +4613,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4702,15 +4720,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 1 AoS)) (name f7) (args @@ -4727,16 +4746,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4835,15 +4854,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 1 AoS))) (name f8) (args @@ -4860,16 +4880,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4969,16 +4989,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 1 AoS)))) (name f9) (args @@ -4995,16 +5015,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5102,15 +5122,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 -1 AoS)) (name f10) (args @@ -5127,16 +5148,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5235,15 +5256,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 -1 AoS))) (name f11) (args @@ -5260,16 +5282,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5369,16 +5391,16 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) -1 -1 AoS)))) (name f12) (args @@ -5395,16 +5417,16 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))))))) + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5739,8 +5761,9 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) -1 1 AoS)) (name algebra_system) (args @@ -5754,9 +5777,9 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5838,7 +5861,8 @@ (Matrix (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) (TemplateType stan::base_type_t))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) -1 1 AoS)) (name binomialf) (args @@ -5851,8 +5875,8 @@ (((Using local_scalar_t__ ((TypeTrait std::decay_t ((TypeTrait stan::promote_args_t - ((TemplateType stan::base_type_t) - (TemplateType stan::base_type_t))))))) + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) From e7289ed3515c85d5ff087503e8390e8c394be20b Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 12:17:33 -0400 Subject: [PATCH 14/16] decay_t no longer required since not using forward_as_tuple --- src/stan_math_backend/Lower_functions.ml | 38 +- .../cli-args/allow-undefined/cpp.expected | 4 +- .../allow-undefined/standalone-cpp.expected | 4 +- .../code-gen/complex_numbers/cpp.expected | 108 +- test/integration/good/code-gen/cpp.expected | 1567 ++++++++--------- .../good/code-gen/expressions/cpp.expected | 60 +- test/integration/good/code-gen/lir.expected | 994 +++++------ .../good/code-gen/ode/cpp.expected | 85 +- .../standalone_functions/cpp.expected | 116 +- .../good/compiler-optimizations/cpp.expected | 198 +-- .../compiler-optimizations/cppO0.expected | 198 +-- .../compiler-optimizations/cppO1.expected | 198 +-- .../mem_patterns/cpp.expected | 44 +- test/integration/good/tuples/cpp.expected | 71 +- 14 files changed, 1652 insertions(+), 2033 deletions(-) diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 46713592b..94df54ab7 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -59,7 +59,10 @@ let requires ut t = let return_optional_arg_types (args : Program.fun_arg_decl) = let rec template_p start i (ad, typ) = match (ad, typ) with - | _, t when UnsizedType.is_int_type t -> [] + | _, t when UnsizedType.is_int_type t -> + (* integers are templated, + but can never make the return type into a var *) + [] | _, ut when UnsizedType.contains_tuple ut -> ( let internal, _ = UnsizedType.unwind_array_type ut in match internal with @@ -173,11 +176,8 @@ let lower_promoted_scalar args = match args with | [] -> Double | hd :: list_tail -> - TypeTrait - ( "std::decay_t" - , [ TypeTrait - ("stan::promote_args_t", hd @ chunk_till_empty list_tail) ] - ) in + TypeTrait ("stan::promote_args_t", hd @ chunk_till_empty list_tail) + in promote_args_chunked List.(chunks_of ~length:5 (concat (return_optional_arg_types args))) @@ -462,8 +462,8 @@ module Testing = struct stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> void sars(const T0__& x_arg__, const T1__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -529,16 +529,15 @@ module Testing = struct stan::is_std_vector, stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>,-1,-1> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>,-1,-1> sars(const T0__& x_arg__, const T1__& y_arg__, const T2__& z_arg__, const T3__& w, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -568,10 +567,9 @@ module Testing = struct stan::is_std_vector, stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>,-1,-1> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>,-1,-1> operator()(const T0__& x, const T1__& y, const T2__& z, const T3__& w, std::ostream* pstream__) const { return sars(x, y, z, w, pstream__); diff --git a/test/integration/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index 78d7f4289..3e713b5b0 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -18,8 +18,8 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t>,-1,1> operator()(const T0__& phi, const T1__& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); diff --git a/test/integration/cli-args/allow-undefined/standalone-cpp.expected b/test/integration/cli-args/allow-undefined/standalone-cpp.expected index 1250622da..27726612a 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -18,8 +18,8 @@ struct external_map_rectable_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t>,-1,1> operator()(const T0__& phi, const T1__& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return external_map_rectable(phi, theta, x_r, x_i, pstream__); diff --git a/test/integration/good/code-gen/complex_numbers/cpp.expected b/test/integration/good/code-gen/complex_numbers/cpp.expected index 62e6f59cd..e8760c4f0 100644 --- a/test/integration/good/code-gen/complex_numbers/cpp.expected +++ b/test/integration/good/code-gen/complex_numbers/cpp.expected @@ -7224,12 +7224,12 @@ template >, std::is_floating_point< stan::base_type_t>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo1(const T0__& z, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::complex>> +std::complex> foo2(const T0__& r, std::ostream* pstream__); template , @@ -7237,7 +7237,7 @@ template >, std::is_floating_point< stan::base_type_t>>>* = nullptr> -std::complex>>> +std::complex>> foo3(const T0__& z, std::ostream* pstream__); std::vector> foo4(std::ostream* pstream__); template >>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo5(const T0__& z, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::vector>>> +std::vector>> foo6(const T0__& r, std::ostream* pstream__); template , @@ -7265,8 +7265,7 @@ template >>>>* = nullptr> -std::vector< - std::complex>>>> +std::vector>>> foo7(const T0__& z, std::ostream* pstream__); template , @@ -7280,13 +7279,12 @@ template >>>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo8(const T0__& z, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::vector< - std::vector>>>> +std::vector>>> foo9(const T0__& r, std::ostream* pstream__); template , @@ -7301,8 +7299,7 @@ template >>>>>* = nullptr> std::vector< - std::vector< - std::complex>>>>> + std::vector>>>> foo10(const T0__& z, std::ostream* pstream__); // complex foo() std::complex foo(std::ostream* pstream__) { @@ -7331,9 +7328,9 @@ template >, std::is_floating_point< stan::base_type_t>>>*> -std::decay_t>> +stan::promote_args_t> foo1(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7354,9 +7351,9 @@ foo1(const T0__& z, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::complex>> +std::complex> foo2(const T0__& r, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7380,9 +7377,9 @@ template >, std::is_floating_point< stan::base_type_t>>>*> -std::complex>>> +std::complex>> foo3(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7433,9 +7430,9 @@ template >>>>*> -std::decay_t>> +stan::promote_args_t> foo5(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7456,9 +7453,9 @@ foo5(const T0__& z, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::vector>>> +std::vector>> foo6(const T0__& r, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7487,10 +7484,9 @@ template >>>>*> -std::vector< - std::complex>>>> +std::vector>>> foo7(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7520,9 +7516,9 @@ template >>>>>*> -std::decay_t>> +stan::promote_args_t> foo8(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7543,10 +7539,9 @@ foo8(const T0__& z, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::vector< - std::vector>>>> +std::vector>>> foo9(const T0__& r, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7587,10 +7582,9 @@ template >>>>>*> std::vector< - std::vector< - std::complex>>>>> + std::vector>>>> foo10(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10495,54 +10489,54 @@ static constexpr std::array locations_array__ = template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>>,-1,-1> +Eigen::Matrix>>,-1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> foo(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& Z_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>>,1,-1> +Eigen::Matrix>>,1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,1,-1> +Eigen::Matrix>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic>, stan::is_vt_complex>>* = nullptr> std::vector< - Eigen::Matrix>>>,-1,-1>> + Eigen::Matrix>>,-1,-1>> foo(const T0__& Z, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> std::vector< - Eigen::Matrix>>,-1,-1>> + Eigen::Matrix>,-1,-1>> foo(const T0__& A, std::ostream* pstream__); // complex_matrix foo(complex_matrix) template , stan::is_vt_complex>*> -Eigen::Matrix>>>,-1,-1> +Eigen::Matrix>>,-1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10564,9 +10558,9 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10590,9 +10584,9 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_complex>*> -Eigen::Matrix>>>,-1,1> +Eigen::Matrix>>,-1,1> foo(const T0__& Z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10614,9 +10608,9 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10640,9 +10634,9 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_complex>*> -Eigen::Matrix>>>,1,-1> +Eigen::Matrix>>,1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10664,9 +10658,9 @@ foo(const T0__& Z_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,1,-1> +Eigen::Matrix>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10692,9 +10686,9 @@ template >, stan::is_vt_complex>>*> std::vector< - Eigen::Matrix>>>,-1,-1>> + Eigen::Matrix>>,-1,-1>> foo(const T0__& Z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10717,9 +10711,9 @@ template >, stan::is_vt_not_complex>>*> std::vector< - Eigen::Matrix>>,-1,-1>> + Eigen::Matrix>,-1,-1>> foo(const T0__& A, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 513e5bcf5..5718da0f6 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -2211,7 +2211,7 @@ template , std::is_floating_point>>*> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -2227,7 +2227,7 @@ template , stan::is_vt_not_complex>*> void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -3270,7 +3270,7 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> baz(const T0__& y_arg__, std::ostream* pstream__); double bar(const std::vector>& z, std::ostream* @@ -3281,13 +3281,13 @@ foo(const std::vector>>& x, template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> baz_param(const T0__& y_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t>> +stan::promote_args_t> bar_param(const T0__& z, std::ostream* pstream__); template , @@ -3305,15 +3305,15 @@ template , stan::is_std_vector>, std::is_integral>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo_param(const T0__& x, const T1__& y, std::ostream* pstream__); // real baz(data matrix) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> baz(const T0__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -3381,9 +3381,9 @@ foo(const std::vector>>& x, template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> baz_param(const T0__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -3407,9 +3407,9 @@ template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>*> -std::decay_t>> +stan::promote_args_t> bar_param(const T0__& z, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -3445,9 +3445,9 @@ template , stan::is_std_vector>, std::is_integral>>>*> -std::decay_t>> +stan::promote_args_t> foo_param(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -4482,7 +4482,7 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo(const T0__& x, const T1__& y, std::ostream* pstream__); template , @@ -4496,9 +4496,9 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -4522,7 +4522,7 @@ template , std::is_floating_point>>*> void bar(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -6206,8 +6206,8 @@ template >>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t>> sho(const T0__& t, const T1__& y, const T2__& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__); @@ -6215,39 +6215,38 @@ double foo_bar0(std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -foo_bar1(const T0__& x, std::ostream* pstream__); +stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__); template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__); template , std::is_floating_point>, std::is_integral>* = nullptr> -std::vector>> +std::vector> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__); @@ -6317,7 +6316,7 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__); template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t>>> +stan::promote_args_t> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, const T5__& x6, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); @@ -6344,7 +6343,7 @@ template , stan::is_vt_not_complex, std::is_integral>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>> +stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>> f4(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, @@ -6655,13 +6651,11 @@ template >>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>>> f5(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, @@ -6714,13 +6708,11 @@ template >>>* = nullptr> std::vector< std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>>>> f6(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, @@ -6771,15 +6763,12 @@ template >>, stan::is_vt_not_complex>>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,1> f7(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, @@ -6831,15 +6820,12 @@ template >>>* = nullptr> std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,1>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,1>> f8(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, @@ -6892,15 +6878,12 @@ template >>>* = nullptr> std::vector< std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,1>>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,1>>> f9(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, @@ -6951,15 +6934,12 @@ template >>, stan::is_vt_not_complex>>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,-1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,-1> f10(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& @@ -7011,15 +6991,12 @@ template >>>* = nullptr> std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,-1>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,-1>> f11(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& @@ -7072,15 +7049,12 @@ template >>>* = nullptr> std::vector< std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,-1>>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,-1>>> f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& @@ -7091,12 +7065,12 @@ Eigen::Matrix vecfoo(std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__); template , @@ -7110,9 +7084,8 @@ template >>, stan::is_std_vector, std::is_integral>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, const T3__& dat_int, std::ostream* pstream__); template , stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t>,-1,1> binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__); @@ -7138,9 +7111,8 @@ struct algebra_system_functor__ { stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> operator()(const T0__& x, const T1__& y, const T2__& dat, const T3__& dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); @@ -7152,8 +7124,8 @@ struct binomialf_functor__ { stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t>,-1,1> operator()(const T0__& phi, const T1__& theta, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) const { return binomialf(phi, theta, x_r, x_i, pstream__); @@ -7201,14 +7173,14 @@ template >>>*> std::vector< - std::decay_t, - stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t>> sho(const T0__& t, const T1__& y, const T2__& theta, const std::vector& x, const std::vector& x_int, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7260,9 +7232,8 @@ double foo_bar0(std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -foo_bar1(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7285,9 +7256,9 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7309,9 +7280,9 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7330,9 +7301,9 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7354,9 +7325,9 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7379,10 +7350,10 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7407,7 +7378,7 @@ template >; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7668,9 +7639,9 @@ template , std::is_floating_point>, std::is_integral>*> -std::vector>> +std::vector> foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7692,10 +7663,10 @@ template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lp(const T0__& x, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7717,7 +7688,7 @@ template >>>*> void foo_4(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7750,11 +7721,10 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7809,13 +7779,13 @@ template , stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t>,-1,1> foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, const std::vector& data_r, const std::vector& data_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7848,11 +7818,10 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_five_args(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7885,14 +7854,13 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t>>> +stan::promote_args_t> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& x4, const T4__& x5, const T5__& x6, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7911,10 +7879,10 @@ template , stan::is_vt_not_complex, std::is_integral>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8008,16 +7976,15 @@ f0(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8094,16 +8061,15 @@ f1(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8177,16 +8143,15 @@ f2(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8260,16 +8225,15 @@ f3(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8338,27 +8302,23 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>> +stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>> f4(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8428,27 +8388,24 @@ template >>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>>> f5(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8519,27 +8476,24 @@ template >>>*> std::vector< std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>>>> f6(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8609,29 +8563,25 @@ template >>, stan::is_vt_not_complex>>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,1> f7(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8701,29 +8651,25 @@ template >>>*> std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,1>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,1>> f8(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8794,29 +8740,25 @@ template >>>*> std::vector< std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,1>>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,1>>> f9(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8886,29 +8828,25 @@ template >>, stan::is_vt_not_complex>>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,-1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,-1> f10(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8978,29 +8916,25 @@ template >>>*> std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,-1>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,-1>> f11(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9071,29 +9005,25 @@ template >>>*> std::vector< std::vector< - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>,-1,-1>>> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>,-1,-1>>> f12(const T0__& a1, const T1__& a2, const T2__& a3, const T3__& a4, const T4__& a5, const T5__& a6, const T6__& a7_arg__, const T7__& a8, const T8__& a9, const T9__& a10_arg__, const T10__& a11, const T11__& a12, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9194,9 +9124,9 @@ Eigen::Matrix vecfoo(std::ostream* pstream__) { template , std::is_floating_point>>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9222,9 +9152,9 @@ vecmufoo(const T0__& mu, std::ostream* pstream__) { template , std::is_floating_point>>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9262,14 +9192,13 @@ template >>, stan::is_std_vector, std::is_integral>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, const T3__& dat_int, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9306,13 +9235,13 @@ template , stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t>,-1,1> binomialf(const T0__& phi_arg__, const T1__& theta_arg__, const std::vector& x_r, const std::vector& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -15897,8 +15826,8 @@ template , std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, const T4__& x_int, std::ostream* pstream__); template >>, stan::is_std_vector, std::is_integral>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, + stan::base_type_t> integrand(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__); template >>, stan::is_std_vector, std::is_integral>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const T2__& data_r, const T3__& data_i, std::ostream* pstream__); template >>, stan::is_std_vector, std::is_integral>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const T2__& data_r, const T3__& data_i, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t map_rectfake(const T0__& x, std::ostream* pstream__); template , @@ -15974,9 +15901,8 @@ template >>, stan::is_std_vector, std::is_integral>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, const T3__& dat_int, std::ostream* pstream__); struct goo_functor__ { @@ -15992,9 +15918,8 @@ struct goo_functor__ { stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> operator()(const T0__& shared_params, const T1__& job_params, const T2__& data_r, const T3__& data_i, std::ostream* pstream__) const { return goo(shared_params, job_params, data_r, data_i, pstream__); @@ -16013,9 +15938,8 @@ struct foo_functor__ { stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> operator()(const T0__& shared_params, const T1__& job_params, const T2__& data_r, const T3__& data_i, std::ostream* pstream__) const { return foo(shared_params, job_params, data_r, data_i, pstream__); @@ -16040,8 +15964,8 @@ struct integrand_functor__ { stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, + stan::base_type_t> operator()(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) const { return integrand(x, xc, theta, x_r, x_i, pstream__); @@ -16060,9 +15984,8 @@ struct algebra_system_functor__ { stan::value_type_t>>, stan::is_std_vector, std::is_integral>>* = nullptr> - Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> operator()(const T0__& x, const T1__& y, const T2__& dat, const T3__& dat_int, std::ostream* pstream__) const { return algebra_system(x, y, dat, dat_int, pstream__); @@ -16091,8 +16014,8 @@ struct sho_functor__ { stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, const T4__& x_int, std::ostream* pstream__) const { return sho(t, y, theta, x, x_int, pstream__); @@ -16121,14 +16044,14 @@ template , std::is_integral>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> sho(const T0__& t, const T1__& y, const T2__& theta, const T3__& x, const T4__& x_int, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16176,13 +16099,13 @@ template >>, stan::is_std_vector, std::is_integral>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, + stan::base_type_t> integrand(const T0__& x, const T1__& xc, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16212,14 +16135,13 @@ template >>, stan::is_std_vector, std::is_integral>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> foo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const T2__& data_r, const T3__& data_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16252,14 +16174,13 @@ template >>, stan::is_std_vector, std::is_integral>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, const T2__& data_r, const T3__& data_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16283,9 +16204,9 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t map_rectfake(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16315,14 +16236,13 @@ template >>, stan::is_std_vector, std::is_integral>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> algebra_system(const T0__& x_arg__, const T1__& y_arg__, const T2__& dat, const T3__& dat_int, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -18963,9 +18883,8 @@ template >, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, T2__, - stan::base_type_t>>,-1,1> +Eigen::Matrix, T2__, + stan::base_type_t>,-1,1> f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, std::ostream* pstream__); struct f_variadic2_functor__ { @@ -18978,9 +18897,8 @@ struct f_variadic2_functor__ { std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, T2__, - stan::base_type_t>>,-1,1> + Eigen::Matrix, T2__, + stan::base_type_t>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, const T2__& a, const T3__& b) const { return f(t, z, a, b, pstream__); @@ -18996,14 +18914,13 @@ template >, stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix, T2__, - stan::base_type_t>>,-1,1> +Eigen::Matrix, T2__, + stan::base_type_t>,-1,1> f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, T2__, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, T2__, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -24520,8 +24437,8 @@ template , std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> dz_dt(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__); struct dz_dt_functor__ { @@ -24547,8 +24464,8 @@ struct dz_dt_functor__ { stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> operator()(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) const { return dz_dt(t, z, theta, x_r, x_i, pstream__); @@ -24579,14 +24496,14 @@ template , std::is_integral>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> dz_dt(const T0__& t, const T1__& z, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27516,22 +27433,21 @@ double foo(const T0__& p, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -foo(const T0__& p, std::ostream* pstream__); +stan::promote_args_t foo(const T0__& p, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__); template , @@ -27539,25 +27455,25 @@ template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__); template , stan::is_row_vector>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__); template , stan::is_col_vector>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__); template , @@ -27568,7 +27484,7 @@ template >>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__); template , @@ -27598,9 +27514,8 @@ foo(const T0__& p, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t foo(const T0__& p, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27621,9 +27536,9 @@ foo(const T0__& p, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27645,9 +27560,9 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27669,9 +27584,9 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27696,9 +27611,9 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27720,9 +27635,9 @@ template , stan::is_row_vector>, stan::is_vt_not_complex>>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27746,9 +27661,9 @@ template , stan::is_col_vector>, stan::is_vt_not_complex>>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27772,9 +27687,9 @@ template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27803,9 +27718,9 @@ template >>>>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& p, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29171,7 +29086,7 @@ template >, std::is_floating_point< stan::base_type_t>>>* = nullptr> -std::complex>>> +std::complex>> ident(const T0__& x, std::ostream* pstream__); template , @@ -29179,7 +29094,7 @@ template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& zs, std::ostream* pstream__); // complex ident(complex) template >, std::is_floating_point< stan::base_type_t>>>*> -std::complex>>> +std::complex>> ident(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29214,9 +29129,9 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& zs, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29631,33 +29546,32 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex, std::is_integral>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& a_arg__, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -foo(const T0__& b, std::ostream* pstream__); +stan::promote_args_t foo(const T0__& b, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test4(const T0__& gamma_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test3(const T0__& gamma_arg__, std::ostream* pstream__); template , @@ -29666,7 +29580,7 @@ void test6(const T0__& alpha_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__); template , @@ -29675,9 +29589,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t>,-1,1> foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* pstream__); struct foo_variadic2_functor__ { @@ -29688,9 +29601,8 @@ struct foo_variadic2_functor__ { stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix, - stan::base_type_t>>,-1,1> + Eigen::Matrix, + stan::base_type_t>,-1,1> operator()(const T0__& x, const T1__& s, std::ostream* pstream__, const T2__& y) const { return foo(x, s, y, pstream__); @@ -29700,9 +29612,9 @@ struct foo_variadic2_functor__ { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29738,9 +29650,9 @@ template , stan::is_vt_not_complex, std::is_integral>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29776,9 +29688,9 @@ matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29800,9 +29712,8 @@ foo(const T0__& a_arg__, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -foo(const T0__& b, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t foo(const T0__& b, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29830,9 +29741,9 @@ foo(const T0__& b, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test4(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29866,9 +29777,9 @@ test4(const T0__& gamma_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test3(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29891,7 +29802,7 @@ template , stan::is_vt_not_complex>*> void test6(const T0__& alpha_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29929,9 +29840,9 @@ void test6(const T0__& alpha_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -29968,14 +29879,13 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t>,-1,1> foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -30488,7 +30398,7 @@ template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); struct h_rsfunctor__ { @@ -30531,8 +30440,7 @@ struct h_rsfunctor__ { stan::value_type_t>, std::is_floating_point< stan::value_type_t>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h(y_slice, (start + 1), (end + 1), a, pstream__); @@ -30547,7 +30455,7 @@ struct g_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g(y_slice, (start + 1), (end + 1), pstream__); @@ -30563,7 +30471,7 @@ struct foo_lpdf_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return foo_lpdf(y_slice, (start + 1), (end + 1), pstream__); @@ -30577,10 +30485,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -30616,12 +30524,11 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -30654,10 +30561,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -31322,7 +31229,7 @@ template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , stan::is_col_vector>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , stan::is_row_vector>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h8(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); struct h5_rsfunctor__ { @@ -31540,8 +31439,7 @@ struct h5_rsfunctor__ { std::is_floating_point< stan::value_type_t< stan::value_type_t>>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h5(y, (start + 1), (end + 1), a, pstream__); @@ -31561,8 +31459,7 @@ struct h1_rsfunctor__ { stan::value_type_t>, std::is_floating_point< stan::value_type_t>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h1(y, (start + 1), (end + 1), a, pstream__); @@ -31575,7 +31472,7 @@ struct g3_rsfunctor__ { stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g3(y_slice, (start + 1), (end + 1), pstream__); @@ -31596,8 +31493,7 @@ struct h7_rsfunctor__ { stan::value_type_t>>, stan::is_vt_not_complex>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h7(y, (start + 1), (end + 1), a, pstream__); @@ -31615,8 +31511,7 @@ struct h3_rsfunctor__ { stan::is_std_vector, stan::is_row_vector>, stan::is_vt_not_complex>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h3(y, (start + 1), (end + 1), a, pstream__); @@ -31629,7 +31524,7 @@ struct g2_rsfunctor__ { stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g2(y_slice, (start + 1), (end + 1), pstream__); @@ -31645,7 +31540,7 @@ struct g8_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g8(y_slice, (start + 1), (end + 1), pstream__); @@ -31663,8 +31558,7 @@ struct h2_rsfunctor__ { stan::is_std_vector, stan::is_col_vector>, stan::is_vt_not_complex>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h2(y, (start + 1), (end + 1), a, pstream__); @@ -31685,8 +31579,7 @@ struct h8_rsfunctor__ { stan::value_type_t>>, stan::is_vt_not_complex>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h8(y, (start + 1), (end + 1), a, pstream__); @@ -31702,7 +31595,7 @@ struct g7_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g7(y_slice, (start + 1), (end + 1), pstream__); @@ -31715,7 +31608,7 @@ struct g4_rsfunctor__ { stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g4(y_slice, (start + 1), (end + 1), pstream__); @@ -31733,8 +31626,7 @@ struct h4_rsfunctor__ { stan::is_std_vector, stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h4(y, (start + 1), (end + 1), a, pstream__); @@ -31750,7 +31642,7 @@ struct g6_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g6(y_slice, (start + 1), (end + 1), pstream__); @@ -31768,7 +31660,7 @@ struct g5_rsfunctor__ { stan::value_type_t>>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g5(y_slice, (start + 1), (end + 1), pstream__); @@ -31789,8 +31681,7 @@ struct h6_rsfunctor__ { stan::value_type_t>>, stan::is_vt_not_complex>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return h6(y, (start + 1), (end + 1), a, pstream__); @@ -31805,7 +31696,7 @@ struct g1_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return g1(y_slice, (start + 1), (end + 1), pstream__); @@ -31819,10 +31710,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -31845,10 +31736,10 @@ template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -31882,10 +31773,10 @@ template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -31919,10 +31810,10 @@ template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -31962,10 +31853,10 @@ template >>>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32008,10 +31899,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32055,10 +31946,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32102,10 +31993,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32153,12 +32044,11 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h1(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32188,12 +32078,11 @@ template , stan::is_col_vector>, stan::is_vt_not_complex>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h2(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32231,12 +32120,11 @@ template , stan::is_row_vector>, stan::is_vt_not_complex>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h3(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32274,12 +32162,11 @@ template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h4(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32323,12 +32210,11 @@ template >>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h5(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32375,12 +32261,11 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h6(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32428,12 +32313,11 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h7(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -32481,12 +32365,11 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> h8(const T0__& y, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -34689,7 +34572,7 @@ template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template >>>>, std::is_integral, std::is_integral>* = nullptr> -std::decay_t>> +stan::promote_args_t> f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); template , std::is_integral, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t, T3__>> +stan::promote_args_t, T3__> g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); template , std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); template , std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__); template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , stan::is_col_vector>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , stan::is_row_vector>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>, stan::is_vt_not_complex>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g12(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__); template >>>>>* = nullptr> -std::decay_t, T4__, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>>> +stan::promote_args_t, T4__, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>>> s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, const T7__& e_arg__, const T8__& f, const T9__& g, const T10__& h, const T11__& i, @@ -35137,8 +35004,7 @@ struct g8_rsfunctor__ { stan::is_std_vector, stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g8(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35156,8 +35022,7 @@ struct g7_rsfunctor__ { stan::is_std_vector, stan::is_row_vector>, stan::is_vt_not_complex>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g7(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35174,8 +35039,7 @@ struct g4_rsfunctor__ { std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g4(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35193,8 +35057,7 @@ struct g6_rsfunctor__ { stan::is_std_vector, stan::is_col_vector>, stan::is_vt_not_complex>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g6(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35215,8 +35078,7 @@ struct g11_rsfunctor__ { stan::value_type_t>>, stan::is_vt_not_complex>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g11(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35234,7 +35096,7 @@ struct f5_rsfunctor__ { stan::value_type_t>>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f5(y_slice, (start + 1), (end + 1), pstream__); @@ -35249,7 +35111,7 @@ struct f1_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f1(y_slice, (start + 1), (end + 1), pstream__); @@ -35269,8 +35131,7 @@ struct g5_rsfunctor__ { stan::value_type_t>, std::is_floating_point< stan::value_type_t>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g5(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35293,8 +35154,7 @@ struct g9_rsfunctor__ { std::is_floating_point< stan::value_type_t< stan::value_type_t>>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g9(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35311,7 +35171,7 @@ struct g1_rsfunctor__ { std::is_integral, stan::math::disjunction, std::is_floating_point>>* = nullptr> - std::decay_t, T3__>> + stan::promote_args_t, T3__> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g1(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35333,7 +35193,7 @@ struct f12_rsfunctor__ { stan::value_type_t>>>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f12(y_slice, (start + 1), (end + 1), pstream__); @@ -35350,8 +35210,7 @@ struct g3_rsfunctor__ { std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g3(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35364,7 +35223,7 @@ struct f3_rsfunctor__ { stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f3(y_slice, (start + 1), (end + 1), pstream__); @@ -35377,7 +35236,7 @@ struct f2_rsfunctor__ { stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f2(y_slice, (start + 1), (end + 1), pstream__); @@ -35393,7 +35252,7 @@ struct f6_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f6(y_slice, (start + 1), (end + 1), pstream__); @@ -35410,8 +35269,7 @@ struct g2_rsfunctor__ { std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g2(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35432,8 +35290,7 @@ struct g10_rsfunctor__ { stan::value_type_t>>, stan::is_vt_not_complex>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g10(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35449,7 +35306,7 @@ struct f8_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f8(y_slice, (start + 1), (end + 1), pstream__); @@ -35470,8 +35327,7 @@ struct g12_rsfunctor__ { stan::value_type_t>>, stan::is_vt_not_complex>>>* = nullptr> - std::decay_t, - stan::base_type_t>> + stan::promote_args_t, stan::base_type_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a) const { return g12(y_slice, (start + 1), (end + 1), a, pstream__); @@ -35496,7 +35352,7 @@ struct f4_rsfunctor__ { stan::is_vt_not_complex>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f4(y_slice, (start + 1), (end + 1), pstream__); @@ -35587,18 +35443,15 @@ struct s_rsfunctor__ { stan::value_type_t< stan::value_type_t< stan::value_type_t>>>>>* = nullptr> - std::decay_t, T4__, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>>> + stan::promote_args_t, T4__, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t>>> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const T3__& a, const T4__& b, const T5__& c, const T6__& d, const T7__& e, const T8__& f, @@ -35619,7 +35472,7 @@ struct f7_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f7(y_slice, (start + 1), (end + 1), pstream__); @@ -35634,7 +35487,7 @@ struct f1a_rsfunctor__ { stan::value_type_t>>, std::is_integral, std::is_integral>* = nullptr> - std::decay_t>> + stan::promote_args_t> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) const { return f1a(y_slice, (start + 1), (end + 1), pstream__); @@ -35648,10 +35501,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35676,10 +35529,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35702,10 +35555,10 @@ template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35728,10 +35581,10 @@ template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35754,10 +35607,10 @@ template >, stan::is_vt_not_complex>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35785,10 +35638,10 @@ template >>>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35814,10 +35667,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35843,10 +35696,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35872,10 +35725,10 @@ template >>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -35987,10 +35840,10 @@ template >>>>, std::is_integral, std::is_integral>*> -std::decay_t>> +stan::promote_args_t> f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36017,11 +35870,11 @@ template , std::is_integral, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t, T3__>> +stan::promote_args_t, T3__> g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T3__>>; + using local_scalar_t__ = stan::promote_args_t, + T3__>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36048,12 +35901,11 @@ template , std::is_integral, stan::is_col_vector, stan::is_vt_not_complex>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g2(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36081,12 +35933,11 @@ template , std::is_integral, stan::is_row_vector, stan::is_vt_not_complex>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g3(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36114,12 +35965,11 @@ template , std::is_integral, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g4(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36150,12 +36000,11 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g5(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36183,12 +36032,11 @@ template , stan::is_col_vector>, stan::is_vt_not_complex>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g6(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36216,12 +36064,11 @@ template , stan::is_row_vector>, stan::is_vt_not_complex>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g7(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36249,12 +36096,11 @@ template , stan::is_eigen_matrix_dynamic>, stan::is_vt_not_complex>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g8(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36287,12 +36133,11 @@ template >>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g9(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36323,12 +36168,11 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g10(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36359,12 +36203,11 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g11(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36395,12 +36238,11 @@ template >>, stan::is_vt_not_complex>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> g12(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36505,40 +36347,32 @@ template >>>>>*> -std::decay_t, T4__, - stan::base_type_t, stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>>> +stan::promote_args_t, T4__, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t>>> s(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, const T4__& b, const T5__& c_arg__, const T6__& d_arg__, const T7__& e_arg__, const T8__& f, const T9__& g, const T10__& h, const T11__& i, const T12__& j, const T13__& k, const T14__& l, const T15__& m, const T16__& n, const T17__& o, const T18__& p, const T19__& q, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T4__, stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - std::decay_t< - stan::promote_args_t< - stan::base_type_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>>>>>; + using local_scalar_t__ = stan::promote_args_t, + T4__, stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t, + stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>>>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -39077,26 +38911,26 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::vector>> +std::vector> foo(const T0__& a, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::tuple>>, - std::decay_t>> +std::tuple>, + stan::promote_args_t> baz(const T0__& a, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::vector>>> +std::vector>> bar(const T0__& a, std::ostream* pstream__); // array[] real foo(real) template , std::is_floating_point>>*> -std::vector>> +std::vector> foo(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -39117,10 +38951,10 @@ foo(const T0__& a, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::tuple>>, - std::decay_t>> +std::tuple>, + stan::promote_args_t> baz(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -39142,9 +38976,9 @@ baz(const T0__& a, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::vector>>> +std::vector>> bar(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -39596,8 +39430,7 @@ template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -Eigen::Matrix, T2__>>,-1,1> +Eigen::Matrix, T2__>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* pstream__); struct rhs_variadic2_functor__ { @@ -39608,8 +39441,7 @@ struct rhs_variadic2_functor__ { stan::is_vt_not_complex, stan::math::disjunction, std::is_floating_point>>* = nullptr> - Eigen::Matrix, T2__>>,-1,1> + Eigen::Matrix, T2__>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, const T2__& alpha) const { return rhs(t, y, alpha, pstream__); @@ -39623,12 +39455,11 @@ template , stan::math::disjunction, std::is_floating_point>>*> -Eigen::Matrix, T2__>>,-1,1> +Eigen::Matrix, T2__>,-1,1> rhs(const T0__& t, const T1__& y_arg__, const T2__& alpha, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, T2__>>; + using local_scalar_t__ = stan::promote_args_t, T2__>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -41092,18 +40923,16 @@ foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* template , std::is_floating_point>>* = nullptr> -std::decay_t> -foo2_lpdf(const T0__& y, std::ostream* pstream__); +stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -foo3_lpdf(const T0__& y, std::ostream* pstream__); +stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); // real foo0_lpmf(int) @@ -41166,9 +40995,8 @@ foo4_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* template , std::is_floating_point>>*> -std::decay_t> -foo2_lpdf(const T0__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -41186,9 +41014,8 @@ foo2_lpdf(const T0__& y, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -foo3_lpdf(const T0__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -41207,10 +41034,10 @@ template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo5_lp(const T0__& y, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -45724,15 +45551,13 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> -normal(const T0__& a, std::ostream* pstream__); +stan::promote_args_t normal(const T0__& a, std::ostream* pstream__); // real normal(real) template , std::is_floating_point>>*> -std::decay_t> -normal(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t normal(const T0__& a, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -46106,7 +45931,7 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__); // real lb_constrain(real, real) template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 05107742e..7f5356fb9 100644 --- a/test/integration/good/code-gen/expressions/cpp.expected +++ b/test/integration/good/code-gen/expressions/cpp.expected @@ -624,9 +624,8 @@ template , stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t> foo1(const T0__& a, const T1__& b, const T2__& c, const T3__& d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* pstream__); template , stan::is_row_vector>, stan::is_vt_not_complex>>* = nullptr> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> foo2(const T0__& a_arg__, const T1__& b, const T2__& c, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> foo3(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); // real foo1(real, int, array[] real, vector, matrix, row_vector) template , stan::is_row_vector, stan::is_vt_not_complex>*> -std::decay_t, - stan::base_type_t, stan::base_type_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t, + stan::base_type_t, stan::base_type_t> foo1(const T0__& a, const T1__& b, const T2__& c, const T3__& d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -715,14 +712,13 @@ template , stan::is_row_vector>, stan::is_vt_not_complex>>*> -Eigen::Matrix, - stan::base_type_t, - stan::base_type_t>>,-1,1> +Eigen::Matrix, + stan::base_type_t, stan::base_type_t>,-1,1> foo2(const T0__& a_arg__, const T1__& b, const T2__& c, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -746,11 +742,11 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> foo3(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -775,11 +771,11 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/lir.expected b/test/integration/good/code-gen/lir.expected index 3f2532ec6..943738fb9 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -825,10 +825,9 @@ (inline false) (return_type (StdVector - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) (name sho) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) @@ -846,9 +845,7 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T0__)))) true)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_bar1) (args (((Const (Ref (TemplateType T0__))) x) @@ -864,8 +861,7 @@ true)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) + (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) (name foo_bar2) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -878,9 +874,7 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T1__)))) true)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) (name foo_lpmf) (args (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) @@ -893,9 +887,7 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T1__)))) true)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) (name foo_lcdf) (args (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) @@ -908,9 +900,7 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T1__)))) true)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) (name foo_lccdf) (args (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) @@ -926,8 +916,7 @@ true)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) + (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) (name foo_rng) (args (((Const (Ref (TemplateType T0__))) mu) ((Const (Ref (TemplateType T1__))) sigma) @@ -974,9 +963,7 @@ (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) true)) (inline false) - (return_type - (StdVector - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (return_type (StdVector (TypeTrait stan::promote_args_t ((TemplateType T0__))))) (name foo_3) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) n) @@ -988,9 +975,7 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T0__)))) true)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_lp) (args (((Const (Ref (TemplateType T0__))) x) ((Ref (TemplateType T_lp__)) lp__) @@ -1023,10 +1008,8 @@ true)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__)))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__)))) (name relative_diff) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -1044,10 +1027,9 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))) -1 1 AoS)) (name foo_5) (args @@ -1073,10 +1055,9 @@ true)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__)))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) + (TemplateType T4__)))) (name foo_five_args) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -1104,12 +1085,9 @@ true)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T5__)))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) + (TemplateType T4__) (TypeTrait stan::promote_args_t ((TemplateType T5__)))))) (name foo_five_args_lp) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -1128,9 +1106,8 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))) -1 -1 AoS)) (name covsqrt2corsqrt) (args @@ -1479,18 +1456,16 @@ true)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))) (name f4) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -1564,18 +1539,16 @@ (inline false) (return_type (StdVector - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (name f5) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -1650,18 +1623,16 @@ (return_type (StdVector (StdVector - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))) (name f6) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -1735,18 +1706,16 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 1 AoS)) (name f7) (args @@ -1822,18 +1791,16 @@ (return_type (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 1 AoS))) (name f8) (args @@ -1910,18 +1877,16 @@ (StdVector (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 1 AoS)))) (name f9) (args @@ -1996,18 +1961,16 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 -1 AoS)) (name f10) (args @@ -2083,18 +2046,16 @@ (return_type (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 -1 AoS))) (name f11) (args @@ -2171,18 +2132,16 @@ (StdVector (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 -1 AoS)))) (name f12) (args @@ -2215,9 +2174,7 @@ true)) (inline false) (return_type - (Matrix - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) - -1 1 AoS)) + (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) (name vecmufoo) (args (((Const (Ref (TemplateType T0__))) mu) @@ -2231,9 +2188,7 @@ true)) (inline false) (return_type - (Matrix - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) - -1 1 AoS)) + (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) (name vecmubar) (args (((Const (Ref (TemplateType T0__))) mu) @@ -2256,11 +2211,10 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))) -1 1 AoS)) (name algebra_system) (args @@ -2281,10 +2235,9 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))) -1 1 AoS)) (name binomialf) (args @@ -2313,11 +2266,10 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))) -1 1 AoS)) (name "operator()") (args @@ -2344,10 +2296,9 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))) -1 1 AoS)) (name "operator()") (args @@ -2423,10 +2374,9 @@ (inline false) (return_type (StdVector - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) (name sho) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) @@ -2436,10 +2386,9 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2536,18 +2485,14 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T0__)))) false)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_bar1) (args (((Const (Ref (TemplateType T0__))) x) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2581,8 +2526,7 @@ false)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) + (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) (name foo_bar2) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -2590,8 +2534,7 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))))) + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2622,18 +2565,14 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T1__)))) false)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) (name foo_lpmf) (args (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T1__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T1__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2660,18 +2599,14 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T1__)))) false)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) (name foo_lcdf) (args (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T1__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T1__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2702,18 +2637,14 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T1__)))) false)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T1__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T1__)))) (name foo_lccdf) (args (((Const (Ref (TemplateType T0__))) y) ((Const (Ref (TemplateType T1__))) lambda) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T1__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T1__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2747,8 +2678,7 @@ false)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))))) + (TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__)))) (name foo_rng) (args (((Const (Ref (TemplateType T0__))) mu) ((Const (Ref (TemplateType T1__))) sigma) @@ -2757,8 +2687,7 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))))) + ((TypeTrait stan::promote_args_t ((TemplateType T0__) (TemplateType T1__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -2796,9 +2725,7 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3240,18 +3167,14 @@ (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) false)) (inline false) - (return_type - (StdVector - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (return_type (StdVector (TypeTrait stan::promote_args_t ((TemplateType T0__))))) (name foo_3) (args (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) n) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3281,9 +3204,7 @@ (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) (TemplateType T0__)))) false)) - (inline false) - (return_type - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__)))))) + (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_lp) (args (((Const (Ref (TemplateType T0__))) x) ((Ref (TemplateType T_lp__)) lp__) @@ -3291,9 +3212,7 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3330,9 +3249,8 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3388,10 +3306,8 @@ false)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__)))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__)))) (name relative_diff) (args (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) @@ -3400,10 +3316,9 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3515,10 +3430,9 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))) -1 1 AoS)) (name foo_5) (args @@ -3529,10 +3443,9 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3587,10 +3500,9 @@ false)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__)))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) + (TemplateType T4__)))) (name foo_five_args) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -3600,10 +3512,9 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3647,12 +3558,9 @@ false)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T5__)))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) (TemplateType T3__) + (TemplateType T4__) (TypeTrait stan::promote_args_t ((TemplateType T5__)))))) (name foo_five_args_lp) (args (((Const (Ref (TemplateType T0__))) x1) ((Const (Ref (TemplateType T1__))) x2) @@ -3663,12 +3571,10 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) - (TemplateType T3__) (TemplateType T4__) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T5__))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__) + (TemplateType T3__) (TemplateType T4__) + (TypeTrait stan::promote_args_t ((TemplateType T5__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3698,9 +3604,8 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))) -1 -1 AoS)) (name covsqrt2corsqrt) (args @@ -3710,9 +3615,8 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3859,18 +3763,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -3981,18 +3883,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4098,18 +3998,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4215,18 +4113,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4321,18 +4217,16 @@ false)) (inline false) (return_type - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))) (name f4) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -4346,18 +4240,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4453,18 +4345,16 @@ (inline false) (return_type (StdVector - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (name f5) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -4478,18 +4368,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4586,18 +4474,16 @@ (return_type (StdVector (StdVector - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__)))))))))) (name f6) (args (((Const (Ref (TemplateType T0__))) a1) ((Const (Ref (TemplateType T1__))) a2) @@ -4611,18 +4497,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4718,18 +4602,16 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 1 AoS)) (name f7) (args @@ -4744,18 +4626,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4852,18 +4732,16 @@ (return_type (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 1 AoS))) (name f8) (args @@ -4878,18 +4756,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -4987,18 +4863,16 @@ (StdVector (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 1 AoS)))) (name f9) (args @@ -5013,18 +4887,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5120,18 +4992,16 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 -1 AoS)) (name f10) (args @@ -5146,18 +5016,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5254,18 +5122,16 @@ (return_type (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 -1 AoS))) (name f11) (args @@ -5280,18 +5146,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5389,18 +5253,16 @@ (StdVector (StdVector (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))) + (TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))) -1 -1 AoS)))) (name f12) (args @@ -5415,18 +5277,16 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) - (TypeTrait stan::base_type_t ((TemplateType T5__))) - (TypeTrait stan::base_type_t ((TemplateType T6__))) - (TypeTrait stan::base_type_t ((TemplateType T7__))) - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T8__))) - (TypeTrait stan::base_type_t ((TemplateType T9__))) - (TypeTrait stan::base_type_t ((TemplateType T10__))) - (TypeTrait stan::base_type_t ((TemplateType T11__))))))))))))) + ((TypeTrait stan::promote_args_t + ((TemplateType T3__) (TypeTrait stan::base_type_t ((TemplateType T4__))) + (TypeTrait stan::base_type_t ((TemplateType T5__))) + (TypeTrait stan::base_type_t ((TemplateType T6__))) + (TypeTrait stan::base_type_t ((TemplateType T7__))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T8__))) + (TypeTrait stan::base_type_t ((TemplateType T9__))) + (TypeTrait stan::base_type_t ((TemplateType T10__))) + (TypeTrait stan::base_type_t ((TemplateType T11__))))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5623,18 +5483,14 @@ false)) (inline false) (return_type - (Matrix - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) - -1 1 AoS)) + (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) (name vecmufoo) (args (((Const (Ref (TemplateType T0__))) mu) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5681,18 +5537,14 @@ false)) (inline false) (return_type - (Matrix - (TypeTrait std::decay_t ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) - -1 1 AoS)) + (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) (name vecmubar) (args (((Const (Ref (TemplateType T0__))) mu) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body - (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t ((TemplateType T0__))))))) + (((Using local_scalar_t__ ((TypeTrait stan::promote_args_t ((TemplateType T0__))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5759,11 +5611,10 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))) -1 1 AoS)) (name algebra_system) (args @@ -5775,11 +5626,10 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))) - (TypeTrait stan::base_type_t ((TemplateType T2__))))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))) + (TypeTrait stan::base_type_t ((TemplateType T2__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) @@ -5859,10 +5709,9 @@ (inline false) (return_type (Matrix - (TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))) + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))) -1 1 AoS)) (name binomialf) (args @@ -5873,10 +5722,9 @@ (cv_qualifiers ()) (body (((Using local_scalar_t__ - ((TypeTrait std::decay_t - ((TypeTrait stan::promote_args_t - ((TypeTrait stan::base_type_t ((TemplateType T0__))) - (TypeTrait stan::base_type_t ((TemplateType T1__))))))))) + ((TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))) + (TypeTrait stan::base_type_t ((TemplateType T1__))))))) (VariableDefn ((static false) (constexpr false) (type_ Int) (name current_statement__) (init (Assignment (Literal 0))))) diff --git a/test/integration/good/code-gen/ode/cpp.expected b/test/integration/good/code-gen/ode/cpp.expected index a59cc0c66..48523e3e4 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -47,8 +47,7 @@ template >, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__); template , @@ -57,8 +56,7 @@ template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -Eigen::Matrix, T2__>>,-1,1> +Eigen::Matrix, T2__>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -Eigen::Matrix, T3__>>,-1,1> +Eigen::Matrix, T3__>,-1,1> f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, std::ostream* pstream__); struct f_1_arg_variadic2_functor__ { @@ -81,8 +78,7 @@ struct f_1_arg_variadic2_functor__ { stan::is_vt_not_complex, stan::math::disjunction, std::is_floating_point>>* = nullptr> - Eigen::Matrix, T2__>>,-1,1> + Eigen::Matrix, T2__>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, const T2__& a) const { return f_1_arg(t, z, a, pstream__); @@ -97,8 +93,7 @@ struct f_2_arg_variadic2_functor__ { std::is_integral, stan::math::disjunction, std::is_floating_point>>* = nullptr> - Eigen::Matrix, T3__>>,-1,1> + Eigen::Matrix, T3__>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, const T2__& b, const T3__& a) const { return f_2_arg(t, z, b, a, pstream__); @@ -110,8 +105,7 @@ struct f_0_arg_variadic2_functor__ { std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> - Eigen::Matrix>>,-1,1> + Eigen::Matrix>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__) const { return f_0_arg(t, z, pstream__); } @@ -122,11 +116,10 @@ template >, stan::is_col_vector, stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -152,12 +145,11 @@ template , stan::math::disjunction, std::is_floating_point>>*> -Eigen::Matrix, T2__>>,-1,1> +Eigen::Matrix, T2__>,-1,1> f_1_arg(const T0__& t, const T1__& z_arg__, const T2__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, T2__>>; + using local_scalar_t__ = stan::promote_args_t, T2__>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -184,12 +176,11 @@ template , stan::math::disjunction, std::is_floating_point>>*> -Eigen::Matrix, T3__>>,-1,1> +Eigen::Matrix, T3__>,-1,1> f_2_arg(const T0__& t, const T1__& z_arg__, const T2__& b, const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, T3__>>; + using local_scalar_t__ = stan::promote_args_t, T3__>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -918,9 +909,8 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -Eigen::Matrix, T2__, T3__, T4__, - std::decay_t>>>,-1,1> +Eigen::Matrix, T2__, T3__, + T4__, stan::promote_args_t>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, std::ostream* pstream__); @@ -941,9 +931,8 @@ template , std::is_floating_point>, std::is_integral>* = nullptr> -Eigen::Matrix, T2__, T3__, T4__, - std::decay_t>>>,-1,1> +Eigen::Matrix, T2__, T3__, + T4__, stan::promote_args_t>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, const T7__& unused, std::ostream* pstream__); @@ -964,9 +953,8 @@ struct simple_SIR_variadic2_functor__ { std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>* = nullptr> - Eigen::Matrix, T2__, T3__, T4__, - std::decay_t>>>,-1,1> + Eigen::Matrix, T2__, + T3__, T4__, stan::promote_args_t>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta) const { @@ -989,9 +977,8 @@ struct simple_SIR_variadic2_functor__ { stan::math::disjunction, std::is_floating_point>, std::is_integral>* = nullptr> - Eigen::Matrix, T2__, T3__, T4__, - std::decay_t>>>,-1,1> + Eigen::Matrix, T2__, + T3__, T4__, stan::promote_args_t>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, const T7__& unused) const { @@ -1015,17 +1002,14 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -Eigen::Matrix, T2__, T3__, T4__, - std::decay_t>>>,-1,1> +Eigen::Matrix, T2__, T3__, + T4__, stan::promote_args_t>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, T2__, - T3__, T4__, - std::decay_t>>>; + using local_scalar_t__ = stan::promote_args_t, T2__, T3__, T4__, + stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -1085,17 +1069,14 @@ template , std::is_floating_point>, std::is_integral>*> -Eigen::Matrix, T2__, T3__, T4__, - std::decay_t>>>,-1,1> +Eigen::Matrix, T2__, T3__, + T4__, stan::promote_args_t>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& kappa, const T4__& gamma, const T5__& xi, const T6__& delta, const T7__& unused, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, T2__, - T3__, T4__, - std::decay_t>>>; + using local_scalar_t__ = stan::promote_args_t, T2__, T3__, T4__, + stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/code-gen/standalone_functions/cpp.expected b/test/integration/good/code-gen/standalone_functions/cpp.expected index 3bfe1282e..05a4ed4cb 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -34,7 +34,7 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__); template , @@ -42,7 +42,7 @@ template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> array_fun(const T0__& a, std::ostream* pstream__); template , @@ -51,7 +51,7 @@ double int_array_fun(const T0__& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__); template , std::is_integral>* = nullptr> @@ -60,7 +60,7 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t test_lgamma(const T0__& x, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); template , stan::is_vt_complex>* = nullptr> -Eigen::Matrix>>>,-1,-1> +Eigen::Matrix>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__); template , @@ -105,16 +105,15 @@ template >>>>>>* = nullptr> std::vector< std::vector< - std::vector< - std::complex>>>>>> + std::vector>>>>> array_fun(const T0__& a, std::ostream* pstream__); // real my_log1p_exp(real) template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -138,9 +137,9 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t>> +stan::promote_args_t> array_fun(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -183,9 +182,9 @@ double int_array_fun(const T0__& a, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -238,9 +237,9 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t test_lgamma(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -265,7 +264,7 @@ template >; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -283,9 +282,9 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -308,9 +307,9 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -328,9 +327,9 @@ test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { template , stan::is_vt_complex>*> -Eigen::Matrix>>>,-1,-1> +Eigen::Matrix>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -368,10 +367,9 @@ template >>>>>>*> std::vector< std::vector< - std::vector< - std::complex>>>>>> + std::vector>>>>> array_fun(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -480,7 +478,7 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__); template , @@ -488,7 +486,7 @@ template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> array_fun(const T0__& a, std::ostream* pstream__); template , @@ -497,7 +495,7 @@ double int_array_fun(const T0__& a, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__); template , std::is_integral>* = nullptr> @@ -506,7 +504,7 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t test_lgamma(const T0__& x, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__); template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); // real my_log1p_exp(real) template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -557,9 +555,9 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t>> +stan::promote_args_t> array_fun(const T0__& a, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -602,9 +600,9 @@ double int_array_fun(const T0__& a, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -657,9 +655,9 @@ int_only_multiplication(const T0__& a, const T1__& b, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t test_lgamma(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -684,7 +682,7 @@ template >; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -702,9 +700,9 @@ test_lp(const T0__& a, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -727,9 +725,9 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -813,7 +811,7 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__); template , std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__); double ode_integrate(std::ostream* pstream__); @@ -865,8 +863,8 @@ struct integrand_ode_functor__ { stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> operator()(const T0__& r, const T1__& f, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) const { return integrand_ode(r, f, theta, x_r, x_i, pstream__); @@ -876,9 +874,9 @@ struct integrand_ode_functor__ { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -921,14 +919,14 @@ template , std::is_integral>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> integrand_ode(const T0__& r, const T1__& f, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 582d7bf56..c5bba7641 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -1932,8 +1932,8 @@ template , std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { @@ -1959,8 +1959,8 @@ struct simple_SIR_functor__ { stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); @@ -1991,14 +1991,14 @@ template , std::is_integral>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -5072,8 +5072,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -5175,12 +5175,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -12754,8 +12754,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -12857,12 +12857,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14885,8 +14885,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -15179,10 +15179,10 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, T5__, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, T5__, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -20976,8 +20976,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -21079,12 +21079,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -22975,20 +22975,20 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); // real inner_lpdf(vector) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -23010,9 +23010,9 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -23461,20 +23461,20 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__); // real do_something(real) template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -23495,9 +23495,9 @@ do_something(const T0__& x, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25043,20 +25043,20 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); // vector single_ret_fun(vector) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25078,9 +25078,9 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -26159,15 +26159,15 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); // vector foo(vector) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -26766,8 +26766,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); // int first_capture(array[] int) template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27062,10 +27062,10 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -27584,9 +27584,9 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -31972,8 +31972,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -32075,12 +32075,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33813,28 +33813,27 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -baz_lpdf(const T0__& x, std::ostream* pstream__); +stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); // real foo_lpdf(real, real) template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33856,9 +33855,9 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -33879,9 +33878,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -baz_lpdf(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -36477,7 +36475,7 @@ template >; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -38111,8 +38109,7 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> -dumb(const T0__& x, std::ostream* pstream__); +stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); @@ -38120,9 +38117,8 @@ double dumb(const T0__& x, std::ostream* pstream__); template , std::is_floating_point>>*> -std::decay_t> -dumb(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -38496,22 +38492,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__); // real foo(vector) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -38557,9 +38553,9 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { template , std::is_floating_point>>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index edae4af24..ec6ed798f 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -716,8 +716,8 @@ template , std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { @@ -743,8 +743,8 @@ struct simple_SIR_functor__ { stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); @@ -775,14 +775,14 @@ template , std::is_integral>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -2547,8 +2547,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -2621,12 +2621,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8546,8 +8546,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -8620,12 +8620,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9734,8 +9734,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9923,10 +9923,10 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, T5__, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, T5__, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -12884,8 +12884,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -12958,12 +12958,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -13865,20 +13865,20 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); // real inner_lpdf(vector) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -13897,9 +13897,9 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14278,20 +14278,20 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__); // real do_something(real) template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14318,9 +14318,9 @@ do_something(const T0__& x, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -15581,20 +15581,20 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); // vector single_ret_fun(vector) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -15616,9 +15616,9 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16565,15 +16565,15 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); // vector foo(vector) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -17145,8 +17145,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); // int first_capture(array[] int) template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -17336,10 +17336,10 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -17563,9 +17563,9 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -19834,8 +19834,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -19908,12 +19908,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -20741,28 +20741,27 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -baz_lpdf(const T0__& x, std::ostream* pstream__); +stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); // real foo_lpdf(real, real) template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -20781,9 +20780,9 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -20801,9 +20800,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -baz_lpdf(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -23082,7 +23080,7 @@ template >; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -24174,8 +24172,7 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> -dumb(const T0__& x, std::ostream* pstream__); +stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); @@ -24183,9 +24180,8 @@ double dumb(const T0__& x, std::ostream* pstream__); template , std::is_floating_point>>*> -std::decay_t> -dumb(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -24545,22 +24541,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__); // real foo(vector) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -24600,9 +24596,9 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { template , std::is_floating_point>>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index beb7af33f..a51a07e58 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -698,8 +698,8 @@ template , std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__); struct simple_SIR_functor__ { @@ -725,8 +725,8 @@ struct simple_SIR_functor__ { stan::is_std_vector, std::is_integral>>* = nullptr> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> operator()(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) const { return simple_SIR(t, y, theta, x_r, x_i, pstream__); @@ -757,14 +757,14 @@ template , std::is_integral>>*> std::vector< - std::decay_t, - stan::base_type_t, stan::base_type_t>>> + stan::promote_args_t, + stan::base_type_t, stan::base_type_t>> simple_SIR(const T0__& t, const T1__& y, const T2__& theta, const T3__& x_r, const T4__& x_i, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -2510,8 +2510,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -2584,12 +2584,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8638,8 +8638,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -8712,12 +8712,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9998,8 +9998,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10188,10 +10188,10 @@ js_super_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& psi, const T6__& nu_arg__, const T7__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, T5__, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, T5__, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -13812,8 +13812,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -13886,12 +13886,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14964,20 +14964,20 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); // real inner_lpdf(vector) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -14996,9 +14996,9 @@ inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -15394,20 +15394,20 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__); // real do_something(real) template , std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -15428,9 +15428,9 @@ do_something(const T0__& x, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16730,20 +16730,20 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__); // vector single_ret_fun(vector) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -16765,9 +16765,9 @@ single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -17774,15 +17774,15 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); // vector foo(vector) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -18392,8 +18392,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); // int first_capture(array[] int) template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -18584,10 +18584,10 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, const T3__& p_arg__, const T4__& phi_arg__, const T5__& gamma_arg__, const T6__& chi_arg__, T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - stan::base_type_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, + stan::base_type_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -18807,9 +18807,9 @@ jolly_seber_lp(const T0__& y, const T1__& first, const T2__& last, template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -21801,8 +21801,8 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__); // int first_capture(array[] int) @@ -21875,12 +21875,12 @@ template , stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix, - stan::base_type_t>>,-1,-1> +Eigen::Matrix, + stan::base_type_t>,-1,-1> prob_uncaptured(const T0__& nind, const T1__& n_occasions, const T2__& p_arg__, const T3__& phi_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -22883,28 +22883,27 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -std::decay_t> -baz_lpdf(const T0__& x, std::ostream* pstream__); +stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); // real foo_lpdf(real, real) template , std::is_floating_point>, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -22923,9 +22922,9 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -22943,9 +22942,8 @@ bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { template , std::is_floating_point>>*> -std::decay_t> -baz_lpdf(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -25229,7 +25227,7 @@ template >; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -26383,8 +26381,7 @@ static constexpr std::array locations_array__ = template , std::is_floating_point>>* = nullptr> -std::decay_t> -dumb(const T0__& x, std::ostream* pstream__); +stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); template >* = nullptr> double dumb(const T0__& x, std::ostream* pstream__); @@ -26392,9 +26389,8 @@ double dumb(const T0__& x, std::ostream* pstream__); template , std::is_floating_point>>*> -std::decay_t> -dumb(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; +stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -26754,22 +26750,22 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -std::decay_t>> +stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__); template void bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__); template , std::is_floating_point>>* = nullptr> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__); // real foo(vector) template , stan::is_vt_not_complex>*> -std::decay_t>> +stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -26809,9 +26805,9 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { template , std::is_floating_point>>*> -Eigen::Matrix>,-1,1> +Eigen::Matrix,-1,1> foo(const T0__& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected index d6f1d8a82..a6d0ea9bd 100644 --- a/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected +++ b/test/integration/good/compiler-optimizations/mem_patterns/cpp.expected @@ -4339,7 +4339,7 @@ int mask_fun(const T0__& i, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__); // int mask_fun(int) template >*> int @@ -4365,9 +4365,9 @@ mask_fun(const T0__& i, std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,1> +Eigen::Matrix>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7332,24 +7332,23 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__); // matrix nono_func(matrix) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -7373,12 +7372,11 @@ template >, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -8035,7 +8033,7 @@ Eigen::Matrix empty_user_func(std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__); // matrix empty_user_func() Eigen::Matrix empty_user_func(std::ostream* pstream__) { @@ -8062,9 +8060,9 @@ Eigen::Matrix empty_user_func(std::ostream* pstream__) { template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9267,24 +9265,23 @@ static constexpr std::array locations_array__ = template , stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__); template , std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>* = nullptr> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__); // matrix nono_func(matrix) template , stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -9308,12 +9305,11 @@ template >, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> -Eigen::Matrix>>,-1,-1> +Eigen::Matrix>,-1,-1> okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index 8a7422006..bbc3ba6e4 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -9614,8 +9614,7 @@ template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> dummy(const std::tuple& test, std::ostream* pstream__); // real dummy(tuple(array[] real, array[] real)) template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t, - stan::base_type_t>> +stan::promote_args_t, stan::base_type_t> dummy(const std::tuple& test, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10677,7 +10675,7 @@ template >, std::is_floating_point< stan::value_type_t>>>* = nullptr> -std::decay_t>> +stan::promote_args_t> tsum(const std::tuple& s, std::ostream* pstream__); template , @@ -10716,7 +10714,7 @@ template , std::is_integral>*> void foo(const std::tuple& test, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10745,9 +10743,9 @@ template >, std::is_floating_point< stan::value_type_t>>>*> -std::decay_t>> +stan::promote_args_t> tsum(const std::tuple& s, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10772,7 +10770,7 @@ template >& test, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10801,8 +10799,8 @@ template , stan::is_vt_not_complex>*> void foo3(const std::tuple& test, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>>; + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -10843,10 +10841,9 @@ overly_complicated(const std::tuple, T0__2__>& t1, const std::vector>& t2, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t, - T0__2__, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t, T0__2__, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -11337,8 +11334,8 @@ template , stan::is_vt_not_complex>*> void f(const std::tuple& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -11375,8 +11372,8 @@ template >>>*> void g(const std::tuple& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - stan::base_type_t>>; + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -11972,7 +11969,7 @@ template >, stan::is_std_vector, std::is_integral>>* = nullptr> -std::decay_t, T3__0__>> +stan::promote_args_t, T3__0__> fun(const T0__& y_slice, const T1__& start, const T2__& end, const std::tuple& m, std::ostream* pstream__); struct fun_rsfunctor__ { @@ -11989,7 +11986,7 @@ struct fun_rsfunctor__ { std::is_floating_point>, stan::is_std_vector, std::is_integral>>* = nullptr> - std::decay_t, T3__0__>> + stan::promote_args_t, T3__0__> operator()(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__, const std::tuple& m) const { return fun(y_slice, (start + 1), (end + 1), m, pstream__); @@ -12008,11 +12005,11 @@ template >, stan::is_std_vector, std::is_integral>>*> -std::decay_t, T3__0__>> +stan::promote_args_t, T3__0__> fun(const T0__& y_slice, const T1__& start, const T2__& end, const std::tuple& m, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t, - T3__0__>>; + using local_scalar_t__ = stan::promote_args_t, + T3__0__>; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -12469,8 +12466,7 @@ template >, stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpdf(const std::tuple& x, const std::tuple& y, std::ostream* pstream__); @@ -12487,13 +12483,12 @@ template >, stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lpdf(const std::tuple& x, const std::tuple& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -12831,16 +12826,16 @@ template , std::is_floating_point>, std::is_integral>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpdf(const std::tuple& x, std::ostream* pstream__); // real foo_lpdf(tuple(real, int)) template , std::is_floating_point>, std::is_integral>*> -std::decay_t> +stan::promote_args_t foo_lpdf(const std::tuple& x, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; @@ -13177,7 +13172,7 @@ template , stan::math::disjunction, std::is_floating_point>>* = nullptr> -std::decay_t> +stan::promote_args_t foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__); // real foo_lpmf(tuple(int, int), real) @@ -13186,10 +13181,10 @@ template , stan::math::disjunction, std::is_floating_point>>*> -std::decay_t> +stan::promote_args_t foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__) { - using local_scalar_t__ = std::decay_t>; + using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; // suppress unused var warning (void) current_statement__; From 26a20f81c7bb516494da5560b24147a7964b9c2f Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 12:23:52 -0400 Subject: [PATCH 15/16] More extensive tuple-in-tuple test --- test/integration/good/tuples/cpp.expected | 173 ++++++++++-- test/integration/good/tuples/pretty.expected | 15 + .../good/tuples/transformed_mir.expected | 267 +++++++++++++++++- .../good/tuples/tuple_copying.stan | 15 + 4 files changed, 442 insertions(+), 28 deletions(-) diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index bbc3ba6e4..3675a1d91 100644 --- a/test/integration/good/tuples/cpp.expected +++ b/test/integration/good/tuples/cpp.expected @@ -11292,24 +11292,33 @@ namespace tuple_copying_model_namespace { using stan::model::model_base_crtp; using namespace stan::math; stan::math::profile_map profiles__; -static constexpr std::array locations_array__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'tuple_copying.stan', line 18, column 2 to column 22)", - " (in 'tuple_copying.stan', line 21, column 2 to column 56)", - " (in 'tuple_copying.stan', line 22, column 2 to column 10)", - " (in 'tuple_copying.stan', line 24, column 2 to column 18)", - " (in 'tuple_copying.stan', line 26, column 2 to column 67)", - " (in 'tuple_copying.stan', line 27, column 2 to column 11)", - " (in 'tuple_copying.stan', line 29, column 2 to column 21)", - " (in 'tuple_copying.stan', line 14, column 2 to column 17)", - " (in 'tuple_copying.stan', line 15, column 2 to column 19)", + " (in 'tuple_copying.stan', line 27, column 2 to column 22)", + " (in 'tuple_copying.stan', line 30, column 2 to column 56)", + " (in 'tuple_copying.stan', line 31, column 2 to column 10)", + " (in 'tuple_copying.stan', line 33, column 2 to column 18)", + " (in 'tuple_copying.stan', line 35, column 2 to column 67)", + " (in 'tuple_copying.stan', line 36, column 2 to column 11)", + " (in 'tuple_copying.stan', line 38, column 2 to column 21)", + " (in 'tuple_copying.stan', line 41, column 2 to column 75)", + " (in 'tuple_copying.stan', line 42, column 2 to column 11)", + " (in 'tuple_copying.stan', line 43, column 2 to column 21)", + " (in 'tuple_copying.stan', line 44, column 2 to column 17)", + " (in 'tuple_copying.stan', line 20, column 2 to column 17)", + " (in 'tuple_copying.stan', line 21, column 2 to column 19)", + " (in 'tuple_copying.stan', line 24, column 2 to column 49)", " (in 'tuple_copying.stan', line 3, column 4 to column 15)", " (in 'tuple_copying.stan', line 4, column 4 to column 15)", " (in 'tuple_copying.stan', line 2, column 34 to line 5, column 3)", " (in 'tuple_copying.stan', line 8, column 4 to column 15)", " (in 'tuple_copying.stan', line 9, column 4 to column 15)", " (in 'tuple_copying.stan', line 10, column 4 to column 15)", - " (in 'tuple_copying.stan', line 7, column 45 to line 11, column 3)"}; + " (in 'tuple_copying.stan', line 7, column 45 to line 11, column 3)", + " (in 'tuple_copying.stan', line 14, column 4 to column 15)", + " (in 'tuple_copying.stan', line 15, column 4 to column 17)", + " (in 'tuple_copying.stan', line 16, column 4 to column 17)", + " (in 'tuple_copying.stan', line 13, column 53 to line 17, column 3)"}; template , stan::is_vt_not_complex, @@ -11327,6 +11336,19 @@ template >>>* = nullptr> void g(const std::tuple& x, std::ostream* pstream__); +template , + std::is_floating_point>, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +void +h(const std::tuple>& x, + std::ostream* pstream__); // void f(tuple(matrix, matrix)) template , @@ -11346,12 +11368,12 @@ void f(const std::tuple& x, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; try { - current_statement__ = 10; + current_statement__ = 15; if (pstream__) { stan::math::stan_print(pstream__, std::get<0>(x)); *(pstream__) << std::endl; } - current_statement__ = 11; + current_statement__ = 16; if (pstream__) { stan::math::stan_print(pstream__, std::get<1>(x)); *(pstream__) << std::endl; @@ -11384,17 +11406,17 @@ g(const std::tuple& x, std::ostream* pstream__) { // suppress unused var warning (void) DUMMY_VAR__; try { - current_statement__ = 13; + current_statement__ = 18; if (pstream__) { stan::math::stan_print(pstream__, std::get<0>(x)); *(pstream__) << std::endl; } - current_statement__ = 14; + current_statement__ = 19; if (pstream__) { stan::math::stan_print(pstream__, std::get<1>(x)); *(pstream__) << std::endl; } - current_statement__ = 15; + current_statement__ = 20; if (pstream__) { stan::math::stan_print(pstream__, std::get<2>(x)); *(pstream__) << std::endl; @@ -11403,10 +11425,57 @@ g(const std::tuple& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void h(tuple(real, tuple(matrix, array[] real))) +template , + std::is_floating_point>, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +void +h(const std::tuple>& x, + std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t, + stan::base_type_t>; + int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; + static constexpr bool propto__ = true; + // suppress unused var warning + (void) propto__; + local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); + // suppress unused var warning + (void) DUMMY_VAR__; + try { + current_statement__ = 22; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 23; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(std::get<1>(x))); + *(pstream__) << std::endl; + } + current_statement__ = 24; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(std::get<1>(x))); + *(pstream__) << std::endl; + } + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } +} class tuple_copying_model final : public model_base_crtp { private: Eigen::Matrix x_data__; std::vector y; + std::tuple, std::vector> data_tuple; Eigen::Map> x{nullptr, 0, 0}; public: ~tuple_copying_model() {} @@ -11431,7 +11500,7 @@ class tuple_copying_model final : public model_base_crtp { try { int pos__ = std::numeric_limits::min(); pos__ = 1; - current_statement__ = 8; + current_statement__ = 12; context__.validate_dims("data initialization", "x", "double", std::vector{static_cast(2), static_cast(2)}); x_data__ = Eigen::Matrix::Constant(2, 2, @@ -11439,7 +11508,7 @@ class tuple_copying_model final : public model_base_crtp { new (&x) Eigen::Map>(x_data__.data(), 2, 2); { std::vector x_flat__; - current_statement__ = 8; + current_statement__ = 12; x_flat__ = context__.vals_r("x"); pos__ = 1; for (int sym1__ = 1; sym1__ <= 2; ++sym1__) { @@ -11451,12 +11520,20 @@ class tuple_copying_model final : public model_base_crtp { } } } - current_statement__ = 9; + current_statement__ = 13; context__.validate_dims("data initialization", "y", "double", std::vector{static_cast(10)}); y = std::vector(10, std::numeric_limits::quiet_NaN()); - current_statement__ = 9; + current_statement__ = 13; y = context__.vals_r("y"); + current_statement__ = 14; + data_tuple = std::tuple, + std::vector>{Eigen::Matrix::Constant(2, + 2, + std::numeric_limits::quiet_NaN( + )), + std::vector(10, + std::numeric_limits::quiet_NaN())}; } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } @@ -11540,6 +11617,34 @@ class tuple_copying_model final : public model_base_crtp { std::tuple, int, const std::vector&>(stan::math::add(m1, m2), 1, y), pstream__); + std::tuple, + std::vector>> temp3 = + std::tuple, + std::vector>>{DUMMY_VAR__, + std::tuple, + std::vector>{Eigen::Matrix::Constant(2, + 2, DUMMY_VAR__), + std::vector(10, DUMMY_VAR__)}}; + current_statement__ = 8; + stan::model::assign(temp3, + std::tuple, std::vector>>(1, + data_tuple), "assigning variable temp3"); + current_statement__ = 9; + h(temp3, pstream__); + current_statement__ = 10; + h( + std::tuple, std::vector>>(1, + data_tuple), pstream__); + current_statement__ = 11; + h( + std::tuple, std::vector>>(1, + std::tuple&, + const std::vector&>(x, y)), pstream__); } } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); @@ -11618,6 +11723,34 @@ class tuple_copying_model final : public model_base_crtp { std::tuple, int, const std::vector&>(stan::math::add(m1, m2), 1, y), pstream__); + std::tuple, + std::vector>> temp3 = + std::tuple, + std::vector>>{DUMMY_VAR__, + std::tuple, + std::vector>{Eigen::Matrix::Constant(2, + 2, DUMMY_VAR__), + std::vector(10, DUMMY_VAR__)}}; + current_statement__ = 8; + stan::model::assign(temp3, + std::tuple, std::vector>>(1, + data_tuple), "assigning variable temp3"); + current_statement__ = 9; + h(temp3, pstream__); + current_statement__ = 10; + h( + std::tuple, std::vector>>(1, + data_tuple), pstream__); + current_statement__ = 11; + h( + std::tuple, std::vector>>(1, + std::tuple&, + const std::vector&>(x, y)), pstream__); } } catch (const std::exception& e) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); diff --git a/test/integration/good/tuples/pretty.expected b/test/integration/good/tuples/pretty.expected index 0ddab9bd6..c9780c9ec 100644 --- a/test/integration/good/tuples/pretty.expected +++ b/test/integration/good/tuples/pretty.expected @@ -254,11 +254,20 @@ functions { print(x.2); print(x.3); } + + void h(tuple(real, tuple(matrix, array[] real)) x) { + print(x.1); + print(x.2.1); + print(x.2.2); + } } data { matrix[2, 2] x; array[10] real y; } +transformed data { + tuple(matrix[2, 2], array[10] real) data_tuple; +} parameters { matrix[3, 3] m1, m2; } @@ -272,6 +281,12 @@ model { g(temp2); g((m1 + m2, 1, y)); + + // note: these will have additional copies for now + tuple(real, tuple(matrix[2, 2], array[10] real)) temp3 = (1, data_tuple); + h(temp3); + h((1, data_tuple)); + h((1, (x, y))); } $ ../../../../../install/default/bin/stanc --auto-format tuple_hof.stan diff --git a/test/integration/good/tuples/transformed_mir.expected b/test/integration/good/tuples/transformed_mir.expected index 0bfa9992f..184836042 100644 --- a/test/integration/good/tuples/transformed_mir.expected +++ b/test/integration/good/tuples/transformed_mir.expected @@ -18837,21 +18837,79 @@ (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable))))))) (meta ))))) (meta )))) + (fdloc )) + ((fdrt Void) (fdname h) (fdsuffix FnPlain) + (fdargs ((AutoDiffable x (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))))) + (fdbody + (((pattern + (Block + (((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel + (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable)))))))) + 1)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel + (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable)))))))) + 2)) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 1)) + (meta ((type_ UMatrix) (loc ) (adlevel AutoDiffable))))))) + (meta )) + ((pattern + (NRFunApp (CompilerInternal FnPrint) + (((pattern + (TupleProjection + ((pattern + (TupleProjection + ((pattern (Var x)) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel + (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable)))))))) + 2)) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (AutoDiffable AutoDiffable)))))) + 2)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) (fdloc )))) (input_vars ((x ((begin_loc - ((filename tuple_copying.stan) (line_num 14) (col_num 2) (included_from ()))) + ((filename tuple_copying.stan) (line_num 20) (col_num 2) (included_from ()))) (end_loc - ((filename tuple_copying.stan) (line_num 14) (col_num 17) (included_from ())))) + ((filename tuple_copying.stan) (line_num 20) (col_num 17) (included_from ())))) (SMatrix AoS ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) ((pattern (Lit Int 2)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))) (y ((begin_loc - ((filename tuple_copying.stan) (line_num 15) (col_num 2) (included_from ()))) + ((filename tuple_copying.stan) (line_num 21) (col_num 2) (included_from ()))) (end_loc - ((filename tuple_copying.stan) (line_num 15) (col_num 19) (included_from ())))) + ((filename tuple_copying.stan) (line_num 21) (col_num 19) (included_from ())))) (SArray SReal ((pattern (Lit Int 10)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))))))) (prepare_data @@ -18962,6 +19020,21 @@ (((pattern (Lit Str y)) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly)))))) + (meta )) + ((pattern + (Decl (decl_adtype (TupleAD (DataOnly DataOnly))) (decl_id data_tuple) + (decl_type + (Sized + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SArray SReal + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))) + (initialize true))) (meta )))) (log_prob (((pattern @@ -19133,6 +19206,95 @@ (meta ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) (adlevel (TupleAD (AutoDiffable DataOnly DataOnly))))))))) + (meta )) + ((pattern + (Decl + (decl_adtype (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable))))) + (decl_id temp3) + (decl_type + (Sized + (STuple + (SReal + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SArray SReal + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp3) ()) + (UTuple (UReal (UTuple (UMatrix (UArray UReal))))) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Var data_tuple)) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) (adlevel (TupleAD (DataOnly (TupleAD (DataOnly DataOnly)))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined h FnPlain) + (((pattern (Var temp3)) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable))))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined h FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Var data_tuple)) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel (TupleAD (DataOnly (TupleAD (DataOnly DataOnly))))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined h FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel (TupleAD (DataOnly (TupleAD (DataOnly DataOnly))))))))))) (meta ))))) (meta )))) (reverse_mode_log_prob @@ -19305,6 +19467,95 @@ (meta ((type_ (UTuple (UMatrix UInt (UArray UReal)))) (loc ) (adlevel (TupleAD (AutoDiffable DataOnly DataOnly))))))))) + (meta )) + ((pattern + (Decl + (decl_adtype (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable))))) + (decl_id temp3) + (decl_type + (Sized + (STuple + (SReal + (STuple + ((SMatrix AoS + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + ((pattern (Lit Int 2)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))) + (SArray SReal + ((pattern (Lit Int 10)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly))))))))))) + (initialize true))) + (meta )) + ((pattern + (Assignment ((LVariable temp3) ()) + (UTuple (UReal (UTuple (UMatrix (UArray UReal))))) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Var data_tuple)) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) (adlevel (TupleAD (DataOnly (TupleAD (DataOnly DataOnly)))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined h FnPlain) + (((pattern (Var temp3)) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel (TupleAD (AutoDiffable (TupleAD (AutoDiffable AutoDiffable))))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined h FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern (Var data_tuple)) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel (TupleAD (DataOnly (TupleAD (DataOnly DataOnly))))))))))) + (meta )) + ((pattern + (NRFunApp (UserDefined h FnPlain) + (((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern + (Promotion + ((pattern (Lit Int 1)) + (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) + UReal DataOnly)) + (meta ((type_ UReal) (loc ) (adlevel DataOnly)))) + ((pattern + (FunApp (CompilerInternal FnMakeTuple) + (((pattern (Var x)) + (meta ((type_ UMatrix) (loc ) (adlevel DataOnly)))) + ((pattern (Var y)) + (meta ((type_ (UArray UReal)) (loc ) (adlevel DataOnly))))))) + (meta + ((type_ (UTuple (UMatrix (UArray UReal)))) (loc ) + (adlevel (TupleAD (DataOnly DataOnly))))))))) + (meta + ((type_ (UTuple (UReal (UTuple (UMatrix (UArray UReal)))))) + (loc ) + (adlevel (TupleAD (DataOnly (TupleAD (DataOnly DataOnly))))))))))) (meta ))))) (meta )))) (generate_quantities @@ -19642,9 +19893,9 @@ (output_vars ((m1 ((begin_loc - ((filename tuple_copying.stan) (line_num 18) (col_num 2) (included_from ()))) + ((filename tuple_copying.stan) (line_num 27) (col_num 2) (included_from ()))) (end_loc - ((filename tuple_copying.stan) (line_num 18) (col_num 22) (included_from ())))) + ((filename tuple_copying.stan) (line_num 27) (col_num 22) (included_from ())))) ((out_unconstrained_st (SMatrix AoS ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) @@ -19656,9 +19907,9 @@ (out_block Parameters) (out_trans Identity))) (m2 ((begin_loc - ((filename tuple_copying.stan) (line_num 18) (col_num 2) (included_from ()))) + ((filename tuple_copying.stan) (line_num 27) (col_num 2) (included_from ()))) (end_loc - ((filename tuple_copying.stan) (line_num 18) (col_num 22) (included_from ())))) + ((filename tuple_copying.stan) (line_num 27) (col_num 22) (included_from ())))) ((out_unconstrained_st (SMatrix AoS ((pattern (Lit Int 3)) (meta ((type_ UInt) (loc ) (adlevel DataOnly)))) diff --git a/test/integration/good/tuples/tuple_copying.stan b/test/integration/good/tuples/tuple_copying.stan index ca92802cd..6c39f5d46 100644 --- a/test/integration/good/tuples/tuple_copying.stan +++ b/test/integration/good/tuples/tuple_copying.stan @@ -9,11 +9,20 @@ functions { print(x.2); print(x.3); } + + void h(tuple(real, tuple(matrix, array[] real)) x) { + print(x.1); + print(x.2.1); + print(x.2.2); + } } data { matrix[2, 2] x; array[10] real y; } +transformed data { + tuple(matrix[2, 2], array[10] real) data_tuple; +} parameters { matrix[3, 3] m1, m2; } @@ -27,4 +36,10 @@ model { g(temp2); g((m1 + m2, 1, y)); + + // note: these will have additional copies for now + tuple(real, tuple(matrix[2, 2], array[10] real)) temp3 = (1, data_tuple); + h(temp3); + h((1, data_tuple)); + h((1, (x, y))); } From ca286a2f51d90d61ebc525fa089c09fbb8dc4286 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 14:25:22 -0400 Subject: [PATCH 16/16] Changes per review --- src/frontend/Ast_to_Mir.ml | 9 +- src/stan_math_backend/Lower_functions.ml | 32 +++-- test/integration/good/code-gen/cpp.expected | 116 ++++++++++-------- test/integration/good/code-gen/lir.expected | 95 +++++++------- .../standalone_functions/cpp.expected | 4 +- .../good/compiler-optimizations/cpp.expected | 15 +-- .../compiler-optimizations/cppO0.expected | 15 +-- .../compiler-optimizations/cppO1.expected | 15 +-- test/integration/good/tuples/cpp.expected | 5 +- 9 files changed, 166 insertions(+), 140 deletions(-) diff --git a/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index f3b8908ad..8344954cc 100644 --- a/src/frontend/Ast_to_Mir.ml +++ b/src/frontend/Ast_to_Mir.ml @@ -143,7 +143,7 @@ let truncate_dist ud_dists (id : Ast.identifier) , Some y ) } in let funapp meta kind name args = Expr.{Fixed.pattern= FunApp (trans_fn_kind kind name, args); meta} in - let ensure_type tp lb : Expr.Typed.t = + let maybe_promote_to_real tp lb : Expr.Typed.t = match (tp, Expr.Typed.type_of lb) with | UnsizedType.UInt, _ -> lb | _, UInt -> @@ -153,7 +153,7 @@ let truncate_dist ud_dists (id : Ast.identifier) let inclusive_bound tp (lb : Expr.Typed.t) = if UnsizedType.is_int_type tp then Expr.Helpers.binop lb Minus Expr.Helpers.one - else ensure_type tp lb in + else maybe_promote_to_real tp lb in let size_adjust e = if (not (UnsizedType.is_container ast_obs.Ast.emeta.type_)) @@ -185,13 +185,14 @@ let truncate_dist ud_dists (id : Ast.identifier) (targetme ub.meta.loc (size_adjust (funapp ub.meta fk fn - (ensure_type tp ub :: trans_exprs ast_args) ) ) ) ] + (maybe_promote_to_real tp ub :: trans_exprs ast_args) ) ) ) + ] | TruncateBetween (lb, ub) -> let fk, fn, tp = find_function_info cdf_suffices in let lb, ub = (trans_expr lb, trans_expr ub) in let expr args = funapp ub.meta (Ast.StanLib FnPlain) "log_diff_exp" - [ funapp ub.meta fk fn (ensure_type tp ub :: args) + [ funapp ub.meta fk fn (maybe_promote_to_real tp ub :: args) ; funapp ub.meta fk fn (inclusive_bound tp lb :: args) ] in let statement = match diff --git a/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 94df54ab7..62140669a 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -261,15 +261,17 @@ let extra_suffix_args fdsuffix = | FnRng -> (["base_rng__"], ["RNG"]) | FnLpdf _ | FnPlain -> ([], []) +let signature_comment Program.{fdrt; fdname; fdargs; _} = + GlobalComment + Fmt.( + str "@[<1>@[%a@]@ %s(@[%a@])@]" UnsizedType.pp_returntype fdrt + fdname + (list ~sep:comma (box UnsizedType.pp_fun_arg)) + (List.map ~f:(fun (ad, _id, ty) -> (ad, ty)) fdargs)) + let lower_fun_def (functors : Lower_expr.variadic list) Program.{fdrt; fdname; fdsuffix; fdargs; fdbody; _} : - defn * fun_defn * struct_defn list = - let comment = - GlobalComment - Fmt.( - str "%a %s(@[%a@])" UnsizedType.pp_returntype fdrt fdname - (list ~sep:comma UnsizedType.pp_fun_arg) - (List.map ~f:(fun (ad, _id, ty) -> (ad, ty)) fdargs)) in + fun_defn * struct_defn list = let extra_arg_names, extra_template_names = extra_suffix_args fdsuffix in let template_parameter_and_arg_names is_possibly_eigen_expr variadic_fun_type = @@ -329,7 +331,7 @@ let lower_fun_def (functors : Lower_expr.variadic list) ~args:cpp_args ~cv_qualifiers:[Const] ~body:defn_body () in make_struct_defn ~param:struct_template ~name:functor_name ~body:[FunDef functor_decl] () in - (comment, fd, functors |> List.map ~f:register_functor) + (fd, functors |> List.map ~f:register_functor) let get_functor_requirements (p : Program.Numbered.t) = let open Expr.Fixed in @@ -365,21 +367,21 @@ let collect_functors_functions (p : Program.Numbered.t) : defn list = |> List.stable_dedup |> List.filter_map ~f:(fun (hof, types) -> if matching_argtypes d types then Some hof else None ) in - let comment, fn, st = lower_fun_def functors d in + let fn, st = lower_fun_def functors d in List.iter st ~f:(fun s -> (* Side effecting, collates functor structs *) Hashtbl.update structs s.struct_name ~f:(function | Some x -> {x with body= x.body @ s.body} | None -> s ) ) ; - (comment, fn) in + fn in let fun_decls, fun_defns = p.functions_block |> List.filter_map ~f:(fun d -> - let comment, fn = register_functors d in + let fn = register_functors d in if Option.is_none d.fdbody then None else let decl, defn = Cpp.split_fun_decl_defn fn in - Some (FunDef decl, [comment; FunDef defn]) ) + Some (FunDef decl, [signature_comment d; FunDef defn]) ) |> List.unzip in let structs = Hashtbl.data structs |> List.map ~f:(fun s -> Struct s) in fun_decls @ structs @ List.concat fun_defns @@ -426,9 +428,7 @@ module Testing = struct open Fmt let pp_fun_def_test ppf a = - let comment, defn, st = lower_fun_def [FixedArgs] a in - Cpp.Printing.pp_defn ppf comment ; - cut ppf () ; + let defn, st = lower_fun_def [FixedArgs] a in Cpp.Printing.pp_fun_defn ppf defn ; cut ppf () ; (list ~sep:cut Cpp.Printing.pp_struct_defn) ppf st @@ -455,7 +455,6 @@ module Testing = struct |> print_endline ; [%expect {| - // void sars(data matrix, row_vector) template , stan::is_vt_not_complex, @@ -518,7 +517,6 @@ module Testing = struct |> print_endline ; [%expect {| - // matrix sars(data matrix, row_vector, row_vector, array[] matrix) template , stan::is_vt_not_complex, diff --git a/test/integration/good/code-gen/cpp.expected b/test/integration/good/code-gen/cpp.expected index 5718da0f6..ca2d7ff95 100644 --- a/test/integration/good/code-gen/cpp.expected +++ b/test/integration/good/code-gen/cpp.expected @@ -915,10 +915,8 @@ f(const T0__& x, std::vector< std::tuple>, T1__1__>>>& x2, std::ostream* pstream__); -/* tuple(int, array[] tuple(int, real)) f(int, - array[,] tuple(array[] tuple(int, - int), - array[,] int)) +/* tuple(int, array[] tuple(int, real)) + f(int, array[,] tuple(array[] tuple(int, int), array[,] int)) */ template , @@ -7921,9 +7919,10 @@ covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -/* void f0(int, array[] int, array[,] int, real, array[] real, array[,] real, - vector, array[] vector, array[,] vector, matrix, array[] matrix, - array[,] matrix) +/* void + f0(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) */ template & test, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -/* void overly_complicated(tuple(array[] matrix, tuple(int, matrix), real), - array[] tuple(int, matrix)) +/* void + overly_complicated(tuple(array[] matrix, tuple(int, matrix), real), + array[] tuple(int, matrix)) */ template