diff --git a/Jenkinsfile b/Jenkinsfile index 25bb7fa038..986491e86c 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} """ diff --git a/src/analysis_and_optimization/Memory_patterns.ml b/src/analysis_and_optimization/Memory_patterns.ml index 281bfc5752..80321e6628 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/src/frontend/Ast_to_Mir.ml b/src/frontend/Ast_to_Mir.ml index 06b9ffb6c9..8344954cc1 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 maybe_promote_to_real 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 maybe_promote_to_real tp lb in let size_adjust e = if (not (UnsizedType.is_container ast_obs.Ast.emeta.type_)) @@ -172,18 +179,20 @@ 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 + (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 (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/Cpp.ml b/src/stan_math_backend/Cpp.ml index 3b33a01581..7c1914d6ef 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 @@ -266,6 +267,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 +301,7 @@ end type template_parameter = | Typename of string (** The name of a template typename *) - | RequireIs of string * string + | 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<> *) @@ -412,7 +414,14 @@ 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_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 @@ -420,7 +429,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 @@ -432,7 +441,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)) ) @@ -727,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 @@ -762,7 +771,10 @@ module Tests = struct let funs = [ make_fun_defn ~templates_init: - ([[Typename "T0__"; RequireIs ("stan::is_foobar", "T0__")]], true) + ( [ [ Typename "T0__" + ; RequireAllCondition + (`Exact "stan::is_foobar", TemplateType "T0__") ] ] + , true ) ~name:"foobar" ~return_type:Void ~inline:true () ; (let s = [ Comment "A potentially \n long comment" @@ -770,7 +782,10 @@ 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__" + ; RequireAllCondition + (`Exact "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_expr.ml b/src/stan_math_backend/Lower_expr.ml index b4d3d5283f..4ac3d0efc0 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 @@ -400,23 +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 = - (* 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 _ -> 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 - Constructor - ( Tuple - (List.map es ~f:(fun {meta= {adlevel; type_; _}; _} -> - lower_unsizedtype_local adlevel type_ ) ) - , 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/src/stan_math_backend/Lower_functions.ml b/src/stan_math_backend/Lower_functions.ml index 412d407234..62140669a8 100644 --- a/src/stan_math_backend/Lower_functions.ml +++ b/src/stan_math_backend/Lower_functions.ml @@ -4,27 +4,6 @@ open Lower_expr open Lower_stmt 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 - |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 -> - (* Expressions are not accepted for arrays of Eigen::Matrix *) - StdVector (lower_type t inner_type) - | 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_eigen_expr ut scalar - let lower_arg ~is_possibly_eigen_expr type_ (_, name, ut) = (* we add the _arg suffix for any Eigen types *) let opt_arg_suffix = @@ -33,33 +12,57 @@ 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 = - 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 *) - | _ -> [RequireIs ("stan::is_stan_scalar", t)] + let t = TemplateType t in + let rec requires_in ut t = + match ut with + | UnsizedType.URowVector -> + [ RequireAllCondition (`Exact "stan::is_row_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_not_complex", t) ] + | UComplexRowVector -> + [ RequireAllCondition (`Exact "stan::is_row_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_complex", t) ] + | UVector -> + [ RequireAllCondition (`Exact "stan::is_col_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_not_complex", t) ] + | UComplexVector -> + [ RequireAllCondition (`Exact "stan::is_col_vector", t) + ; RequireAllCondition (`Exact "stan::is_vt_complex", t) ] + | UMatrix -> + [ RequireAllCondition (`Exact "stan::is_eigen_matrix_dynamic", t) + ; RequireAllCondition (`Exact "stan::is_vt_not_complex", t) ] + | UComplexMatrix -> + [ RequireAllCondition (`Exact "stan::is_eigen_matrix_dynamic", t) + ; RequireAllCondition (`Exact "stan::is_vt_complex", t) ] + | UInt -> [RequireAllCondition (`Exact "std::is_integral", t)] + | UComplex -> + RequireAllCondition (`Exact "stan::is_complex", t) + :: requires_in UReal (TypeTrait ("stan::base_type_t", [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) ] + | 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 - | _, 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 @@ -78,10 +81,12 @@ 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) -> [] - | _ -> - 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 ) ) -> + [ 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 @@ -90,9 +95,10 @@ 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 -> + 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 |> List.mapi ~f:(template_p (sprintf "%s%d__" start i)) @@ -100,25 +106,28 @@ 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) - | UnsizedType.DataOnly, ut when not (UnsizedType.is_eigen_type ut) -> - ([], [], arg_type None typ) + (templates, requires, Types.std_vector ~dims scalar) + | UnsizedType.DataOnly, _ when not (UnsizedType.is_eigen_type 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 - , arg_type (Some (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" = - [(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 +136,14 @@ 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__ + ((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" = let templates, reqs, type_ = @@ -144,10 +156,14 @@ 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__)) - std::vector, T0__1__>> |}] + T0__0__,T0__1__ + ((RequireAllCondition (Exact stan::is_std_vector) (TemplateType T0__0__)) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t ((TemplateType T0__0__)))) + (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 = match args with @@ -163,11 +179,7 @@ let lower_promoted_scalar args = TypeTrait ("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.*) @@ -222,7 +234,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 = @@ -249,6 +261,14 @@ 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; _} : fun_defn * struct_defn list = @@ -361,10 +381,10 @@ let collect_functors_functions (p : Program.Numbered.t) : defn list = 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, [signature_comment d; 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; _} = @@ -444,6 +464,8 @@ module Testing = struct using local_scalar_t__ = stan::promote_args_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; @@ -502,15 +524,21 @@ 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, + 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__ = stan::promote_args_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__; 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__); @@ -534,12 +562,14 @@ 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, + 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/src/stan_math_backend/Lower_program.ml b/src/stan_math_backend/Lower_program.ml index f675bd5190..7cbc7d1248 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) @@ -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/cli-args/allow-undefined/cpp.expected b/test/integration/cli-args/allow-undefined/cpp.expected index e20f765ba6..3e713b5b01 100644 --- a/test/integration/cli-args/allow-undefined/cpp.expected +++ b/test/integration/cli-args/allow-undefined/cpp.expected @@ -25,11 +25,14 @@ 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__) { 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 +59,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 +96,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 +122,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 +155,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 +191,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 +204,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 df7d960033..27726612ab 100644 --- a/test/integration/cli-args/allow-undefined/standalone-cpp.expected +++ b/test/integration/cli-args/allow-undefined/standalone-cpp.expected @@ -25,11 +25,14 @@ 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__) { 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 0584f451d3..84cc7b441e 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 6be762d8ae..f76784c73f 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 4e5bc71806..e8760c4f06 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__; @@ -7171,47 +7219,94 @@ 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::promote_args_t -foo1(const std::complex& z, std::ostream* pstream__); + stan::require_all_t, + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>* = nullptr> +stan::promote_args_t> +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> -std::complex> -foo3(const std::complex& z, std::ostream* pstream__); + stan::require_all_t, + 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 >* = nullptr> -stan::promote_args_t -foo5(const std::vector>& z, std::ostream* pstream__); + stan::require_all_t, + stan::is_complex>, + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>* = nullptr> +stan::promote_args_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::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>* = nullptr> +std::vector>>> +foo7(const T0__& z, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo8(const std::vector>>& z, std::ostream* - pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_complex>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> +stan::promote_args_t> +foo8(const T0__& z, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> std::vector>>> foo9(const T0__& r, std::ostream* pstream__); template >* = nullptr> -std::vector>>> -foo10(const std::vector>>& z, std::ostream* - pstream__); + stan::require_all_t, + stan::is_std_vector>, + stan::is_complex>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> +std::vector< + std::vector>>>> +foo10(const T0__& z, std::ostream* pstream__); +// complex foo() 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__; @@ -7226,11 +7321,19 @@ std::complex foo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo1(const std::complex& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo1(complex) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>*> +stan::promote_args_t> +foo1(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7244,11 +7347,16 @@ foo1(const std::complex& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// complex foo2(real) +template , + std::is_floating_point>>*> std::complex> foo2(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7262,11 +7370,19 @@ foo2(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::complex> -foo3(const std::complex& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// complex foo3(complex) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>*> +std::complex>> +foo3(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7280,9 +7396,12 @@ foo3(const std::complex& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// array[] complex foo4() 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__; @@ -7301,11 +7420,22 @@ std::vector> foo4(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo5(const std::vector>& z, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo5(array[] complex) +template , + stan::is_complex>, + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>*> +stan::promote_args_t> +foo5(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7319,11 +7449,16 @@ foo5(const std::vector>& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// array[] complex foo6(real) +template , + std::is_floating_point>>*> std::vector>> foo6(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7339,11 +7474,22 @@ 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__ = stan::promote_args_t; +// array[] complex foo7(array[] complex) +template , + stan::is_complex>, + stan::math::disjunction>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t>>>>*> +std::vector>>> +foo7(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7357,12 +7503,25 @@ foo7(const std::vector>& z, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo8(const std::vector>>& z, std::ostream* - pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo8(array[,] complex) +template , + stan::is_std_vector>, + stan::is_complex>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>*> +stan::promote_args_t> +foo8(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7376,11 +7535,16 @@ foo8(const std::vector>>& z, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// array[,] complex foo9(real) +template , + std::is_floating_point>>*> std::vector>>> foo9(const T0__& r, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7404,12 +7568,26 @@ foo9(const T0__& r, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::vector>>> -foo10(const std::vector>>& z, std::ostream* - pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// array[,] complex foo10(array[,] complex) +template , + stan::is_std_vector>, + stan::is_complex>>, + stan::math::disjunction>>>, + std::is_floating_point< + stan::base_type_t< + stan::value_type_t< + stan::value_type_t>>>>>*> +std::vector< + std::vector>>>> +foo10(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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 +7619,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 +7903,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 +8164,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 +8432,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 +9394,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 +9444,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 +9877,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 +10002,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 +10097,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 +10203,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 +10216,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__; @@ -10315,14 +10517,20 @@ template >,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__); template >* = nullptr> -std::vector>,-1,-1>> -foo(const std::vector,-1,-1>>& Z, - std::ostream* pstream__); + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_complex>>* = nullptr> +std::vector< + 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__); +// complex_matrix foo(complex_matrix) template , stan::is_vt_complex>*> @@ -10330,6 +10538,8 @@ Eigen::Matrix>>,-1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -10344,6 +10554,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>*> @@ -10351,6 +10562,8 @@ Eigen::Matrix>,-1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -10367,6 +10580,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>*> @@ -10374,6 +10588,8 @@ Eigen::Matrix>>,-1,1> foo(const T0__& Z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -10388,6 +10604,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>*> @@ -10395,6 +10612,8 @@ Eigen::Matrix>,-1,1> foo(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -10411,6 +10630,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>*> @@ -10418,6 +10638,8 @@ Eigen::Matrix>>,1,-1> foo(const T0__& Z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -10432,6 +10654,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>*> @@ -10439,6 +10662,8 @@ Eigen::Matrix>,1,-1> foo(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -10455,12 +10680,18 @@ foo(const T0__& A_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -std::vector>,-1,-1>> -foo(const std::vector,-1,-1>>& Z, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// array[] complex_matrix foo(array[] complex_matrix) +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_complex>>*> +std::vector< + Eigen::Matrix>>,-1,-1>> +foo(const T0__& Z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_t>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -10474,11 +10705,18 @@ 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__ = stan::promote_args_t; +// array[] matrix foo(array[] matrix) +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__ = stan::promote_args_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 +10742,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 +10856,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 +10932,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 +10968,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 +10981,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 6a24ac9946..ca2d7ff957 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,41 @@ 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_std_vector, + stan::is_std_vector>, + std::is_integral>>>* = nullptr> std::tuple>> -f(const int& x, +f(const T0__& x, const std::vector< std::vector< - std::tuple>, - std::vector>>>>& x2, std::ostream* pstream__); + 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 , + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>>*> std::tuple>> -f(const int& x, +f(const T0__& x, const std::vector< std::vector< - std::tuple>, - std::vector>>>>& x2, std::ostream* pstream__) { + std::tuple>, + T1__1__>>>& 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__; @@ -900,8 +945,9 @@ f(const int& 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__]); } @@ -925,6 +971,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); @@ -1001,8 +1049,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__]); } @@ -1029,6 +1077,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 +1103,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 +1136,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 +1172,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 +1185,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 +1356,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 +1509,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 +1618,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 +1766,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 +1787,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,17 +2129,26 @@ 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> + stan::require_all_t>* = 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 , + 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__); -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 +2156,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__) { +// void _stan_alignas(int) +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 +2170,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__) { +// void _stan_alignof(int) +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 +2184,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__) { +// int _stan_and(int) +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__; @@ -2113,10 +2204,15 @@ int _stan_and(const int& _stan_STAN_MAJOR, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// void _stan_and_eq(real) +template , + std::is_floating_point>>*> void _stan_and_eq(const T0__& _stan_STAN_MINOR, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2124,12 +2220,15 @@ 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>*> void _stan_asm(const T0__& _stan_class_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +2237,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__) { +// void _stan_bitand(int) +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__; @@ -2148,9 +2251,12 @@ void _stan_bitand(const int& _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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2158,9 +2264,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2168,9 +2277,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2178,9 +2290,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2188,9 +2303,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2198,9 +2316,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2208,9 +2329,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2238,6 +2362,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 +2568,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 +2667,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 +2809,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 +2886,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__; @@ -3095,92 +3231,307 @@ stan::math::profile_map& get_stan_profile_data() { return cpp_reserved_words_model_namespace::profiles__; } #endif - $ ../../../../../install/default/bin/stanc --print-cpp eight_schools_ncp.stan + $ ../../../../../install/default/bin/stanc --print-cpp data_only_functions.stan // Code generated by %%NAME%% %%VERSION%% #include -namespace eight_schools_ncp_model_namespace { +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__ = +static constexpr std::array locations_array__ = {" (found before start of program)", - " (in 'eight_schools_ncp.stan', line 7, column 2 to column 10)", - " (in 'eight_schools_ncp.stan', line 8, column 2 to column 20)", - " (in 'eight_schools_ncp.stan', line 9, column 2 to column 24)", - " (in 'eight_schools_ncp.stan', line 12, column 2 to column 43)", - " (in 'eight_schools_ncp.stan', line 15, column 2 to column 20)", - " (in 'eight_schools_ncp.stan', line 16, column 2 to column 21)", - " (in 'eight_schools_ncp.stan', line 17, column 2 to column 29)", - " (in 'eight_schools_ncp.stan', line 18, column 2 to column 27)", - " (in 'eight_schools_ncp.stan', line 2, column 2 to column 17)", - " (in 'eight_schools_ncp.stan', line 3, column 8 to column 9)", - " (in 'eight_schools_ncp.stan', line 3, column 2 to column 18)", - " (in 'eight_schools_ncp.stan', line 4, column 8 to column 9)", - " (in 'eight_schools_ncp.stan', line 4, column 2 to column 31)", - " (in 'eight_schools_ncp.stan', line 9, column 9 to column 10)", - " (in 'eight_schools_ncp.stan', line 12, column 9 to column 10)"}; -class eight_schools_ncp_model final : public model_base_crtp { + " (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> +stan::promote_args_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> +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> +stan::promote_args_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> +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>*> +stan::promote_args_t> +baz(const T0__& y_arg__, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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>*> +stan::promote_args_t> +baz_param(const T0__& y_arg__, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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>>*> +stan::promote_args_t> +bar_param(const T0__& z, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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>>>*> +stan::promote_args_t> +foo_param(const T0__& x, const T1__& y, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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 J; - std::vector y; - std::vector sigma; + int N; + Eigen::Matrix d_data__; + Eigen::Map> d{nullptr, 0, 0}; public: - ~eight_schools_ncp_model() {} - eight_schools_ncp_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* - pstream__ = nullptr) : model_base_crtp(0) { + ~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__ = - "eight_schools_ncp_model_namespace::eight_schools_ncp_model"; + "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 { - current_statement__ = 9; - context__.validate_dims("data initialization", "J", "int", + int pos__ = std::numeric_limits::min(); + pos__ = 1; + current_statement__ = 8; + context__.validate_dims("data initialization", "N", "int", std::vector{}); - J = std::numeric_limits::min(); - current_statement__ = 9; - J = context__.vals_i("J")[(1 - 1)]; + N = std::numeric_limits::min(); + current_statement__ = 8; + N = context__.vals_i("N")[(1 - 1)]; current_statement__ = 9; - stan::math::check_greater_or_equal(function__, "J", J, 0); + stan::math::validate_non_negative_index("d", "N", N); current_statement__ = 10; - stan::math::validate_non_negative_index("y", "J", J); - current_statement__ = 11; - context__.validate_dims("data initialization", "y", "double", - std::vector{static_cast(J)}); - y = std::vector(J, std::numeric_limits::quiet_NaN()); + stan::math::validate_non_negative_index("d", "N", N); current_statement__ = 11; - y = context__.vals_r("y"); + 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("sigma", "J", J); + stan::math::validate_non_negative_index("p", "N", N); current_statement__ = 13; - context__.validate_dims("data initialization", "sigma", "double", - std::vector{static_cast(J)}); - sigma = std::vector(J, - std::numeric_limits::quiet_NaN()); - current_statement__ = 13; - sigma = context__.vals_r("sigma"); - current_statement__ = 13; - stan::math::check_greater_or_equal(function__, "sigma", sigma, 0); - current_statement__ = 14; - stan::math::validate_non_negative_index("theta_tilde", "J", J); - current_statement__ = 15; - stan::math::validate_non_negative_index("theta", "J", J); + 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__ = 1 + 1 + J; + num_params_r__ = (N * N); } inline std::string model_name() const final { - return "eight_schools_ncp_model"; + return "data_only_functions_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -3200,41 +3551,46 @@ 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__; static constexpr const char* function__ = - "eight_schools_ncp_model_namespace::log_prob"; + "data_only_functions_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { - local_scalar_t__ mu = DUMMY_VAR__; + Eigen::Matrix p = + Eigen::Matrix::Constant(N, N, DUMMY_VAR__); current_statement__ = 1; - mu = in__.template read(); - local_scalar_t__ tau = DUMMY_VAR__; - current_statement__ = 2; - tau = in__.template read_constrain_lb(0, - lp__); - Eigen::Matrix theta_tilde = - Eigen::Matrix::Constant(J, DUMMY_VAR__); - current_statement__ = 3; - theta_tilde = in__.template read< - Eigen::Matrix>(J); - Eigen::Matrix theta = - Eigen::Matrix::Constant(J, DUMMY_VAR__); - current_statement__ = 4; - stan::model::assign(theta, - stan::math::add(mu, stan::math::multiply(tau, theta_tilde)), - "assigning variable theta"); + 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(stan::math::normal_lpdf(mu, 0, 5)); + lp_accum__.add(baz_param(d, pstream__)); current_statement__ = 6; - lp_accum__.add(stan::math::normal_lpdf(tau, 0, 5)); + lp_accum__.add(bar_param( + std::vector>{d, d}, + pstream__)); current_statement__ = 7; - lp_accum__.add(stan::math::normal_lpdf(theta_tilde, 0, 1)); - current_statement__ = 8; - lp_accum__.add(stan::math::normal_lpdf(y, theta, sigma)); + 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__]); @@ -3256,6 +3612,485 @@ 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__; + 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%% +#include +namespace eight_schools_ncp_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 'eight_schools_ncp.stan', line 7, column 2 to column 10)", + " (in 'eight_schools_ncp.stan', line 8, column 2 to column 20)", + " (in 'eight_schools_ncp.stan', line 9, column 2 to column 24)", + " (in 'eight_schools_ncp.stan', line 12, column 2 to column 43)", + " (in 'eight_schools_ncp.stan', line 15, column 2 to column 20)", + " (in 'eight_schools_ncp.stan', line 16, column 2 to column 21)", + " (in 'eight_schools_ncp.stan', line 17, column 2 to column 29)", + " (in 'eight_schools_ncp.stan', line 18, column 2 to column 27)", + " (in 'eight_schools_ncp.stan', line 2, column 2 to column 17)", + " (in 'eight_schools_ncp.stan', line 3, column 8 to column 9)", + " (in 'eight_schools_ncp.stan', line 3, column 2 to column 18)", + " (in 'eight_schools_ncp.stan', line 4, column 8 to column 9)", + " (in 'eight_schools_ncp.stan', line 4, column 2 to column 31)", + " (in 'eight_schools_ncp.stan', line 9, column 9 to column 10)", + " (in 'eight_schools_ncp.stan', line 12, column 9 to column 10)"}; +class eight_schools_ncp_model final : public model_base_crtp { + private: + int J; + std::vector y; + std::vector sigma; + public: + ~eight_schools_ncp_model() {} + eight_schools_ncp_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__ = + "eight_schools_ncp_model_namespace::eight_schools_ncp_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 { + current_statement__ = 9; + context__.validate_dims("data initialization", "J", "int", + std::vector{}); + J = std::numeric_limits::min(); + current_statement__ = 9; + J = context__.vals_i("J")[(1 - 1)]; + current_statement__ = 9; + stan::math::check_greater_or_equal(function__, "J", J, 0); + current_statement__ = 10; + stan::math::validate_non_negative_index("y", "J", J); + current_statement__ = 11; + context__.validate_dims("data initialization", "y", "double", + std::vector{static_cast(J)}); + y = std::vector(J, std::numeric_limits::quiet_NaN()); + current_statement__ = 11; + y = context__.vals_r("y"); + current_statement__ = 12; + stan::math::validate_non_negative_index("sigma", "J", J); + current_statement__ = 13; + context__.validate_dims("data initialization", "sigma", "double", + std::vector{static_cast(J)}); + sigma = std::vector(J, + std::numeric_limits::quiet_NaN()); + current_statement__ = 13; + sigma = context__.vals_r("sigma"); + current_statement__ = 13; + stan::math::check_greater_or_equal(function__, "sigma", sigma, 0); + current_statement__ = 14; + stan::math::validate_non_negative_index("theta_tilde", "J", J); + current_statement__ = 15; + stan::math::validate_non_negative_index("theta", "J", J); + } catch (const std::exception& e) { + stan::lang::rethrow_located(e, locations_array__[current_statement__]); + } + num_params_r__ = 1 + 1 + J; + } + inline std::string model_name() const final { + return "eight_schools_ncp_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__ = + "eight_schools_ncp_model_namespace::log_prob"; + // suppress unused var warning + (void) function__; + try { + local_scalar_t__ mu = DUMMY_VAR__; + current_statement__ = 1; + mu = in__.template read(); + local_scalar_t__ tau = DUMMY_VAR__; + current_statement__ = 2; + tau = in__.template read_constrain_lb(0, + lp__); + Eigen::Matrix theta_tilde = + Eigen::Matrix::Constant(J, DUMMY_VAR__); + current_statement__ = 3; + theta_tilde = in__.template read< + Eigen::Matrix>(J); + Eigen::Matrix theta = + Eigen::Matrix::Constant(J, DUMMY_VAR__); + current_statement__ = 4; + stan::model::assign(theta, + stan::math::add(mu, stan::math::multiply(tau, theta_tilde)), + "assigning variable theta"); + { + current_statement__ = 5; + lp_accum__.add(stan::math::normal_lpdf(mu, 0, 5)); + current_statement__ = 6; + lp_accum__.add(stan::math::normal_lpdf(tau, 0, 5)); + current_statement__ = 7; + lp_accum__.add(stan::math::normal_lpdf(theta_tilde, 0, 1)); + current_statement__ = 8; + lp_accum__.add(stan::math::normal_lpdf(y, theta, sigma)); + } + } 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__; @@ -3319,6 +4154,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 +4216,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 +4248,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__; @@ -3635,21 +4476,30 @@ 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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_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::math::disjunction, + std::is_floating_point>>* = nullptr> void bar(const T0__& x, const T1__& y, std::ostream* pstream__); +// real foo(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t foo(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -3663,12 +4513,17 @@ foo(const T0__& x, const T1__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void bar(real, real) template , - stan::is_stan_scalar>*> + 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__ = stan::promote_args_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 +4549,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 +4643,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 +4691,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 +4727,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 +4740,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 +4901,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 +5003,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 +5069,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 +5155,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 +5178,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,68 +6187,108 @@ 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> -sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +std::vector< + 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__); double foo_bar0(std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__); template , - stan::is_stan_scalar>* = nullptr> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__); -template >* = nullptr> +template , + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -foo_lpmf(const int& y, const T1__& lambda, std::ostream* pstream__); -template >* = nullptr> +foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__); +template , + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -foo_lcdf(const int& y, const T1__& lambda, std::ostream* pstream__); -template >* = nullptr> +foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__); +template , + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -foo_lccdf(const int& y, const T1__& lambda, std::ostream* pstream__); +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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_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__); -int foo_1(const int& a, std::ostream* pstream__); -int foo_2(const int& a, std::ostream* pstream__); template >* = nullptr> + 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_floating_point>, + std::is_integral>* = nullptr> std::vector> -foo_3(const T0__& t, const int& n, std::ostream* pstream__); +foo_3(const T0__& t, const T1__& n, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = 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::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t relative_diff(const T0__& x, const T1__& y, const T2__& max_, const T3__& min_, std::ostream* pstream__); @@ -5385,385 +6304,788 @@ foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, 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::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> 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::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::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> 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__); -template , - stan::is_vt_not_complex>* = nullptr> + stan::is_vt_not_complex, + std::is_integral>* = nullptr> Eigen::Matrix>,-1,-1> -covsqrt2corsqrt(const T0__& mat_arg__, const int& invert, std::ostream* +covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>> -f4(const int& 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> +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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>> -f5(const int& 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::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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>>> -f6(const int& 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::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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,1> -f7(const int& 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, + 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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,1>> -f8(const int& 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, + 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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, - T10__, T11__>>,-1,1>>> -f9(const int& 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, + 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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,-1> -f10(const int& 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__); -template , - 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>>>* = nullptr> +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__); +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,-1>> -f11(const int& 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__); -template , - stan::is_stan_scalar, - stan::is_stan_scalar, + 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__); +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, - T10__, T11__>>,-1,-1>>> -f12(const int& 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, + 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__); 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_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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, @@ -5775,16 +7097,22 @@ 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> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__); } }; @@ -5801,9 +7129,13 @@ struct binomialf_functor__ { return binomialf(phi, theta, x_r, x_i, pstream__); } }; -int foo(const int& n, std::ostream* pstream__) { +// int foo(int) +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__; @@ -5822,16 +7154,34 @@ int foo(const int& 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 , - 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, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +std::vector< + 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__ = stan::promote_args_t; + 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__; @@ -5857,9 +7207,12 @@ sho(const T0__& t, const std::vector& y, const std::vector& 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5873,10 +7226,15 @@ double foo_bar0(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real foo_bar1(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5890,13 +7248,18 @@ stan::promote_args_t foo_bar1(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_bar2(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +7273,17 @@ foo_bar2(const T0__& x, const T1__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real foo_lpmf(int, real) +template , + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -foo_lpmf(const int& y, const T1__& lambda, std::ostream* pstream__) { +foo_lpmf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +7294,17 @@ foo_lpmf(const int& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real foo_lcdf(int, real) +template , + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -foo_lcdf(const int& y, const T1__& lambda, std::ostream* pstream__) { +foo_lcdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +7318,17 @@ foo_lcdf(const int& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real foo_lccdf(int, real) +template , + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -foo_lccdf(const int& y, const T1__& lambda, std::ostream* pstream__) { +foo_lccdf(const T0__& y, const T1__& lambda, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5962,14 +7342,19 @@ foo_lccdf(const int& y, const T1__& lambda, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_rng(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t foo_rng(const T0__& mu, const T1__& sigma, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5983,14 +7368,18 @@ 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 >*> + 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__) { using local_scalar_t__ = stan::promote_args_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 +7392,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__) { +// int foo_1(int) +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 +7601,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__) { +// int foo_2(int) +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 +7632,17 @@ int foo_2(const int& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// array[] real foo_3(real, int) +template , + std::is_floating_point>, + std::is_integral>*> std::vector> -foo_3(const T0__& t, const int& n, std::ostream* pstream__) { +foo_3(const T0__& t, const T1__& n, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6253,14 +7656,18 @@ foo_3(const T0__& t, const int& n, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo_lp(real) template >*> + stan::require_all_t, + std::is_floating_point>>*> stan::promote_args_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; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -6271,10 +7678,18 @@ 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__ = stan::promote_args_t; +// void foo_4(array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +void foo_4(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6294,16 +7709,23 @@ void foo_4(const std::vector& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real relative_diff(real, real, real, real) template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> + 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::promote_args_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; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6349,6 +7771,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, @@ -6362,6 +7785,8 @@ foo_5(const T0__& shared_params_arg__, const T1__& job_params_arg__, using local_scalar_t__ = stan::promote_args_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; @@ -6378,18 +7803,26 @@ 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 , - 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::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::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__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -6403,15 +7836,22 @@ 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_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::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>>*> stan::promote_args_t> foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& @@ -6420,6 +7860,8 @@ foo_five_args_lp(const T0__& x1, const T1__& x2, const T2__& x3, const T3__& using local_scalar_t__ = stan::promote_args_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 +7872,18 @@ 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>*> + stan::is_vt_not_complex, + std::is_integral>*> Eigen::Matrix>,-1,-1> -covsqrt2corsqrt(const T0__& mat_arg__, const int& invert, std::ostream* +covsqrt2corsqrt(const T0__& mat_arg__, const T1__& invert, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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,34 +7919,74 @@ covsqrt2corsqrt(const T0__& mat_arg__, const int& invert, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* void + f0(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6519,34 +8005,74 @@ f0(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* int + f1(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6562,34 +8088,74 @@ f1(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[] int + f2(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6605,34 +8171,74 @@ f2(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[,] int + f3(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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 int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6648,35 +8254,77 @@ f3(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* real + f4(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>> -f4(const int& 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>>>*> +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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6692,36 +8340,79 @@ f4(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[] real + f5(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>> -f5(const int& 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::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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6737,37 +8428,80 @@ f5(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[,] real + f6(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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< - stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>>> -f6(const int& 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::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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6783,37 +8517,79 @@ f6(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* vector + f7(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,1> -f7(const int& 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, + 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6829,38 +8605,80 @@ f7(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[] vector + f8(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,1>> -f8(const int& 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, + 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6876,39 +8694,81 @@ f8(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[,] vector + f9(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, - T10__, T11__>>,-1,1>>> -f9(const int& 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, + 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6924,37 +8784,79 @@ f9(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* matrix + f10(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,-1> -f10(const int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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, + 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__ = 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -6970,38 +8872,80 @@ f10(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[] matrix + f11(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, T10__, - T11__>>,-1,-1>> -f11(const int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__ = 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -7017,39 +8961,81 @@ f11(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, - stan::is_stan_scalar, +/* array[,] matrix + f12(int, array[] int, array[,] int, real, array[] real, array[,] real, + vector, array[] vector, array[,] vector, matrix, array[] matrix, + array[,] matrix) + */ +template , + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::is_std_vector>, + std::is_integral>>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::is_std_vector>, + 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_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__, - stan::promote_args_t, - T10__, T11__>>,-1,-1>>> -f12(const int& 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__ = stan::promote_args_t, T7__, - stan::promote_args_t, T10__, T11__>>; + 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__ = 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__; const auto& a7 = stan::math::to_ref(a7_arg__); const auto& a10 = stan::math::to_ref(a10_arg__); static constexpr bool propto__ = true; @@ -7065,9 +9051,12 @@ f12(const int& a1, const std::vector& a2, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void foo_6() 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__; @@ -7093,9 +9082,12 @@ void foo_6(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix matfoo() 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__; @@ -7117,9 +9109,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7134,11 +9129,16 @@ Eigen::Matrix vecfoo(std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// vector vecmufoo(real) +template , + std::is_floating_point>>*> Eigen::Matrix,-1,1> vecmufoo(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7157,11 +9157,16 @@ vecmufoo(const T0__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// vector vecmubar(real) +template , + std::is_floating_point>>*> Eigen::Matrix,-1,1> vecmubar(const T0__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +9188,29 @@ 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>*> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__ = stan::promote_args_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__; const auto& x = stan::math::to_ref(x_arg__); const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; @@ -7224,6 +9238,7 @@ algebra_system(const T0__& x_arg__, const T1__& y_arg__, 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, @@ -7237,6 +9252,8 @@ binomialf(const T0__& phi_arg__, const T1__& theta_arg__, using local_scalar_t__ = stan::promote_args_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 +9390,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 +11509,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__; @@ -9799,11 +11820,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, @@ -9811,7 +11834,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, @@ -9819,7 +11843,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; @@ -10007,6 +12032,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__; @@ -10316,11 +12343,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, @@ -10328,7 +12357,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, @@ -10336,7 +12366,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; @@ -10531,6 +12562,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 @@ -10964,11 +12997,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, @@ -10976,7 +13011,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, @@ -10984,7 +13020,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; @@ -11654,6 +13691,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 +13974,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,141 +15814,256 @@ 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> -sho(const T0__& t, const std::vector& y, const std::vector& - theta, const std::vector& x, const std::vector& x_int, - std::ostream* pstream__); + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + 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 , + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +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_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>* = nullptr> -stan::promote_args_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> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__); -template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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> stan::promote_args_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> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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>* = nullptr> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__); } }; struct foo_functor__ { - template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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>* = nullptr> - stan::promote_args_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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + 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__); } }; struct algebra_system_functor__ { - template , stan::is_vt_not_complex, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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>* = 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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + 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__); } }; +// array[] real sho(real, array[] real, array[] real, array[] real, array[] int) template , - 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__ = stan::promote_args_t; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + 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__ = stan::promote_args_t, + stan::base_type_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__; @@ -13933,17 +16089,35 @@ sho(const T0__& t, const std::vector& y, const std::vector& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real integrand(real, real, array[] real, array[] real, array[] int) template , - stan::is_stan_scalar, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -stan::promote_args_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; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +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__ = 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__; @@ -13957,20 +16131,29 @@ 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>*> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__ = stan::promote_args_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__; 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 +16170,29 @@ 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>*> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__ = stan::promote_args_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__; 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; @@ -14017,11 +16209,16 @@ goo(const T0__& shared_params_arg__, const T1__& job_params_arg__, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real map_rectfake(real) +template , + std::is_floating_point>>*> stan::promote_args_t map_rectfake(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -14035,20 +16232,29 @@ 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>*> + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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__ = stan::promote_args_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__; 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 +16304,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 +16493,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__; @@ -14369,12 +16579,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, @@ -14383,7 +16593,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, @@ -14392,7 +16602,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, @@ -14401,12 +16611,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, @@ -14415,7 +16625,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, @@ -14424,7 +16634,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; @@ -14513,69 +16723,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); @@ -14603,6 +16820,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__; @@ -14684,12 +16903,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, @@ -14698,7 +16917,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, @@ -14707,7 +16926,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, @@ -14716,12 +16935,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, @@ -14730,7 +16949,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, @@ -14739,7 +16958,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; @@ -14828,69 +17047,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); @@ -14925,6 +17151,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 @@ -15037,12 +17265,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, @@ -15051,7 +17279,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, @@ -15060,7 +17288,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, @@ -15069,12 +17297,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, @@ -15083,7 +17311,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, @@ -15092,7 +17320,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); @@ -15198,27 +17426,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); @@ -15256,12 +17486,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, @@ -15270,7 +17500,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, @@ -15279,7 +17509,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, @@ -15288,12 +17518,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, @@ -15302,7 +17532,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, @@ -15311,7 +17541,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__) { @@ -15340,6 +17570,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 +17637,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__; @@ -16650,10 +18884,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::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, T2__, @@ -16662,10 +18898,12 @@ f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, std::ostream* pstream__); struct f_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::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>* = nullptr> Eigen::Matrix, T2__, @@ -16675,11 +18913,14 @@ struct f_variadic2_functor__ { return f(t, z, a, b, pstream__); } }; +// vector f(real, vector, real, vector) template , + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar, + stan::math::disjunction, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>*> Eigen::Matrix, T2__, @@ -16690,6 +18931,8 @@ f(const T0__& t, const T1__& z_arg__, const T2__& a, const T3__& b_arg__, stan::base_type_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 +18963,8 @@ 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; @@ -16874,6 +19125,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__; @@ -16898,8 +19151,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, @@ -17030,8 +19284,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, @@ -17162,8 +19417,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, @@ -17294,8 +19550,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, @@ -17426,8 +19683,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__, @@ -17558,8 +19816,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__, @@ -17698,8 +19957,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, @@ -17830,8 +20090,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, @@ -17962,8 +20223,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, @@ -18094,8 +20356,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, @@ -18226,8 +20489,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, @@ -18358,8 +20622,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, @@ -18511,6 +20776,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__; @@ -18535,8 +20802,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, @@ -18667,8 +20935,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, @@ -18799,8 +21068,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, @@ -18931,8 +21201,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, @@ -19063,8 +21334,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__, @@ -19195,8 +21467,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__, @@ -19335,8 +21608,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, @@ -19467,8 +21741,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, @@ -19599,8 +21874,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, @@ -19731,8 +22007,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, @@ -19863,8 +22140,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, @@ -19995,8 +22273,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, @@ -20155,6 +22434,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 @@ -20193,8 +22474,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, @@ -20325,8 +22607,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, @@ -20457,8 +22740,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, @@ -20589,8 +22873,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, @@ -20721,8 +23006,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__, @@ -20853,8 +23139,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__, @@ -21000,8 +23287,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, @@ -21132,8 +23420,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, @@ -21264,8 +23553,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, @@ -21396,8 +23686,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__, @@ -21528,8 +23819,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, @@ -21660,8 +23952,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__, @@ -21810,6 +24103,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 +24137,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,38 +24425,97 @@ 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> -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__); + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + 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__ { template , - 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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + 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__); } }; +/* array[] real + dz_dt(real, array[] real, array[] real, array[] real, array[] int) + */ template , - 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__ = stan::promote_args_t; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + 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__ = stan::promote_args_t, + stan::base_type_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__; @@ -22209,6 +24565,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__; @@ -22337,7 +24697,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"); @@ -22399,6 +24760,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__; @@ -22438,7 +24801,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"); @@ -22507,6 +24871,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 @@ -22561,7 +24927,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"); @@ -22590,6 +24957,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 +25003,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 +25504,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 +25743,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 +26310,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 +26884,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 +26970,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 +27041,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,9 +27436,12 @@ 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> + stan::require_all_t>* = nullptr> +double foo(const T0__& p, std::ostream* pstream__); +template , + std::is_floating_point>>* = nullptr> stan::promote_args_t foo(const T0__& p, std::ostream* pstream__); template , @@ -25073,29 +27459,53 @@ template > foo(const T0__& p_arg__, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo(const std::vector& p, std::ostream* pstream__); + stan::require_all_t, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +stan::promote_args_t> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> +stan::promote_args_t> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> +stan::promote_args_t> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__); + stan::require_all_t, + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>* = nullptr> +stan::promote_args_t> +foo(const T0__& p, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__); -double foo(const std::vector& p, std::ostream* pstream__); -double foo(const int& p, std::ostream* pstream__) { + stan::require_all_t, + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> +stan::promote_args_t> +foo(const T0__& p, std::ostream* pstream__); +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; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25109,10 +27519,15 @@ double foo(const int& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real foo(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25126,6 +27541,7 @@ stan::promote_args_t 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>*> @@ -25133,6 +27549,8 @@ stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -25147,6 +27565,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>*> @@ -25154,6 +27573,8 @@ stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -25168,6 +27589,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>*> @@ -25175,6 +27597,8 @@ stan::promote_args_t> foo(const T0__& p_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -25189,11 +27613,19 @@ foo(const T0__& p_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo(const std::vector& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo(array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25207,11 +27639,17 @@ foo(const std::vector& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo(array[] row_vector) +template , + stan::is_row_vector>, + stan::is_vt_not_complex>>*> +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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25227,11 +27665,17 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo(array[] vector) +template , + stan::is_col_vector>, + stan::is_vt_not_complex>>*> +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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25247,11 +27691,17 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo(array[] matrix) +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>>*> +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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25267,11 +27717,22 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo(const std::vector>& p, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo(array[,] real) +template , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25287,9 +27748,15 @@ foo(const std::vector>& p, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -double foo(const std::vector& p, std::ostream* pstream__) { +// real foo(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25315,6 +27782,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 +27927,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 +28017,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 +28061,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 +28086,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 +28272,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 +28375,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 +28428,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 +28494,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 +28536,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 +28774,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 +28826,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 +28852,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 +28885,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 +28921,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 +28934,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__; @@ -26587,18 +29090,34 @@ 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> -std::complex> -ident(const std::complex& x, std::ostream* pstream__); + stan::require_all_t, + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>* = nullptr> +std::complex>> +ident(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -foo(const std::vector& zs, std::ostream* pstream__); -template >*> -std::complex> -ident(const std::complex& x, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + stan::require_all_t, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +stan::promote_args_t> +foo(const T0__& zs, std::ostream* pstream__); +// complex ident(complex) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::base_type_t>>>*> +std::complex>> +ident(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26612,11 +29131,19 @@ ident(const std::complex& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -foo(const std::vector& zs, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real foo(array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +stan::promote_args_t> +foo(const T0__& zs, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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 +29166,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 +29203,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 +29229,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 +29262,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 +29318,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 +29331,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__; @@ -27018,18 +29557,20 @@ template >* = nullptr> Eigen::Matrix>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__); -template , - stan::is_vt_not_complex>* = nullptr> + stan::is_vt_not_complex, + std::is_integral>* = nullptr> Eigen::Matrix>,-1,-1> -matrix_pow(const T0__& a_arg__, const int& n, std::ostream* pstream__); +matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__); template , stan::is_vt_not_complex>* = nullptr> stan::promote_args_t> foo(const T0__& a_arg__, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo(const T0__& b, std::ostream* pstream__); template , @@ -27051,7 +29592,8 @@ 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, @@ -27062,7 +29604,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, @@ -27074,6 +29617,7 @@ struct foo_variadic2_functor__ { return foo(x, s, y, pstream__); } }; +// vector test2(vector) template , stan::is_vt_not_complex>*> @@ -27081,6 +29625,8 @@ Eigen::Matrix>,-1,1> test2(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +29654,17 @@ test2(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_vt_not_complex>*> + stan::is_vt_not_complex, + std::is_integral>*> Eigen::Matrix>,-1,-1> -matrix_pow(const T0__& a_arg__, const int& n, std::ostream* pstream__) { +matrix_pow(const T0__& a_arg__, const T1__& n, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -27143,6 +29693,7 @@ matrix_pow(const T0__& a_arg__, const int& n, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo(matrix) template , stan::is_vt_not_complex>*> @@ -27150,6 +29701,8 @@ stan::promote_args_t> foo(const T0__& a_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -27164,10 +29717,15 @@ foo(const T0__& a_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real foo(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -27188,6 +29746,7 @@ stan::promote_args_t 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>*> @@ -27195,6 +29754,8 @@ Eigen::Matrix>,-1,1> test4(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -27221,6 +29782,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>*> @@ -27228,6 +29790,8 @@ Eigen::Matrix>,-1,1> test3(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -27242,12 +29806,15 @@ 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>*> void test6(const T0__& alpha_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -27278,6 +29845,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>*> @@ -27285,6 +29853,8 @@ Eigen::Matrix>,-1,1> test7(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -27310,8 +29880,10 @@ test7(const T0__& gamma_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo(real, vector, matrix) template , + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, stan::is_eigen_matrix_dynamic, @@ -27324,6 +29896,8 @@ foo(const T0__& x, const T1__& s_arg__, const T2__& y_arg__, std::ostream* stan::base_type_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 +29930,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 +30032,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 +30084,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 +30143,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 +30167,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 +30400,107 @@ 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 , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +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 , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h(const std::vector& y_slice, const int& start, const int& 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, +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); struct h_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::vector& a) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> + 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__); } }; struct g_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; template struct foo_lpdf_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; -template >*> -stan::promote_args_t -g(const std::vector& y_slice, const int& start, const int& end, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g(array[] real, int, int) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +30520,27 @@ g(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h(const std::vector& y_slice, const int& start, const int& end, - const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h(array[] real, int, int, array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_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__ = 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__; @@ -27913,13 +30562,21 @@ 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, +// real foo_lpdf(array[] real, int, int) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +foo_lpdf(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + using local_scalar_t__ = stan::promote_args_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 +30596,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 +30647,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 +30702,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 +30764,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 +30815,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 +30850,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 +31231,501 @@ 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, - 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 -g6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -g7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -g8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h1(const std::vector& y, const int& start, const int& end, - const std::vector& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h2(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h3(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h4(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h5(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h6(const std::vector& y, const int& start, const int& end, - const std::vector>>& a, std::ostream* +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h7(const std::vector& y, const int& start, const int& end, - const std::vector>>& a, std::ostream* +template , + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -h8(const std::vector& y, const int& start, const int& end, - const std::vector>>& a, +template , + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> +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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> +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::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>, + stan::is_vt_not_complex>>* = nullptr> +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 , + 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::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> +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::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_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +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::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_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +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::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_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +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__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, const std::vector>& a) const { + template , + 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::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> + 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__); } }; struct h1_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, const std::vector& a) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> + 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__); } }; 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 , + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct h7_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, - const std::vector>>& a) const { + template , + 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_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + 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__); } }; struct h3_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, - const std::vector>& a) const { + template , + 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>, + stan::is_vt_not_complex>>* = nullptr> + 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__); } }; 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 , + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct g8_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* - pstream__) const { + template , + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct h2_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, - const std::vector>& a) const { + template , + 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>, + stan::is_vt_not_complex>>* = nullptr> + 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__); } }; struct h8_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, - const std::vector>>& a) const { + template , + 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_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> + 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__); } }; struct g7_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* - pstream__) const { + template , + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct g4_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct h4_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, - const std::vector>& a) const { + template , + 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>, + stan::is_vt_not_complex>>* = nullptr> + 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__); } }; struct g6_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* - pstream__) const { + template , + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; 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 , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct h6_rsfunctor__ { - template , - stan::is_stan_scalar>* = nullptr> - stan::promote_args_t - operator()(const std::vector& y, const int& start, const int& end, - std::ostream* pstream__, - const std::vector>>& a) const { + template , + 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_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + 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__); } }; struct g1_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; -template >*> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g1(array[] real, int, int) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31739,19 @@ 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; +// real g2(array[] vector, int, int) +template , + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31776,19 @@ 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; +// real g3(array[] row_vector, int, int) +template , + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31813,19 @@ 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; +// real g4(array[] matrix, int, int) +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31851,24 @@ 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; +// real g5(array[,] real, int, int) +template , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31899,22 @@ g5(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g6(array[,] vector, int, int) +template , + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31946,22 @@ g6(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g7(array[,] row_vector, int, int) +template , + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +31993,22 @@ g7(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -g8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g8(array[,] matrix, int, int) +template , + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +g8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +32040,27 @@ g8(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h1(const std::vector& y, const int& start, const int& end, - const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h1(array[] real, int, int, array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_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__ = 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__; @@ -29094,14 +32076,25 @@ h1(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h2(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h2(array[] real, int, int, array[] vector) +template , + 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>, + stan::is_vt_not_complex>>*> +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__ = 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__; @@ -29125,14 +32118,25 @@ h2(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h3(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h3(array[] real, int, int, array[] row_vector) +template , + 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>, + stan::is_vt_not_complex>>*> +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__ = 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__; @@ -29156,14 +32160,25 @@ h3(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h4(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h4(array[] real, int, int, array[] matrix) +template , + 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>, + stan::is_vt_not_complex>>*> +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__ = 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__; @@ -29188,14 +32203,30 @@ h4(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h5(const std::vector& y, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h5(array[] real, int, int, array[,] real) +template , + 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::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_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__ = 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__; @@ -29225,15 +32256,28 @@ h5(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h6(const std::vector& y, const int& start, const int& end, - const std::vector>>& a, std::ostream* - pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h6(array[] real, int, int, array[,] vector) +template , + 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_col_vector>>, + stan::is_vt_not_complex>>>*> +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__ = 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__; @@ -29264,15 +32308,28 @@ h6(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h7(const std::vector& y, const int& start, const int& end, - const std::vector>>& a, std::ostream* - pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real h7(array[] real, int, int, array[,] row_vector) +template , + 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_row_vector>>, + stan::is_vt_not_complex>>>*> +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__ = 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__; @@ -29303,15 +32360,28 @@ h7(const std::vector& y, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -h8(const std::vector& y, const int& start, const int& end, - const std::vector>>& a, +// real h8(array[] real, int, int, array[,] matrix) +template , + 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_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +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__ = stan::promote_args_t; + 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__; @@ -29352,6 +32422,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 +32554,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 +32740,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 +32933,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 +33205,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 +33444,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,477 +34574,949 @@ 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, - std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f1a(const std::vector& y_slice, const int& start, const int& 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 -f6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); -template >* = nullptr> -stan::promote_args_t -f8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__); +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>* = nullptr> +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, std::is_integral>* = nullptr> double -f9(const std::vector& y_slice, const int& start, const int& end, - std::ostream* pstream__); +f9(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::is_std_vector>, + std::is_integral>>, + 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 T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + 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 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 , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, - const T3__& a, std::ostream* pstream__); -template , +f11(const T0__& y_slice, const T1__& start, const T2__& end, 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>>>>, + std::is_integral, std::is_integral>* = nullptr> +stan::promote_args_t> +f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__); +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> +stan::promote_args_t, T3__> +g1(const T0__& y_slice, const T1__& start, const T2__& end, const T3__& a, + std::ostream* pstream__); +template , + 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> -stan::promote_args_t> -g2(const std::vector& y_slice, const int& start, const int& end, - const T3__& a_arg__, std::ostream* pstream__); -template , +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 , + 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> -stan::promote_args_t> -g3(const std::vector& y_slice, const int& start, const int& end, - const T3__& a_arg__, std::ostream* pstream__); -template , +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 , + 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> -stan::promote_args_t> -g4(const std::vector& y_slice, const int& start, const int& end, - const T3__& a_arg__, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g5(const std::vector& y_slice, const int& start, const int& end, - const std::vector& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g6(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g7(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g8(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g9(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__); -template , - stan::is_stan_scalar>* = nullptr> -stan::promote_args_t -g10(const std::vector& y_slice, const int& start, const int& end, - const std::vector>>& a, +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 , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_col_vector>, + stan::is_vt_not_complex>>* = nullptr> +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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::is_row_vector>, + stan::is_vt_not_complex>>* = nullptr> +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::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>, + stan::is_vt_not_complex>>* = nullptr> +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 , + 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::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> +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::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_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +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_stan_scalar>* = nullptr> -stan::promote_args_t -g11(const std::vector& y_slice, const int& start, const int& end, - const std::vector>>& a, +template , + 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_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> +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_stan_scalar>* = nullptr> -stan::promote_args_t -g12(const std::vector& y_slice, const int& start, const int& end, - const std::vector>>& a, +template , + 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_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> +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 , - stan::is_stan_scalar, +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + std::is_integral, + stan::math::disjunction, + 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>* = nullptr> -stan::promote_args_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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::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_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::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> +stan::promote_args_t, T4__, stan::base_type_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__, - 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::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__); double r(std::ostream* pstream__); struct f11_rsfunctor__ { + template , + 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 int& start, const int& 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 , + stan::is_std_vector>, + std::is_integral>>, + 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 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 , - 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::vector>& a) const { + template , + 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>, + stan::is_vt_not_complex>>* = nullptr> + 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__); } }; struct g7_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::vector>& a) const { + template , + 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>, + stan::is_vt_not_complex>>* = nullptr> + 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__); } }; struct g4_rsfunctor__ { - template , + template , + 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> - stan::promote_args_t> - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__, const T3__& a) const { + 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__); } }; struct g6_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::vector>& a) const { + template , + 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>, + stan::is_vt_not_complex>>* = nullptr> + 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__); } }; struct g11_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::vector>>& a) const { + template , + 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_row_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + 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__); } }; 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 , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct f1_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct g5_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::vector& a) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> + 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__); } }; struct g9_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::vector>& a) const { + template , + 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::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>>* = nullptr> + 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__); } }; struct g1_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 T3__& a) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> + 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__); } }; struct f12_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + 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>>>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct g3_rsfunctor__ { - template , + template , + 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> - stan::promote_args_t> - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__, const T3__& a) const { + 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__); } }; 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 , + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; 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 , + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct f6_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* - pstream__) const { + template , + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct g2_rsfunctor__ { - template , + template , + 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> - stan::promote_args_t> - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__, const T3__& a) const { + 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__); } }; struct g10_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::vector>>& a) const { + template , + 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_col_vector>>, + stan::is_vt_not_complex>>>* = nullptr> + 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__); } }; struct f8_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* - pstream__) const { + template , + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct g12_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::vector>>& a) const { + template , + 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_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>* = nullptr> + 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__); } }; struct f9_rsfunctor__ { + template , + std::is_integral>, + 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 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 >* = nullptr> - stan::promote_args_t - operator()(const std::vector>& y_slice, - const int& start, const int& end, std::ostream* pstream__) const { + template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct s_rsfunctor__ { - template , - stan::is_stan_scalar, + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral, + std::is_integral, + stan::math::disjunction, + 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>* = 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, - 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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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::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_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::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>* = nullptr> + 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, + 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 >* = nullptr> - stan::promote_args_t - operator()(const std::vector>>& - y_slice, const int& start, const int& end, std::ostream* - pstream__) const { + template , + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; struct f1a_rsfunctor__ { - template >* = nullptr> - stan::promote_args_t - operator()(const std::vector& y_slice, const int& start, const int& - end, std::ostream* pstream__) const { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral>* = nullptr> + 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__); } }; -template >*> -stan::promote_args_t -f1(const std::vector& y_slice, const int& start, const int& end, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real f1(array[] real, int, int) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f1(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35530,21 @@ 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, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real f1a(array[] real, int, int) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f1a(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35558,19 @@ 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; +// real f2(array[] vector, int, int) +template , + stan::is_col_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f2(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35584,19 @@ 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; +// real f3(array[] row_vector, int, int) +template , + stan::is_row_vector>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f3(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35610,19 @@ 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; +// real f4(array[] matrix, int, int) +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f4(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35636,24 @@ 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; +// real f5(array[,] real, int, int) +template , + stan::is_std_vector>, + stan::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t>>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f5(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35667,22 @@ f5(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f6(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real f6(array[,] vector, int, int) +template , + stan::is_std_vector>, + stan::is_col_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f6(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35696,22 @@ f6(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f7(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real f7(array[,] row_vector, int, int) +template , + stan::is_std_vector>, + stan::is_row_vector>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f7(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35725,22 @@ f7(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -f8(const std::vector>>& y_slice, - const int& start, const int& end, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real f8(array[,] matrix, int, int) +template , + stan::is_std_vector>, + stan::is_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f8(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35754,18 @@ f8(const std::vector>>& y_slice, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f9(array[] int, int, int) +template , + std::is_integral>, + std::is_integral, std::is_integral>*> double -f9(const std::vector& y_slice, const int& start, const int& 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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32146,11 +35779,19 @@ f9(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f10(array[,] int, int, int) +template , + stan::is_std_vector>, + std::is_integral>>, + std::is_integral, std::is_integral>*> double -f10(const std::vector>& y_slice, const int& start, - const int& 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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32164,11 +35805,22 @@ f10(const std::vector>& y_slice, const int& start, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real f11(array[,,] int, int, int) +template , + 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 int& - start, const int& 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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32182,12 +35834,28 @@ 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; +// real f12(array[,,] real, int, 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>>>>, + std::is_integral, std::is_integral>*> +stan::promote_args_t> +f12(const T0__& y_slice, const T1__& start, const T2__& end, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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 +35869,24 @@ f12(const std::vector>>& y_slice, const int& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g1(const std::vector& y_slice, const int& start, const int& end, - const T3__& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g1(array[] real, int, int, real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::math::disjunction, + std::is_floating_point>>*> +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__ = stan::promote_args_t, + T3__>; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -32222,16 +35900,24 @@ g1(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// real g2(array[] real, int, int, vector) +template , + 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>*> -stan::promote_args_t> -g2(const std::vector& y_slice, const int& start, const int& end, - const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_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__ = stan::promote_args_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__); static constexpr bool propto__ = true; // suppress unused var warning @@ -32246,16 +35932,24 @@ g2(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// real g3(array[] real, int, int, row_vector) +template , + 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>*> -stan::promote_args_t> -g3(const std::vector& y_slice, const int& start, const int& end, - const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_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__ = stan::promote_args_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__); static constexpr bool propto__ = true; // suppress unused var warning @@ -32270,16 +35964,24 @@ g3(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// real g4(array[] real, int, int, matrix) +template , + 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>*> -stan::promote_args_t> -g4(const std::vector& y_slice, const int& start, const int& end, - const T3__& a_arg__, std::ostream* pstream__) { - using local_scalar_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__ = stan::promote_args_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__); static constexpr bool propto__ = true; // suppress unused var warning @@ -32294,14 +35996,27 @@ g4(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g5(const std::vector& y_slice, const int& start, const int& end, - const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g5(array[] real, int, int, array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_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__ = 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__; @@ -32315,14 +36030,25 @@ g5(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g6(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g6(array[] real, int, int, array[] vector) +template , + 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>, + stan::is_vt_not_complex>>*> +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__ = 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__; @@ -32336,14 +36062,25 @@ g6(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g7(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g7(array[] real, int, int, array[] row_vector) +template , + 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>, + stan::is_vt_not_complex>>*> +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__ = 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__; @@ -32357,14 +36094,25 @@ g7(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g8(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g8(array[] real, int, int, array[] matrix) +template , + 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>, + stan::is_vt_not_complex>>*> +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__ = 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__; @@ -32378,14 +36126,30 @@ g8(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g9(const std::vector& y_slice, const int& start, const int& end, - const std::vector>& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real g9(array[] real, int, int, array[,] real) +template , + 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::math::disjunction>>, + std::is_floating_point< + stan::value_type_t< + stan::value_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__ = 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__; @@ -32399,15 +36163,28 @@ g9(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g10(const std::vector& y_slice, const int& start, const int& end, - const std::vector>>& a, +// real g10(array[] real, int, int, array[,] vector) +template , + 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_col_vector>>, + stan::is_vt_not_complex>>>*> +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__ = stan::promote_args_t; + 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__; @@ -32421,15 +36198,28 @@ g10(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g11(const std::vector& y_slice, const int& start, const int& end, - const std::vector>>& a, +// real g11(array[] real, int, int, array[,] row_vector) +template , + 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_row_vector>>, + stan::is_vt_not_complex>>>*> +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__ = stan::promote_args_t; + 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__; @@ -32443,15 +36233,28 @@ g11(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar>*> -stan::promote_args_t -g12(const std::vector& y_slice, const int& start, const int& end, - const std::vector>>& a, +// real g12(array[] real, int, int, array[,] matrix) +template , + 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_eigen_matrix_dynamic>>, + stan::is_vt_not_complex>>>*> +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__ = stan::promote_args_t; + 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__; @@ -32465,54 +36268,124 @@ g12(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , - stan::is_stan_scalar, +/* real + s(array[] real, int, int, int, real, vector, row_vector, matrix, + array[] int, array[] real, array[] vector, array[] row_vector, + array[] matrix, array[,] int, array[,] real, array[,] vector, + array[,] row_vector, array[,] matrix, array[,,] int, array[,,] real) + */ +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + std::is_integral, + stan::math::disjunction, + 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::promote_args_t, + stan::is_std_vector, + std::is_integral>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + 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::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_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::math::disjunction>>>, + std::is_floating_point< + stan::value_type_t< + stan::value_type_t< + stan::value_type_t>>>>>*> +stan::promote_args_t, T4__, stan::base_type_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__, - 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__ = stan::promote_args_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__ = stan::promote_args_t, + T4__, stan::base_type_t, stan::base_type_t, stan::base_type_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, + 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__; 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__); @@ -32531,9 +36404,12 @@ s(const std::vector& y_slice, const int& start, const int& end, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real r() 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 +36764,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 +37353,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 +37545,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 +37744,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 +38043,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 +38211,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__; @@ -35031,23 +38919,31 @@ 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>, stan::promote_args_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 >*> +// array[] real foo(real) +template , + std::is_floating_point>>*> std::vector> foo(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35061,12 +38957,17 @@ foo(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// tuple(array[] real, real) baz(real) +template , + std::is_floating_point>>*> std::tuple>, stan::promote_args_t> baz(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35081,11 +38982,16 @@ baz(const T0__& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// array[] complex bar(real) +template , + std::is_floating_point>>*> std::vector>> bar(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -35112,6 +39018,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 +39104,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 +39160,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 +39200,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 +39221,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__; @@ -35516,36 +39434,45 @@ 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::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 , + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + stan::math::disjunction, + std::is_floating_point>>* = nullptr> 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__); } }; +// vector rhs(real, vector, real) template , + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> + 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* pstream__) { using local_scalar_t__ = stan::promote_args_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 +39503,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 +39574,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 +39757,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 +39947,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 +40179,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 +40338,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 +40918,41 @@ 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::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_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__) { +// real foo0_lpmf(int) +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 +40963,14 @@ 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__) { +// real foo1_lpmf(int) +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 +40981,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* +// real foo4_lp(int) +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__; @@ -37041,11 +41001,15 @@ foo4_lp(const int& 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 >*> + stan::require_all_t, + std::is_floating_point>>*> 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__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37056,11 +41020,15 @@ stan::promote_args_t foo2_lpdf(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo3_lpdf(real) template >*> + stan::require_all_t, + std::is_floating_point>>*> 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__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37071,14 +41039,18 @@ stan::promote_args_t foo3_lpdf(const T0__& y, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real foo5_lp(real) template >*> + stan::require_all_t, + std::is_floating_point>>*> stan::promote_args_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; int current_statement__ = 0; + // 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 +41070,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 +41133,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 +41166,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 +41202,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 +41215,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 +41378,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 +41425,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 +41485,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 +41552,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 +41593,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 +41614,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 +41904,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 +42216,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 +42698,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 +43187,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 +43821,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 +44039,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 +45016,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 +45069,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 +45188,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 +45314,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 +45359,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 +45384,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__; @@ -41539,12 +45559,18 @@ 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> stan::promote_args_t normal(const T0__& a, std::ostream* pstream__); -template >*> +// real normal(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -41567,6 +45593,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 +45667,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 +45711,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 +45751,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 +45772,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__; @@ -41899,17 +45937,24 @@ 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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__); +// real lb_constrain(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t lb_constrain(const T0__& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +45977,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 +46014,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 +46052,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 +46097,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 +46138,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 +46159,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 +46336,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 +46448,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 +46496,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 +46541,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 +46566,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 +46841,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 +47443,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 +47973,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 +48031,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 +48070,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/data_only_functions.stan b/test/integration/good/code-gen/data_only_functions.stan new file mode 100644 index 0000000000..7909f53a85 --- /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/code-gen/expressions/cpp.expected b/test/integration/good/code-gen/expressions/cpp.expected index 6ed00e009b..7f5356fb91 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,29 +608,39 @@ 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 , - stan::is_stan_scalar, +template , + std::is_floating_point>, + std::is_integral, + stan::is_std_vector, + 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, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex>* = nullptr> -stan::promote_args_t, +stan::promote_args_t, stan::base_type_t, stan::base_type_t, stan::base_type_t> -foo1(const T0__& a, const int& b, const std::vector& c, const T3__& - d_arg__, const T4__& e_arg__, const T5__& f_arg__, std::ostream* - pstream__); +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> -Eigen::Matrix, T1__, T2__>,-1,1> -foo2(const T0__& a_arg__, const std::vector>& b, - const std::vector>& c, std::ostream* pstream__); + 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, + 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, @@ -635,26 +657,35 @@ template , stan::base_type_t>,-1,-1> add_udf(const T0__& a_arg__, const T1__& b_arg__, std::ostream* pstream__); -template , - stan::is_stan_scalar, +// real foo1(real, int, array[] real, vector, matrix, row_vector) +template , + std::is_floating_point>, + std::is_integral, + stan::is_std_vector, + 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, stan::is_vt_not_complex, stan::is_row_vector, stan::is_vt_not_complex>*> -stan::promote_args_t, +stan::promote_args_t, stan::base_type_t, stan::base_type_t, stan::base_type_t> -foo1(const T0__& a, const int& 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, 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__); @@ -671,17 +702,26 @@ foo1(const T0__& a, const int& b, const std::vector& c, const T3__& stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector foo2(vector, array[] matrix, array[] row_vector) template , stan::is_vt_not_complex, - stan::is_stan_scalar, - stan::is_stan_scalar>*> -Eigen::Matrix, T1__, T2__>,-1,1> -foo2(const T0__& a_arg__, const std::vector>& b, - const std::vector>& c, std::ostream* pstream__) { + 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, + 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__ = stan::promote_args_t, - T1__, T2__>; + stan::base_type_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__); static constexpr bool propto__ = true; // suppress unused var warning @@ -696,6 +736,7 @@ foo2(const T0__& a_arg__, const std::vector>& b, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix foo3(vector, matrix) template , stan::is_vt_not_complex, @@ -707,6 +748,8 @@ foo3(const T0__& a_arg__, const T1__& b_arg__, 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__; const auto& a = stan::math::to_ref(a_arg__); const auto& b = stan::math::to_ref(b_arg__); static constexpr bool propto__ = true; @@ -722,6 +765,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, @@ -733,6 +777,8 @@ 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>; 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 +805,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 +904,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 +937,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 +973,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 +986,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 +1152,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 +1199,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 +1277,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 +1362,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 +1451,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 +1491,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 061a723b09..16bd7c3c17 100644 --- a/test/integration/good/code-gen/lir.expected +++ b/test/integration/good/code-gen/lir.expected @@ -801,26 +801,38 @@ (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__) + (RequireAllCondition (Exact std::is_integral) (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__))) + (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__)))) + (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) (return_type (StdVector (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))) + ((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 (StdVector (TemplateType T1__)))) y) - ((Const (Ref (StdVector (TemplateType T2__)))) theta) - ((Const (Ref (StdVector Double))) x) ((Const (Ref (StdVector Int))) x_int) + (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) + ((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 @@ -828,7 +840,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)) + ((templates_init + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) + true)) (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_bar1) (args @@ -837,8 +853,11 @@ (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__) + (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 @@ -850,33 +869,50 @@ (cv_qualifiers ()) (body ()))) (FunDef ((templates_init - ((((Bool propto__) (Typename T1__) (RequireIs stan::is_stan_scalar T1__))) true)) + ((((Bool propto__) (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 (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)) + ((templates_init + ((((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 (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)) + ((templates_init + ((((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 (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__))) + (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 @@ -890,7 +926,8 @@ (FunDef ((templates_init ((((Bool propto__) (Typename T0__) (Typename T_lp__) (Typename T_lp_accum__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -899,26 +936,44 @@ ((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__) + (RequireAllCondition (Exact std::is_integral) (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__) + (RequireAllCondition (Exact std::is_integral) (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__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) + true)) (inline false) (return_type (StdVector (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__))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) true)) (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_lp) @@ -928,17 +983,28 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) + ((templates_init + ((((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) (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 T0__) (RequireIs stan::is_stan_scalar T1__) - (RequireIs stan::is_stan_scalar T2__) (RequireIs stan::is_stan_scalar 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 @@ -952,15 +1018,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__) + (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 (Matrix (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 @@ -972,9 +1041,17 @@ (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__) + (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 @@ -992,10 +1069,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_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__) + (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 @@ -1012,329 +1098,779 @@ (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__) + (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 - (Matrix (TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))) + (Matrix + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))) -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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))) + ((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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))) + ((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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1342,116 +1878,254 @@ (StdVector (Matrix (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 ((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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) true)) (inline false) (return_type @@ -1459,26 +2133,25 @@ (StdVector (Matrix (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 @@ -1494,7 +2167,11 @@ (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__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) + true)) (inline false) (return_type (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) @@ -1504,7 +2181,11 @@ ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers ()) (body ()))) (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) true)) + ((templates_init + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) + true)) (inline false) (return_type (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) @@ -1515,37 +2196,48 @@ (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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T3__)) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t ((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 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 (((Const (Ref (TemplateType T0__))) x_arg__) ((Const (Ref (TemplateType T1__))) y_arg__) - ((Const (Ref (StdVector (TemplateType T2__)))) dat) - ((Const (Ref (StdVector Int))) dat_int) + ((Const (Ref (TemplateType T2__))) dat) + ((Const (Ref (TemplateType T3__))) dat_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (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__) + (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 (Matrix (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 @@ -1559,25 +2251,31 @@ (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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T3__)) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t ((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 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 (((Const (Ref (TemplateType T0__))) x) ((Const (Ref (TemplateType T1__))) y) - ((Const (Ref (StdVector (TemplateType T2__)))) dat) - ((Const (Ref (StdVector Int))) dat_int) + ((Const (Ref (TemplateType T2__))) dat) + ((Const (Ref (TemplateType T3__))) dat_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (cv_qualifiers (Const)) (body @@ -1589,17 +2287,18 @@ (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__) + (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 (Matrix (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 @@ -1612,15 +2311,24 @@ (((Return ((FunCall binomialf () ((Var phi) (Var theta) (Var x_r) (Var x_i) (Var pstream__)))))))))))))) + (GlobalComment "int foo(int)") (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__) + (RequireAllCondition (Exact std::is_integral) (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))))) @@ -1648,32 +2356,44 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] real\ + \n sho(real, array[] real, array[] real, data array[] real, data array[] int)") (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__))) + (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__)))) + (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) (return_type (StdVector (TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))) + ((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 (StdVector (TemplateType T1__)))) y) - ((Const (Ref (StdVector (TemplateType T2__)))) theta) - ((Const (Ref (StdVector Double))) x) ((Const (Ref (StdVector Int))) x_int) + (((Const (Ref (TemplateType T0__))) t) ((Const (Ref (TemplateType T1__))) y) + ((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__ ((TypeTrait stan::promote_args_t - ((TemplateType T0__) (TemplateType T1__) (TemplateType T2__))))) + ((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))))) + (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))))) @@ -1729,6 +2449,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__))) @@ -1738,6 +2459,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))))) @@ -1755,8 +2478,13 @@ ((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__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) + false)) (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_bar1) (args @@ -1768,6 +2496,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))))) @@ -1785,10 +2515,14 @@ ((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__) (RequireIs stan::is_stan_scalar T0__) - (RequireIs stan::is_stan_scalar T1__))) + ((((Typename T0__) (Typename 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 @@ -1804,6 +2538,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))))) @@ -1821,13 +2557,18 @@ ((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 T1__) (RequireIs stan::is_stan_scalar T1__))) false)) + ((((Bool propto__) (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 (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 @@ -1835,6 +2576,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__) @@ -1848,12 +2591,18 @@ ((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 T1__) (RequireIs stan::is_stan_scalar T1__))) false)) + ((templates_init + ((((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 (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 @@ -1861,6 +2610,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))))) @@ -1878,12 +2629,18 @@ ((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 T1__) (RequireIs stan::is_stan_scalar T1__))) false)) + ((templates_init + ((((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 (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 @@ -1891,6 +2648,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))))) @@ -1908,10 +2667,14 @@ ((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) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar 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 @@ -1928,6 +2691,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))))) @@ -1946,10 +2711,12 @@ ((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__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type Void) (name unit_normal_lp) (args @@ -1962,6 +2729,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__) @@ -1983,15 +2752,24 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "int foo_1(int)") (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__) + (RequireAllCondition (Exact std::is_integral) (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))))) @@ -2319,15 +3097,24 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "int foo_2(int)") (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__) + (RequireAllCondition (Exact std::is_integral) (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))))) @@ -2371,13 +3158,19 @@ ((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__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) (Typename T1__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)) + (RequireAllCondition (Exact std::is_integral) (TemplateType T1__)))) + false)) (inline false) (return_type (StdVector (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 @@ -2385,6 +3178,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))))) @@ -2402,10 +3197,12 @@ ((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__) - (RequireIs stan::is_stan_scalar T0__))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) false)) (inline false) (return_type (TypeTrait stan::promote_args_t ((TemplateType T0__)))) (name foo_lp) @@ -2419,6 +3216,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__) @@ -2435,18 +3234,28 @@ ((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__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((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) (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 stan::promote_args_t ((TemplateType T0__))))) + (((Using local_scalar_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))))) + (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))))) @@ -2482,11 +3291,18 @@ ((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__) - (RequireIs stan::is_stan_scalar T0__) (RequireIs stan::is_stan_scalar T1__) - (RequireIs stan::is_stan_scalar T2__) (RequireIs stan::is_stan_scalar 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 @@ -2506,6 +3322,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))))) @@ -2600,17 +3418,21 @@ ((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__) (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__) + (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 (Matrix (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 @@ -2622,11 +3444,13 @@ (body (((Using local_scalar_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))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name shared_params) @@ -2658,12 +3482,21 @@ ((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__) - (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__) + (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 @@ -2685,6 +3518,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))))) @@ -2702,14 +3537,24 @@ ((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__) (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__) + (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 @@ -2733,6 +3578,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__) @@ -2746,26 +3593,35 @@ ((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__) (RequireIs stan::is_eigen_matrix_dynamic T0__) - (RequireIs stan::is_vt_not_complex T0__))) + ((((Typename T0__) (Typename 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 - (Matrix (TypeTrait stan::promote_args_t ((TemplateType stan::base_type_t))) + (Matrix + (TypeTrait stan::promote_args_t + ((TypeTrait stan::base_type_t ((TemplateType T0__))))) -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 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))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name mat) @@ -2831,45 +3687,98 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "void\ + \n 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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -2899,45 +3808,98 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "int\ + \n 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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -2962,45 +3924,98 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] int\ + \n f2(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3025,45 +4040,98 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] int\ + \n f3(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact 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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3088,53 +4156,110 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "real\ + \n 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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))) + ((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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3159,54 +4284,111 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] real\ + \n f5(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3231,55 +4413,112 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] real\ + \n f6(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__)))))))) + ((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 Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3304,55 +4543,112 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "vector\ + \n 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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3377,56 +4673,113 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] vector\ + \n f8(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3451,17 +4804,69 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] vector\ + \n f9(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -3469,39 +4874,44 @@ (StdVector (Matrix (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3526,55 +4936,112 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "matrix\ + \n 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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3599,56 +5066,113 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[] matrix\ + \n f11(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((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__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3673,17 +5197,69 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment + "array[,] matrix\ + \n f12(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 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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T2__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T2__)))) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T2__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T5__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T5__)))) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T5__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T7__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T8__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T8__)))) + (RequireAllCondition (Exact stan::is_col_vector) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T8__)))))) + (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__)))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t ((TemplateType T10__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T11__)) + (RequireAllCondition (Exact stan::is_std_vector) + (TypeTrait stan::value_type_t ((TemplateType T11__)))) + (RequireAllCondition (Exact stan::is_eigen_matrix_dynamic) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))) + (RequireAllCondition (Exact stan::is_vt_not_complex) + (TypeTrait stan::value_type_t + ((TypeTrait stan::value_type_t ((TemplateType T11__)))))))) false)) (inline false) (return_type @@ -3691,39 +5267,44 @@ (StdVector (Matrix (TypeTrait stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))) + ((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 - (((Const (Ref Int)) a1) ((Const (Ref (StdVector Int))) a2) - ((Const (Ref (StdVector (StdVector Int)))) 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 stan::promote_args_t - ((TemplateType T3__) (TemplateType T4__) (TemplateType T5__) - (TemplateType stan::base_type_t) (TemplateType T7__) + ((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 - ((TemplateType T8__) (TemplateType stan::base_type_t) - (TemplateType T10__) (TemplateType T11__))))))) + ((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))))) + (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__))))))) @@ -3748,6 +5329,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__))) @@ -3757,6 +5339,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))))) @@ -3811,6 +5395,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__))) @@ -3820,6 +5405,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))))) @@ -3864,6 +5451,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__))) @@ -3873,6 +5461,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))))) @@ -3897,8 +5487,13 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector vecmufoo(real)") (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) + false)) (inline false) (return_type (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) @@ -3912,6 +5507,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))))) @@ -3944,8 +5541,13 @@ ((Expression (FunCall stan::lang::rethrow_located () ((Var e) (Index (Var locations_array__) (Var current_statement__)))))))))))) + (GlobalComment "vector vecmubar(real)") (FunDef - ((templates_init ((((Typename T0__) (RequireIs stan::is_stan_scalar T0__))) false)) + ((templates_init + ((((Typename T0__) + (RequireAllCondition (OneOf (stan::is_autodiff std::is_floating_point)) + (TemplateType T0__)))) + false)) (inline false) (return_type (Matrix (TypeTrait stan::promote_args_t ((TemplateType T0__))) -1 1 AoS)) @@ -3959,6 +5561,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))))) @@ -4002,36 +5606,48 @@ ((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__) - (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__) + (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__)))) + (RequireAllCondition (Exact stan::is_std_vector) (TemplateType T3__)) + (RequireAllCondition (Exact std::is_integral) + (TypeTrait stan::value_type_t ((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 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 (((Const (Ref (TemplateType T0__))) x_arg__) ((Const (Ref (TemplateType T1__))) y_arg__) - ((Const (Ref (StdVector (TemplateType T2__)))) dat) - ((Const (Ref (StdVector Int))) dat_int) + ((Const (Ref (TemplateType T2__))) dat) + ((Const (Ref (TemplateType T3__))) dat_int) ((Pointer (TypeLiteral std::ostream)) pstream__))) (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 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))))) + (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__))))))) @@ -4093,17 +5709,22 @@ ((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__) (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__) + (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 (Matrix (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 @@ -4115,11 +5736,13 @@ (body (((Using local_scalar_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))))) + (Comment "suppress unused var warning") + (Expression (Cast Void (Var current_statement__))) (VariableDefn ((static false) (constexpr false) (type_ (Const (Ref Auto))) (name phi) @@ -4521,6 +6144,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__) @@ -5302,7 +6927,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 @@ -5311,7 +6936,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 @@ -5328,7 +6953,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 @@ -5345,7 +6970,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 @@ -5675,6 +7301,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__) @@ -6456,7 +8084,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 @@ -6465,7 +8093,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 @@ -6482,7 +8110,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 @@ -6499,7 +8127,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 @@ -6834,6 +8463,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__) @@ -7779,7 +9410,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 @@ -7788,7 +9419,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 @@ -7805,7 +9436,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 @@ -7822,7 +9453,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 @@ -9263,6 +10895,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 +11565,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 +16791,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 ff5955a47a..48523e3e48 100644 --- a/test/integration/good/code-gen/ode/cpp.expected +++ b/test/integration/good/code-gen/ode/cpp.expected @@ -43,33 +43,41 @@ 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::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 , +template , + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + std::is_integral, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T3__>,-1,1> -f_2_arg(const T0__& t, const T1__& z_arg__, const int& b, const T3__& a, +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::math::disjunction, + std::is_floating_point>>* = nullptr> Eigen::Matrix, T2__>,-1,1> operator()(const T0__& t, const T1__& z, std::ostream* pstream__, const T2__& a) const { @@ -77,20 +85,24 @@ struct f_1_arg_variadic2_functor__ { } }; struct f_2_arg_variadic2_functor__ { - template , + template , + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>* = nullptr> + std::is_integral, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> 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__); } }; 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>,-1,1> @@ -98,8 +110,10 @@ struct f_0_arg_variadic2_functor__ { return f_0_arg(t, z, pstream__); } }; +// vector f_0_arg(real, vector) template , + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex>*> Eigen::Matrix>,-1,1> @@ -107,6 +121,8 @@ f_0_arg(const T0__& t, const T1__& z_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -121,17 +137,22 @@ 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 , + stan::require_all_t, + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> + 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* pstream__) { using local_scalar_t__ = stan::promote_args_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 +167,23 @@ 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 , +// vector f_2_arg(real, vector, int, real) +template , + std::is_floating_point>, stan::is_col_vector, stan::is_vt_not_complex, - stan::is_stan_scalar>*> + std::is_integral, + stan::math::disjunction, + std::is_floating_point>>*> Eigen::Matrix, T3__>,-1,1> -f_2_arg(const T0__& t, const T1__& z_arg__, const int& b, const T3__& a, +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__>; 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 +222,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 +395,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 +474,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 +562,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 +600,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__; @@ -856,45 +895,64 @@ 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::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__, 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__); template , + typename T4__, typename T5__, typename T6__, typename T7__, + 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::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__, 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 int& unused, std::ostream* pstream__); + const T7__& unused, std::ostream* pstream__); 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::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__, stan::promote_args_t>,-1,1> operator()(const T0__& t, const T1__& y, std::ostream* pstream__, @@ -903,33 +961,47 @@ struct simple_SIR_variadic2_functor__ { return simple_SIR(t, y, beta, kappa, gamma, xi, delta, pstream__); } template , + typename T4__, typename T5__, typename T6__, typename T7__, + 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::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__, 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 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__); } }; +// vector simple_SIR(real, vector, real, real, real, real, real) 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::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__, stan::promote_args_t>,-1,1> simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& @@ -939,6 +1011,8 @@ simple_SIR(const T0__& t, const T1__& y_arg__, const T2__& beta, const T3__& stan::base_type_t, T2__, T3__, T4__, stan::promote_args_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 @@ -977,25 +1051,35 @@ 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 , + typename T4__, typename T5__, typename T6__, typename T7__, + 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::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__, 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 int& unused, std::ostream* pstream__) { + const T7__& unused, std::ostream* pstream__) { 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__; const auto& y = stan::math::to_ref(y_arg__); static constexpr bool propto__ = true; // suppress unused var warning @@ -1056,6 +1140,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 +1250,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 +1382,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 +1521,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 +1613,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 +1646,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 a81a4ca601..e816a643f9 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 f4508210c7..92e8fb076f 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 aa6fd84303..8d15afe7b9 100644 --- a/test/integration/good/code-gen/standalone_functions/cpp.expected +++ b/test/integration/good/code-gen/standalone_functions/cpp.expected @@ -32,38 +32,53 @@ 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> stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -array_fun(const std::vector& a, std::ostream* pstream__); -double int_array_fun(const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +stan::promote_args_t> +array_fun(const T0__& a, std::ostream* pstream__); +template , + 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> 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::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_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> stan::promote_args_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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_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::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>>>> -array_fun(const std::vector>>>& a, - std::ostream* pstream__); -template >*> + std::vector< + std::vector>>>>> +array_fun(const T0__& a, std::ostream* pstream__); +// real my_log1p_exp(real) +template , + std::is_floating_point>>*> stan::promote_args_t my_log1p_exp(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -95,11 +130,19 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -array_fun(const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real array_fun(array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +stan::promote_args_t> +array_fun(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -113,9 +156,15 @@ array_fun(const std::vector& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -double int_array_fun(const std::vector& a, std::ostream* pstream__) { +// real int_array_fun(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -129,6 +178,7 @@ double int_array_fun(const std::vector& 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>*> @@ -136,6 +186,8 @@ Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +211,15 @@ 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 -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__; @@ -176,11 +233,16 @@ int_only_multiplication(const int& a, const int& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real test_lgamma(real) +template , + std::is_floating_point>>*> stan::promote_args_t test_lgamma(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -194,14 +256,18 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void test_lp(real) 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__) { using local_scalar_t__ = stan::promote_args_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__; @@ -212,12 +278,16 @@ 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 >*> + stan::require_all_t, + std::is_floating_point>>*> stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -231,13 +301,18 @@ 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 , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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__; @@ -248,6 +323,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>*> @@ -255,6 +331,8 @@ Eigen::Matrix>>,-1,-1> test_complex(const T0__& a_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -269,13 +347,32 @@ test_complex(const T0__& a_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// array[,,] complex array_fun(array[,,] complex) +template , + stan::is_std_vector>, + stan::is_std_vector>>, + stan::is_complex>>>, + 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>>>> -array_fun(const std::vector>>>& a, - std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; + std::vector< + std::vector>>>>> +array_fun(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -379,45 +476,65 @@ 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> stan::promote_args_t my_log1p_exp(const T0__& x, std::ostream* pstream__); template >* = nullptr> -stan::promote_args_t -array_fun(const std::vector& a, std::ostream* pstream__); -double int_array_fun(const std::vector& a, std::ostream* pstream__); + stan::require_all_t, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +stan::promote_args_t> +array_fun(const T0__& a, std::ostream* pstream__); +template , + 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> 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::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_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> stan::promote_args_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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__); -template >*> +// real my_log1p_exp(real) +template , + std::is_floating_point>>*> stan::promote_args_t my_log1p_exp(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -431,11 +548,19 @@ my_log1p_exp(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> -stan::promote_args_t -array_fun(const std::vector& a, std::ostream* pstream__) { - using local_scalar_t__ = stan::promote_args_t; +// real array_fun(array[] real) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +stan::promote_args_t> +array_fun(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -449,9 +574,15 @@ array_fun(const std::vector& a, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -double int_array_fun(const std::vector& a, std::ostream* pstream__) { +// real int_array_fun(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -465,6 +596,7 @@ double int_array_fun(const std::vector& 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>*> @@ -472,6 +604,8 @@ Eigen::Matrix>,-1,1> my_vector_mul_by_5(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +629,15 @@ 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 -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__; @@ -512,11 +651,16 @@ int_only_multiplication(const int& a, const int& b, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real test_lgamma(real) +template , + std::is_floating_point>>*> stan::promote_args_t test_lgamma(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -530,14 +674,18 @@ test_lgamma(const T0__& x, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// void test_lp(real) 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__) { using local_scalar_t__ = stan::promote_args_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__; @@ -548,12 +696,16 @@ 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 >*> + stan::require_all_t, + std::is_floating_point>>*> stan::promote_args_t test_rng(const T0__& a, RNG& base_rng__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_t; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -567,13 +719,18 @@ 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 , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t test_lpdf(const T0__& a, const T1__& b, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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__; @@ -657,28 +814,63 @@ template >,-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> -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__); + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + 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__); struct integrand_ode_functor__ { template , - 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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + 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__); } }; +// vector integrand(vector) template , stan::is_vt_not_complex>*> @@ -686,6 +878,8 @@ Eigen::Matrix>,-1,1> integrand(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -700,17 +894,42 @@ 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 , - 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__ = stan::promote_args_t; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + 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__ = stan::promote_args_t, + stan::base_type_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__; @@ -733,9 +952,12 @@ integrand_ode(const T0__& r, const std::vector& f, 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; + // 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 ed015bf8f6..99a425a855 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,38 +1911,97 @@ 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> -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__); + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + 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__ { template , - 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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + 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__); } }; +/* array[] real + simple_SIR(real, array[] real, array[] real, array[] real, array[] int) + */ template , - 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__ = stan::promote_args_t; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + 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__ = stan::promote_args_t, + stan::base_type_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__; @@ -1999,6 +2070,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__; @@ -2138,8 +2213,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"); } @@ -2214,6 +2289,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__; @@ -2259,8 +2336,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"); } @@ -2342,6 +2419,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 @@ -2398,8 +2477,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; @@ -2469,6 +2549,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 +2582,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 +2817,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 +3476,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 +3522,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 +3579,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 +3641,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 +3664,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 +4514,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 +4637,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 +4714,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 +4756,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 +4779,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 +5058,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +5119,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5041,18 +5168,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +5336,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 +5575,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 +6009,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 +6449,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 +6781,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 +6808,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 +7152,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 +7360,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 +7641,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 +7929,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 +8040,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 +8131,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 +8625,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 +8716,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 +8749,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 +8787,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 +8800,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 +8967,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 +9057,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 +9090,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 +9128,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 +9141,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 +9314,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 +9391,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 +9485,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 +9586,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 +9640,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 +9672,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 +9910,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 +10029,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 +10085,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 +10137,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 +10167,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 +10439,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 +10905,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 +11105,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 +11298,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 +11371,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 +11894,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 +12105,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 +12190,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 +12359,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 +12386,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 +12740,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +12801,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -12604,18 +12850,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +13013,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 +13627,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 +14066,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 +14403,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 +14438,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,8 +14872,14 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -14621,27 +14889,40 @@ 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_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::math::disjunction, + 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__); -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__); +// int first_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -14676,9 +14957,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -14719,6 +15006,7 @@ int last_capture(const std::vector& 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, @@ -14731,6 +15019,8 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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,29 +15151,42 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +/* void + js_super_lp(array[,] int, array[] int, array[] int, matrix, matrix, + real, vector, matrix) + */ +template , + 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::math::disjunction, + 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__ = 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__; 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 +15726,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 +16849,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 +17786,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 +18463,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 +18508,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 +18958,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 +19348,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 +19543,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 +19787,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 +19826,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 +20191,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 +20391,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 +20476,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 +20563,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 +20608,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 +20963,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +21024,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -20715,18 +21073,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +21241,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 +21480,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 +21914,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 +22354,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 +22686,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 +22713,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__; @@ -22609,6 +22983,7 @@ template >* = nullptr> stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); +// real inner_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -22616,6 +22991,8 @@ stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -22630,6 +23007,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>*> @@ -22637,6 +23015,8 @@ stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +23045,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 +23196,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 +23246,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 +23284,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 +23297,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__; @@ -23068,7 +23460,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> stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__); template >* = nullptr> stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__); -template >*> +// real do_something(real) +template , + std::is_floating_point>>*> stan::promote_args_t do_something(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23094,6 +23492,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>*> @@ -23101,6 +23500,8 @@ stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +23553,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 +23696,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 +23799,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 +23837,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 +23850,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 +24009,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 +24046,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 +24088,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 +24137,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 +24175,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 +24188,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 +24364,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 +24401,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 +24472,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 +24557,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 +24679,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 +24715,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__; @@ -24614,6 +25051,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>*> @@ -24621,6 +25059,8 @@ Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -24635,6 +25075,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>*> @@ -24642,6 +25083,8 @@ Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +25121,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 +25231,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 +25317,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 +25405,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 +25434,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 +25732,19 @@ 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__); +// matrix foo(int, int) +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 +25776,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 +25839,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 +25878,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 +25924,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 +25966,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 +25987,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__; @@ -25688,6 +26162,7 @@ template >* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -25695,6 +26170,8 @@ Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +26205,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 +26304,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 +26361,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 +26421,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 +26434,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,8 +26754,14 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -26276,9 +26771,17 @@ 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_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, @@ -26287,8 +26790,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__); @@ -26297,9 +26799,15 @@ template >* = nullptr> Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +// int first_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26334,9 +26842,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26377,6 +26891,7 @@ int last_capture(const std::vector& 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, @@ -26389,6 +26904,8 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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 +27036,21 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +/* void + jolly_seber_lp(array[,] int, array[] int, array[] int, matrix, matrix, + vector, matrix) + */ +template , + 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, @@ -26530,8 +27059,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__) { @@ -26540,6 +27068,8 @@ jolly_seber_lp(const std::vector>& y, 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__); @@ -27051,6 +27581,7 @@ jolly_seber_lp(const std::vector>& y, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector seq_cprob(vector) template , stan::is_vt_not_complex>*> @@ -27058,6 +27589,8 @@ Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +27673,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 +27871,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 +28768,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 +29675,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 +30359,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 +30400,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 +30800,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 +30863,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 +30889,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 +30922,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 +30960,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 +30973,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 +31136,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 +31223,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 +31280,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 +31322,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 +31343,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 +31519,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 +31578,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 +31617,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 +31663,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 +31706,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 +31728,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 +31959,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +32020,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -31469,18 +32069,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +32232,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 +32411,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 +32822,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 +33239,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 +33548,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 +33573,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__; @@ -33194,24 +33810,34 @@ 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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); -template >* = nullptr> +template , + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__); +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); +// real foo_lpdf(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +33851,17 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real bar_lpmf(int, real) +template , + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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__; @@ -33244,11 +33875,15 @@ bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real baz_lpdf(real) template >*> + stan::require_all_t, + std::is_floating_point>>*> 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__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -33271,6 +33906,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 +33953,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 +34010,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 +34074,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 +34145,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 +34166,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 +34431,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 +34618,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 +34743,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 +34875,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 +35058,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 +35091,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 +35408,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 +35570,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 +35705,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 +35847,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 +35986,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 +36039,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 +36454,32 @@ 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_floating_point>, + 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_floating_point>, + std::is_integral>*> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +36498,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__) { +// int rfun(int) +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__; @@ -35844,10 +36528,13 @@ int rfun(const int& 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; int current_statement__ = 0; + // 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 +36556,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 +36593,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 +37130,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 +37676,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 +37736,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 +37779,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__; @@ -37409,13 +38108,21 @@ 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> stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); -double dumb(const int& x, std::ostream* pstream__); -template >*> +template >* = nullptr> +double dumb(const T0__& x, std::ostream* pstream__); +// real dumb(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -37432,9 +38139,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__) { +// real dumb(int) +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 +38171,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 +38208,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 +38243,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 +38285,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 +38323,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 +38336,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__; @@ -37775,9 +38498,11 @@ 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__); +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -37785,6 +38510,8 @@ stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -37802,10 +38529,13 @@ 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; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -37820,11 +38550,16 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// vector foo(real) +template , + std::is_floating_point>>*> Eigen::Matrix,-1,1> foo(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -37850,6 +38585,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 +38622,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 +38658,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 +38701,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 +38739,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 +38752,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 +38912,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 +38989,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 +39036,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 +39087,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 +39100,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 +39332,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 +39493,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 +39609,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 +39732,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 +39835,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 +39876,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 +40180,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 +41529,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 +41600,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 +41646,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 +41675,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 +43110,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 +43202,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 +43235,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 +43273,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 +43286,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 +43491,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 +43762,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 +43901,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 +44075,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 +44125,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 +44501,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 +44676,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 +44807,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 +44986,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 +45007,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 +45211,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 +45339,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 +45437,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 +45545,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 +45566,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 +45777,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 +45814,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 +45840,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 +45873,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 +46187,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 +46200,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 ba51971932..1f3e79d13d 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,38 +695,97 @@ 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> -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__); + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + 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__ { template , - 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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + 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__); } }; +/* array[] real + simple_SIR(real, array[] real, array[] real, array[] real, array[] int) + */ template , - 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__ = stan::promote_args_t; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + 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__ = stan::promote_args_t, + stan::base_type_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__; @@ -777,6 +848,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 +1044,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 +1151,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 +1232,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 +1265,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 +1497,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 +1561,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 +1607,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 +1660,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 +1720,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 +1744,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 +1999,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 +2125,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 +2205,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 +2247,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 +2271,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 +2533,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +2581,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2488,18 +2614,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +2694,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 +2873,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 +3003,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 +3140,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 +3248,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 +3276,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 +3605,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 +3806,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 +3992,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 +4185,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 +4304,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 +4401,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 +4828,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 +4919,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 +4952,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 +4988,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 +5001,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 +5167,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 +5257,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 +5290,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 +5326,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 +5339,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 +5508,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 +5578,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 +5649,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 +5727,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 +5781,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 +5815,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 +6043,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 +6160,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 +6214,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 +6264,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 +6295,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 +6559,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 +6940,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 +7078,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 +7218,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 +7299,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 +7743,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 +7942,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 +8017,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 +8151,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 +8180,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 +8532,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +8580,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -8368,18 +8613,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +8695,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 +8977,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 +9125,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 +9251,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 +9287,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,8 +9721,14 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -9471,27 +9738,40 @@ 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_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::math::disjunction, + 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__); -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__); +// int first_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9513,9 +9793,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9540,6 +9826,7 @@ int last_capture(const std::vector& 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, @@ -9552,6 +9839,8 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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,29 +9895,42 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +/* void + js_super_lp(array[,] int, array[] int, array[] int, matrix, matrix, + real, vector, matrix) + */ +template , + 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::math::disjunction, + 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__ = 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__; 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 +10159,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 +10455,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 +10602,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 +10889,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 +10937,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 +11358,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 +11600,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 +11695,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 +11795,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 +11835,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 +12123,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 +12315,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 +12396,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 +12483,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 +12530,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 +12871,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +12919,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -12595,18 +12952,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +13032,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 +13211,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 +13341,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 +13478,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 +13586,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 +13614,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__; @@ -13500,6 +13873,7 @@ template >* = nullptr> stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); +// real inner_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -13507,6 +13881,8 @@ stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -13518,6 +13894,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>*> @@ -13525,6 +13902,8 @@ stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +13926,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 +14022,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 +14064,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 +14100,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 +14113,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__; @@ -13886,7 +14277,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> stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__); template >* = nullptr> stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__); -template >*> +// real do_something(real) +template , + std::is_floating_point>>*> stan::promote_args_t do_something(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13918,6 +14315,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>*> @@ -13925,6 +14323,8 @@ stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +14362,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 +14451,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 +14500,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 +14536,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 +14549,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 +14708,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 +14745,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 +14792,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 +14846,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 +14882,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 +14895,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 +15072,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 +15109,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 +15166,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 +15230,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 +15295,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 +15332,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__; @@ -15153,6 +15589,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>*> @@ -15160,6 +15597,8 @@ Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -15174,6 +15613,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>*> @@ -15181,6 +15621,8 @@ Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +15655,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 +15744,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 +15803,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 +15871,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 +15902,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 +16147,19 @@ 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__); +// matrix foo(int, int) +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 +16186,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 +16248,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 +16286,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 +16331,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 +16371,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 +16392,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__; @@ -16095,6 +16568,7 @@ template >* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -16102,6 +16576,8 @@ Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +16610,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 +16697,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 +16740,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 +16788,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 +16801,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,8 +17133,14 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -16656,9 +17150,17 @@ 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_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, @@ -16667,8 +17169,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__); @@ -16677,9 +17178,15 @@ template >* = nullptr> Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +// int first_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -16701,9 +17208,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -16728,6 +17241,7 @@ int last_capture(const std::vector& 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, @@ -16740,6 +17254,8 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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 +17310,21 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +/* void + jolly_seber_lp(array[,] int, array[] int, array[] int, matrix, matrix, + vector, matrix) + */ +template , + 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, @@ -16805,8 +17333,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__) { @@ -16815,6 +17342,8 @@ jolly_seber_lp(const std::vector>& y, 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__); @@ -17031,6 +17560,7 @@ jolly_seber_lp(const std::vector>& y, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector seq_cprob(vector) template , stan::is_vt_not_complex>*> @@ -17038,6 +17568,8 @@ Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +17622,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 +17780,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 +17881,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 +17989,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 +18238,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 +18283,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 +18659,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 +18724,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 +18750,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 +18783,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 +18819,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 +18832,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 +18996,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 +19083,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 +19140,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 +19180,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 +19201,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 +19377,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 +19436,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 +19474,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 +19519,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 +19560,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 +19583,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 +19821,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +19869,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -19303,18 +19902,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +19980,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 +20119,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 +20243,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 +20374,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 +20475,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 +20500,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__; @@ -20123,24 +20738,34 @@ 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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); -template >* = nullptr> +template , + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__); +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); +// real foo_lpdf(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +20776,17 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real bar_lpmf(int, real) +template , + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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__; @@ -20167,11 +20797,15 @@ bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real baz_lpdf(real) template >*> + stan::require_all_t, + std::is_floating_point>>*> 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__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -20191,6 +20825,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 +20872,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 +20914,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 +20963,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 +21017,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 +21038,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 +21294,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 +21438,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 +21523,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 +21615,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 +21741,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 +21774,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 +22085,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 +22225,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 +22330,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 +22442,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 +22557,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 +22612,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 +23059,32 @@ 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_floating_point>, + 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_floating_point>, + std::is_integral>*> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +23100,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__) { +// int rfun(int) +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__; @@ -22442,10 +23125,13 @@ int rfun(const int& 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; int current_statement__ = 0; + // 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 +23153,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 +23190,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 +23486,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 +23789,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 +23853,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 +23899,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__; @@ -23473,13 +24171,21 @@ 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> stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); -double dumb(const int& x, std::ostream* pstream__); -template >*> +template >* = nullptr> +double dumb(const T0__& x, std::ostream* pstream__); +// real dumb(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23493,9 +24199,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__) { +// real dumb(int) +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 +24228,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 +24265,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 +24297,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 +24336,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 +24372,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 +24385,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__; @@ -23825,9 +24547,11 @@ 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__); +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -23835,6 +24559,8 @@ stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -23849,10 +24575,13 @@ 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; int current_statement__ = 0; + // 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,11 +24593,16 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// vector foo(real) +template , + std::is_floating_point>>*> Eigen::Matrix,-1,1> foo(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -23891,6 +24625,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 +24662,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 +24694,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 +24733,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 +24769,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 +24782,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 +24942,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__; @@ -24247,7 +24997,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)); } @@ -24271,6 +25021,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__; @@ -24287,7 +25039,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)); } @@ -24318,6 +25070,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 +25117,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 +25130,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 +25355,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 +25494,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 +25583,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 +25679,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 +25761,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 +25804,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 +26083,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 +26248,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 +26323,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 +26371,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 +26402,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 +26640,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 +26732,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 +26765,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 +26801,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 +26814,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 +27012,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 +27228,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 +27324,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 +27400,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 +27450,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 +27717,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 +27821,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 +27881,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 +27946,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 +27967,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 +28173,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 +28265,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 +28327,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 +28397,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 +28418,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 +28632,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 +28669,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 +28695,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 +28728,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 +28791,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 +28804,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 8c97f5daeb..405290fff5 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,38 +677,97 @@ 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> -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__); + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +std::vector< + 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__ { template , - 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 { + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + std::vector< + 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__); } }; +/* array[] real + simple_SIR(real, array[] real, array[] real, array[] real, array[] int) + */ template , - 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__ = stan::promote_args_t; + typename T4__, + stan::require_all_t, + std::is_floating_point>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + std::is_integral>>*> +std::vector< + 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__ = stan::promote_args_t, + stan::base_type_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__; @@ -759,6 +830,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__; @@ -888,8 +963,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); @@ -950,6 +1026,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__; @@ -985,8 +1063,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); @@ -1054,6 +1133,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 @@ -1102,8 +1183,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); @@ -1132,6 +1214,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 +1247,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 +1479,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 +1543,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 +1586,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 +1637,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 +1695,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 +1718,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 +1973,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 +2096,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 +2173,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 +2213,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 +2236,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 +2496,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +2544,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -2448,18 +2577,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +2658,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 +2837,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 +3025,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 +3220,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 +3383,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 +3410,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 +3739,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 +3940,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 +4124,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 +4315,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 +4424,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 +4515,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 +4942,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 +5033,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 +5066,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 +5102,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 +5115,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 +5281,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 +5371,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 +5404,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 +5440,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 +5453,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 +5622,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 +5692,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 +5761,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 +5837,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 +5888,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 +5920,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 +6148,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 +6264,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 +6317,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 +6366,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 +6396,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 +6660,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 +7044,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 +7185,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 +7324,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 +7397,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 +7841,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 +8038,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 +8113,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 +8246,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 +8273,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 +8624,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +8672,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -8457,18 +8705,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +8784,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 +9126,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 +9334,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 +9517,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 +9552,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,8 +9985,14 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -9732,27 +10002,40 @@ 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_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::math::disjunction, + 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__); -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__); +// int first_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9774,9 +10057,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -9801,6 +10090,7 @@ int last_capture(const std::vector& 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, @@ -9813,6 +10103,8 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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,29 +10160,42 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +/* void + js_super_lp(array[,] int, array[] int, array[] int, matrix, matrix, + real, vector, matrix) + */ +template , + 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::math::disjunction, + 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__ = 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__; 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 +10420,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 +11022,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 +11475,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 +11846,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 +11891,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 +12312,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 +12549,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 +12640,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 +12732,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 +12771,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 +13059,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 +13249,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 +13331,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 +13414,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 +13459,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 +13799,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +13847,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -13520,18 +13880,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +13961,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 +14140,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 +14328,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 +14523,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 +14686,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 +14713,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__; @@ -14596,6 +14972,7 @@ template >* = nullptr> stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__); +// real inner_lpdf(vector) template , stan::is_vt_not_complex>*> @@ -14603,6 +14980,8 @@ stan::promote_args_t> inner_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -14614,6 +14993,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>*> @@ -14621,6 +15001,8 @@ stan::promote_args_t> outer_lpdf(const T0__& phi_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +15025,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 +15130,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 +15181,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 +15217,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 +15230,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__; @@ -14999,7 +15393,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> stan::promote_args_t do_something(const T0__& x, std::ostream* pstream__); template >* = nullptr> stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__); -template >*> +// real do_something(real) +template , + std::is_floating_point>>*> stan::promote_args_t do_something(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -15025,6 +15425,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>*> @@ -15032,6 +15433,8 @@ stan::promote_args_t> summer(const T0__& et_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +15472,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 +15589,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 +15666,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 +15702,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 +15715,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 +15875,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 +15912,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 +15955,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 +16005,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 +16041,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 +16054,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 +16231,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 +16268,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 +16321,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 +16386,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 +16446,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 +16482,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__; @@ -16299,6 +16738,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>*> @@ -16306,6 +16746,8 @@ Eigen::Matrix>,-1,1> single_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -16320,6 +16762,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>*> @@ -16327,6 +16770,8 @@ Eigen::Matrix>,-1,1> multi_ret_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +16804,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 +16913,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 +16999,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 +17083,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 +17112,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 +17356,19 @@ 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__); +// matrix foo(int, int) +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 +17395,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 +17458,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 +17496,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 +17541,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 +17581,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 +17602,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__; @@ -17301,6 +17777,7 @@ template >* = nullptr> Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__); +// vector foo(vector) template , stan::is_vt_not_complex>*> @@ -17308,6 +17785,8 @@ Eigen::Matrix>,-1,1> foo(const T0__& oR_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +17818,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 +17916,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 +17977,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 +18036,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 +18049,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,8 +18380,14 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); template , stan::is_vt_not_complex, @@ -17900,9 +18397,17 @@ 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_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, @@ -17911,8 +18416,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__); @@ -17921,9 +18425,15 @@ template >* = nullptr> Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +// int first_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -17945,9 +18455,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -17972,6 +18488,7 @@ int last_capture(const std::vector& 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, @@ -17984,6 +18501,8 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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 +18558,21 @@ prob_uncaptured(const T0__& p_arg__, const T1__& phi_arg__, std::ostream* stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +/* void + jolly_seber_lp(array[,] int, array[] int, array[] int, matrix, matrix, + vector, matrix) + */ +template , + 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, @@ -18050,8 +18581,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__) { @@ -18060,6 +18590,8 @@ jolly_seber_lp(const std::vector>& y, 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__); @@ -18272,6 +18804,7 @@ jolly_seber_lp(const std::vector>& y, stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector seq_cprob(vector) template , stan::is_vt_not_complex>*> @@ -18279,6 +18812,8 @@ Eigen::Matrix>,-1,1> seq_cprob(const T0__& gamma_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +18866,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 +19024,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 +19435,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 +19853,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 +20216,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 +20257,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 +20633,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 +20698,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 +20724,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 +20757,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 +20793,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 +20806,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 +20970,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 +21056,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 +21112,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 +21152,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 +21173,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 +21349,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 +21408,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 +21445,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 +21489,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 +21529,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 +21551,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 +21788,33 @@ 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)"}; -int first_capture(const std::vector& y_i, std::ostream* pstream__); -int last_capture(const std::vector& y_i, std::ostream* pstream__); -template , +template , + std::is_integral>>* = nullptr> +int first_capture(const T0__& y_i, std::ostream* pstream__); +template , + std::is_integral>>* = nullptr> +int last_capture(const T0__& y_i, std::ostream* pstream__); +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__); -int first_capture(const std::vector& y_i, std::ostream* pstream__) { +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>>*> +int first_capture(const T0__& 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 +21836,15 @@ int first_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -int last_capture(const std::vector& y_i, std::ostream* pstream__) { +// int last_capture(array[] int) +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 + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -21267,18 +21869,22 @@ int last_capture(const std::vector& y_i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template , +// matrix prob_uncaptured(int, int, matrix, matrix) +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__) { +prob_uncaptured(const T0__& nind, const T1__& 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>; 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 +21948,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 +22087,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 +22270,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 +22460,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 +22618,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 +22643,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__; @@ -22262,24 +22880,34 @@ 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::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__); -template >* = nullptr> +template , + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__); +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__); template >* = nullptr> + stan::require_all_t, + std::is_floating_point>>* = nullptr> stan::promote_args_t baz_lpdf(const T0__& x, std::ostream* pstream__); +// real foo_lpdf(real, real) template , - stan::is_stan_scalar>*> + stan::require_all_t, + std::is_floating_point>, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +22918,17 @@ foo_lpdf(const T0__& x, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// real bar_lpmf(int, real) +template , + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { +bar_lpmf(const T0__& n, const T1__& mu, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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__; @@ -22306,11 +22939,15 @@ bar_lpmf(const int& n, const T1__& mu, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// real baz_lpdf(real) template >*> + stan::require_all_t, + std::is_floating_point>>*> 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__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -22330,6 +22967,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 +23014,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 +23078,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 +23149,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 +23224,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 +23245,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 +23501,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 +23645,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 +23728,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 +23818,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 +23940,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 +23973,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 +24284,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 +24424,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 +24529,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 +24641,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 +24754,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 +24807,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 +25206,32 @@ 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_floating_point>, + 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_floating_point>, + std::is_integral>*> void -nrfun_lp(const T0__& x, const int& y, T_lp__& lp__, T_lp_accum__& lp_accum__, - std::ostream* pstream__) { +nrfun_lp(const T0__& x, const T1__& y, T_lp__& lp__, T_lp_accum__& + lp_accum__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +25247,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__) { +// int rfun(int) +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__; @@ -24586,10 +25272,13 @@ int rfun(const int& 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; int current_statement__ = 0; + // 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 +25300,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 +25337,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 +25668,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 +26008,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 +26066,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 +26109,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__; @@ -25679,13 +26380,21 @@ 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> stan::promote_args_t dumb(const T0__& x, std::ostream* pstream__); -double dumb(const int& x, std::ostream* pstream__); -template >*> +template >* = nullptr> +double dumb(const T0__& x, std::ostream* pstream__); +// real dumb(real) +template , + std::is_floating_point>>*> 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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -25699,9 +26408,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__) { +// real dumb(int) +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 +26437,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 +26474,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 +26506,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 +26545,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 +26581,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 +26594,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__; @@ -26031,9 +26756,11 @@ 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__); +// real foo(vector) template , stan::is_vt_not_complex>*> @@ -26041,6 +26768,8 @@ stan::promote_args_t> foo(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -26055,10 +26784,13 @@ 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; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); // suppress unused var warning (void) DUMMY_VAR__; @@ -26070,11 +26802,16 @@ bar_lp(T_lp__& lp__, T_lp_accum__& lp_accum__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } -template >*> +// vector foo(real) +template , + std::is_floating_point>>*> Eigen::Matrix,-1,1> foo(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__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -26097,6 +26834,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 +26871,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 +26904,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 +26944,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 +26980,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 +26993,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 +27153,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 +27229,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 +27275,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 +27322,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 +27335,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 +27560,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 +27699,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 +27788,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 +27884,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 +27965,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 +28006,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 +28285,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 +28440,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 +28507,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 +28551,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 +28580,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 +28818,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 +28910,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 +28943,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 +28979,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 +28992,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 +29190,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 +29407,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 +29505,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 +29578,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 +29628,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 +29895,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 +29997,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 +30055,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 +30120,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 +30141,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 +30346,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 +30437,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 +30498,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 +30567,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 +30588,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 +30802,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 +30839,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 +30865,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 +30898,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 +30961,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 +30974,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 e128fe1acd..a6d0ea9bda 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> udf_fun(const T0__& A_arg__, std::ostream* pstream__); -int mask_fun(const int& i, std::ostream* pstream__) { +// int mask_fun(int) +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__; @@ -4307,6 +4361,7 @@ int mask_fun(const int& i, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// vector udf_fun(vector) template , stan::is_vt_not_complex>*> @@ -4314,6 +4369,8 @@ Eigen::Matrix>,-1,1> udf_fun(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +4400,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 +4599,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 +5015,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 +5480,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 +5725,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 +5896,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 +6827,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 +6888,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 +6964,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 +7052,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 +7099,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 +7127,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__; @@ -7254,12 +7335,14 @@ 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>,-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>*> @@ -7267,6 +7350,8 @@ Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -7281,8 +7366,10 @@ nono_func(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix okay_reduction(real, matrix) template , + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> Eigen::Matrix>,-1,-1> @@ -7291,6 +7378,8 @@ okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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 +7403,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 +7516,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 +7592,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 +7677,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 +7715,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__; @@ -7934,9 +8035,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -7952,6 +8056,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>*> @@ -7959,6 +8064,8 @@ Eigen::Matrix>,-1,-1> mat_ret_user_func(const T0__& A_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +8090,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 +8198,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 +8279,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 +8372,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 +8403,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 +8729,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 +8830,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 +8910,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 +8988,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 +9019,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__; @@ -9137,12 +9268,14 @@ 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>,-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>*> @@ -9150,6 +9283,8 @@ Eigen::Matrix>,-1,-1> nono_func(const T0__& x_arg__, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 @@ -9164,8 +9299,10 @@ nono_func(const T0__& x_arg__, std::ostream* pstream__) { stan::lang::rethrow_located(e, locations_array__[current_statement__]); } } +// matrix okay_reduction(real, matrix) template , + stan::require_all_t, + std::is_floating_point>, stan::is_eigen_matrix_dynamic, stan::is_vt_not_complex>*> Eigen::Matrix>,-1,-1> @@ -9174,6 +9311,8 @@ okay_reduction(const T0__& sum_x, const T1__& y_arg__, std::ostream* using local_scalar_t__ = stan::promote_args_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 +9336,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 +9383,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 +9431,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 +9486,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 +9548,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 +9579,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 +9844,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 +9899,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 +9956,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 +10020,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 +10102,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 +10153,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__; @@ -10276,4 +10439,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 c675b30d09..32f3aaf2eb 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 0000000000..d4c85876e1 --- /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); +} diff --git a/test/integration/good/overloading/minimum_promotion.stan b/test/integration/good/overloading/minimum_promotion.stan index 464c278df7..446a7c4eee 100644 --- a/test/integration/good/overloading/minimum_promotion.stan +++ b/test/integration/good/overloading/minimum_promotion.stan @@ -1,19 +1,23 @@ functions { - real something(int x){ - return 1.0; - } - - - real something(real x){ - return 2.0; - } - - real something(complex x){ - return 3.0; - } - + real something(int x) { + return 1.0; + } + + real something(real x) { + return 2.0; + } + + real something(complex x) { + return 3.0; + } } - model { - print(something(1)); + print(something(1)); + print(something(1.0)); + print(something(1i)); +} +generated quantities { + print(something(1)); + print(something(1.0)); + print(something(1i)); } diff --git a/test/integration/good/overloading/pretty.expected b/test/integration/good/overloading/pretty.expected index 9df44c823d..764d0a9d12 100644 --- a/test/integration/good/overloading/pretty.expected +++ b/test/integration/good/overloading/pretty.expected @@ -81,6 +81,13 @@ functions { } model { print(something(1)); + print(something(1.0)); + print(something(1i)); +} +generated quantities { + print(something(1)); + print(something(1.0)); + print(something(1i)); } $ ../../../../../install/default/bin/stanc --auto-format multi_fun.stan diff --git a/test/integration/good/tuples/cpp.expected b/test/integration/good/tuples/cpp.expected index b02d1d4e43..8b86ca94c2 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, 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__)); } @@ -234,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__)); @@ -451,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__)); @@ -622,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__)); @@ -678,6 +681,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 +933,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 +1192,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 +1513,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 +1817,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__; @@ -1997,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__)); } @@ -2052,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__)); @@ -2286,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__)); @@ -2458,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__)); @@ -2934,6 +2947,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 +2984,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__; @@ -2988,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) { @@ -3011,6 +3029,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__; @@ -3030,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) { @@ -3060,6 +3081,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 +3121,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 +3142,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 +3313,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); @@ -3305,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__) { @@ -3338,6 +3367,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 +3393,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 +3426,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 +3462,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 +3475,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 +3633,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); @@ -3616,8 +3657,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__, @@ -3651,6 +3693,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 +3719,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 +3752,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 +3788,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 +3801,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 +3959,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); @@ -3933,19 +3987,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__, @@ -3979,6 +4033,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 +4059,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 +4092,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 +4128,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 +4141,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 +4302,8 @@ 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__)); } @@ -4401,6 +4467,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 +4493,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 +4526,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 +4562,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 +4575,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__; @@ -4656,9 +4732,12 @@ 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; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -4667,7 +4746,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__]); } @@ -4683,6 +4762,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 +4948,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 +5076,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 +5219,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 +5349,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__; @@ -5356,7 +5447,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__)); } @@ -5504,8 +5595,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__", @@ -5777,16 +5868,31 @@ 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; int current_statement__ = 0; + // suppress unused var warning + (void) current_statement__; static constexpr bool propto__ = true; // suppress unused var warning (void) propto__; @@ -5794,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; @@ -5809,6 +5962,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); @@ -5824,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) { @@ -5860,6 +6015,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__; @@ -5870,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__]); } @@ -5890,6 +6070,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__; @@ -5900,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__]); } @@ -5927,6 +6132,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 +6168,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 +6181,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 +6319,70 @@ 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__); +// real tuple_tester(data tuple(array[] real, int)) +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 +6402,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 +6440,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 +6485,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 +6495,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 +6521,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 +6534,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 +6659,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 +6669,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 +6709,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 +6746,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 +6772,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 +6805,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 +6815,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 +6841,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 +6854,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 +6872,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 +6880,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 +6887,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 +6903,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 +6920,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 +6979,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 +6989,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 +7031,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 +7079,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 +7129,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 +7186,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 +7196,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 +7233,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,23 +7259,45 @@ 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__; - } - 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__) {} - } - inline void - get_dims(std::vector>& dimss__, const bool - emit_transformed_parameters__ = true, const bool - emit_generated_quantities__ = true) const { - dimss__ = std::vector>{}; + 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"}; + 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__) {} } @@ -7027,6 +7305,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 +7316,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 +7336,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 +7463,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 +7493,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 +7519,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 +7552,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 +7562,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 +7601,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 +7726,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 +7777,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 +7809,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 +7835,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 +7868,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 +7878,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 +7917,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 +8042,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 +8093,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 +8124,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 +8150,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 +8183,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 +8193,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 +8232,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 +8357,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 +8443,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 +8469,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 +8502,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 +8512,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 +8538,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 +8551,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 +8569,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 +8577,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 +8584,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 +8600,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 +8746,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,33 +8762,50 @@ 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__); - } 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__; + 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(); + } + // 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_params_model_namespace::log_prob"; + "tuple_nested_param_model_namespace::log_prob"; // suppress unused var warning (void) function__; try { @@ -8652,8 +8815,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 +8859,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 +8869,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 +8879,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 +8923,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,7 +8937,26 @@ 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)); + 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__]); } @@ -8749,6 +8968,8 @@ class tuple_params_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__; @@ -8758,6 +8979,14 @@ class tuple_params_model final : public model_base_crtp { 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 +8996,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 +9033,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 +9043,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 +9058,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 +9080,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 +9107,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 +9124,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 +9183,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,198 +9193,46 @@ 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__; - 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; + num_params_r__ = (1 + 1); } inline std::string model_name() const final { - return "tuple_promotion_model"; + return "tuple_params_model"; } inline std::vector model_compile_info() const noexcept { return std::vector{"stanc_version = %%NAME%%3 %%VERSION%%", @@ -9121,104 +9252,24 @@ 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__]); } @@ -9239,104 +9290,24 @@ 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__]); } @@ -9364,6 +9335,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 +9345,28 @@ 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::tuple ps = + std::tuple{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()}}; + current_statement__ = 1; + 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 ; } - 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__]); } @@ -9566,9 +9381,24 @@ 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__; + 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 @@ -9577,264 +9407,2573 @@ 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__; + 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{}; - 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()); - } + 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>{}; - 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()); - } + 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 { - 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)); - } + 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 { - 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() + "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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +stan::promote_args_t, stan::base_type_t> +dummy(const std::tuple& test, std::ostream* pstream__); +// real dummy(tuple(array[] real, array[] real)) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +stan::promote_args_t, stan::base_type_t> +dummy(const std::tuple& test, 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__ = 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&, 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, + 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< + 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(); + } + 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::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 , + std::is_integral>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = nullptr> +stan::promote_args_t> +tsum(const std::tuple& s, std::ostream* pstream__); +template , + stan::is_vt_not_complex, + std::is_integral>* = nullptr> +void +foo2(const std::vector>& test, std::ostream* + pstream__); +template , + 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 , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex, + stan::math::disjunction, + std::is_floating_point>, + std::is_integral, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>* = nullptr> +void +overly_complicated(const std::tuple, T0__2__>& t1, + const std::vector>& t2, + std::ostream* pstream__); +// void foo(tuple(matrix, int)) +template , + stan::is_vt_not_complex, + std::is_integral>*> +void foo(const std::tuple& test, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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__]); + } +} +// real tsum(tuple(array[] int, array[] real)) +template , + std::is_integral>, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +stan::promote_args_t> +tsum(const std::tuple& s, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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__]); + } +} +// void foo2(array[] tuple(matrix, int)) +template , + stan::is_vt_not_complex, + std::is_integral>*> +void +foo2(const std::vector>& test, std::ostream* + pstream__) { + using local_scalar_t__ = stan::promote_args_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__]); + } +} +// void foo3(tuple(real, matrix)) +template , + std::is_floating_point>, + 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>; + 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__]); + } +} +/* void + overly_complicated(tuple(array[] matrix, tuple(int, matrix), real), + array[] tuple(int, matrix)) + */ +template , + stan::is_eigen_matrix_dynamic>, + stan::is_vt_not_complex>, + std::is_integral, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex, + stan::math::disjunction, + std::is_floating_point>, + std::is_integral, + stan::is_eigen_matrix_dynamic, + stan::is_vt_not_complex>*> +void +overly_complicated(const std::tuple, T0__2__>& t1, + const std::vector>& t2, + std::ostream* pstream__) { + 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__; + 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::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(); + } + 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_templating_model_namespace::write_array"; + // suppress unused var warning + (void) function__; + try { + 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 ; + } + 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&, const std::vector&>(a1, + a2), pstream__); + current_statement__ = 3; + foo2( + std::vector, int>>{std::tuple< + const 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, + const 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__]); + } + } + 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__) {} + if (emit_generated_quantities__) { + std::vector temp{"s"}; + 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__) {} + if (emit_generated_quantities__) { + std::vector> temp{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__) {} + if (emit_generated_quantities__) { + 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__) {} + if (emit_generated_quantities__) { + param_names__.emplace_back(std::string() + "s"); + } + } + inline std::string get_constrained_sizedtypes() const { + return std::string("[{\"name\":\"s\",\"type\":{\"name\":\"real\"},\"block\":\"generated_quantities\"}]"); + } + inline std::string get_unconstrained_sizedtypes() const { + return std::string("[{\"name\":\"s\",\"type\":{\"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 * (0); + const size_t num_gen_quantities = emit_generated_quantities * (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 * (0); + const size_t num_gen_quantities = emit_generated_quantities * (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_templating_model_namespace::tuple_templating_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_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 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 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, + 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::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>* = 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 , + 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__ = 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__ = 15; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 16; + 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__]); + } +} +// void g(tuple(matrix, int, array[] real)) +template , + stan::is_vt_not_complex, + std::is_integral, + stan::is_std_vector, + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>>*> +void +g(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__ = 18; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<0>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 19; + if (pstream__) { + stan::math::stan_print(pstream__, std::get<1>(x)); + *(pstream__) << std::endl; + } + current_statement__ = 20; + 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__]); + } +} +// 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() {} + 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__ = 12; + 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__ = 12; + 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__ = 13; + context__.validate_dims("data initialization", "y", "double", + std::vector{static_cast(10)}); + y = std::vector(10, std::numeric_limits::quiet_NaN()); + 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__]); + } + 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__); + 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__]); + } + 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__); + 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__]); + } + 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__)); } - 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"); + } + 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__)); } - 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__)); + } + 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__)); } - 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)); + 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\":\"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\":\"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\":\"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\":\"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 @@ -9843,12 +11982,9 @@ class tuple_promotion_model final : public model_base_crtp params_i; @@ -9863,12 +11999,9 @@ class tuple_promotion_model final : public model_base_crtp(num_to_write, @@ -9925,7 +12058,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 , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> +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__ { + template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, + std::is_integral, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>* = nullptr> + 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__); } -} -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>; +}; +// real fun(array[] real, int, int, tuple(real, array[] int)) +template , + stan::math::disjunction>, + std::is_floating_point< + stan::value_type_t>>, + std::is_integral, std::is_integral, + stan::math::disjunction, + std::is_floating_point>, + stan::is_std_vector, + std::is_integral>>*> +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__ = stan::promote_args_t, + T3__0__>; 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,37 +12154,33 @@ 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}; + std::vector data_y; + std::tuple> data_m; + double sum1; public: - ~tuple_templating_model() {} - tuple_templating_model(stan::io::var_context& context__, unsigned int - random_seed__ = 0, std::ostream* pstream__ = nullptr) + ~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_templating_model_namespace::tuple_templating_model"; + "tuple_hof_model_namespace::tuple_hof_model"; // suppress unused var warning (void) function__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); @@ -10162,85 +12189,48 @@ class tuple_templating_model final : public model_base_crtp::min(); pos__ = 1; - current_statement__ = 5; + current_statement__ = 3; context__.validate_dims("data initialization", "N", "int", std::vector{}); N = std::numeric_limits::min(); - current_statement__ = 5; + 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("m1", "N", N); + stan::math::validate_non_negative_index("data_m", "N", N); current_statement__ = 7; - stan::math::validate_non_negative_index("m1", "N", N); + 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; - 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); - } - } - } + 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("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{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"); + 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 +12250,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 +12288,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 +12333,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 +12343,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 +12381,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 +12405,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 +12487,9 @@ class tuple_templating_model final : public model_base_crtp params_i; @@ -10467,9 +12504,9 @@ class tuple_templating_model final : public model_base_crtp(num_to_write, @@ -10526,7 +12563,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__ = +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; + " (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 , + 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> +stan::promote_args_t +foo_lpdf(const std::tuple& x, + const std::tuple& y, std::ostream* + pstream__); +// real foo_lpdf(tuple(real, real), tuple(real, real, real)) +template , + 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::promote_args_t +foo_lpdf(const std::tuple& x, + const std::tuple& y, 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__; + (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 +12682,20 @@ 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::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__]); } @@ -10721,22 +12716,20 @@ 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::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__]); } @@ -10764,6 +12757,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 +12767,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 +12793,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 +12806,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 +12855,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 +12872,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 +12931,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 +12941,38 @@ 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__); + stan::require_all_t, + std::is_floating_point>, + std::is_integral>* = nullptr> +stan::promote_args_t +foo_lpdf(const std::tuple& x, std::ostream* pstream__); +// real foo_lpdf(tuple(real, int)) 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; + stan::require_all_t, + std::is_floating_point>, + std::is_integral>*> +stan::promote_args_t +foo_lpdf(const std::tuple& x, std::ostream* pstream__) { + using local_scalar_t__ = stan::promote_args_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 +12983,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 +13009,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 +13029,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__)); + 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__]); } @@ -11123,17 +13062,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__)); + 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__]); } @@ -11161,6 +13102,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 +13112,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 +13138,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 +13151,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 +13276,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 +13286,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 +13301,27 @@ 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> +template , + std::is_integral, + stan::math::disjunction, + std::is_floating_point>>* = nullptr> stan::promote_args_t -foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* +foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__); -template >*> +// real foo_lpmf(tuple(int, int), real) +template , + std::is_integral, + stan::math::disjunction, + std::is_floating_point>>*> stan::promote_args_t -foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* +foo_lpmf(const std::tuple& x, const T1__& y, std::ostream* pstream__) { using local_scalar_t__ = stan::promote_args_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 +13341,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 +13378,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__; @@ -11429,7 +13389,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__]); @@ -11451,6 +13411,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__; @@ -11460,7 +13422,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__]); @@ -11489,6 +13451,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 +13487,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 +13500,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 65220c61a0..c9780c9ecb 100644 --- a/test/integration/good/tuples/pretty.expected +++ b/test/integration/good/tuples/pretty.expected @@ -78,12 +78,30 @@ 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 +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 @@ -224,6 +242,53 @@ 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); + } + + 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; +} +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)); + + // 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 functions { real fun(array[] real y_slice, int start, int end, @@ -256,6 +321,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 d0ae07810c..184836042e 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 @@ -14338,6 +14562,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 @@ -18442,43 +18767,1196 @@ ((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_hof.stan + $ ../../../../../install/default/bin/stanc -fsoa --debug-optimized-mir tuple_copying.stan ((functions_block - (((fdrt (ReturnType UReal)) (fdname fun) (fdsuffix FnPlain) - (fdargs - ((AutoDiffable y_slice (UArray UReal)) (AutoDiffable start UInt) - (AutoDiffable end UInt) (AutoDiffable m (UTuple (UReal (UArray UInt)))))) + (((fdrt Void) (fdname f) (fdsuffix FnPlain) + (fdargs ((AutoDiffable x (UTuple (UMatrix UMatrix))))) (fdbody (((pattern (Block (((pattern - (Return + (NRFunApp (CompilerInternal FnPrint) (((pattern - (FunApp (StanLib Times__ FnPlain AoS) - (((pattern - (FunApp (StanLib sum FnPlain AoS) - (((pattern (Var y_slice)) - (meta - ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) - ((pattern - (TupleProjection - ((pattern (Var m)) - (meta - ((type_ (UTuple (UReal (UArray UInt)))) (loc ) - (adlevel (TupleAD (AutoDiffable DataOnly)))))) - 1)) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) - (meta ))))) - (meta )))) - (fdloc )))) - (input_vars - ((N - ((begin_loc ((filename tuple_hof.stan) (line_num 8) (col_num 2) (included_from ()))) - (end_loc ((filename tuple_hof.stan) (line_num 8) (col_num 8) (included_from ())))) - SInt) - (data_y + (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 )) + ((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 20) (col_num 2) (included_from ()))) + (end_loc + ((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 21) (col_num 2) (included_from ()))) + (end_loc + ((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 + (((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 )) + ((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 + (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 )) + ((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 + (((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 )) + ((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 + (((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 27) (col_num 2) (included_from ()))) + (end_loc + ((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)))) + ((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 27) (col_num 2) (included_from ()))) + (end_loc + ((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)))) + ((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) + (fdargs + ((AutoDiffable y_slice (UArray UReal)) (AutoDiffable start UInt) + (AutoDiffable end UInt) (AutoDiffable m (UTuple (UReal (UArray UInt)))))) + (fdbody + (((pattern + (Block + (((pattern + (Return + (((pattern + (FunApp (StanLib Times__ FnPlain AoS) + (((pattern + (FunApp (StanLib sum FnPlain AoS) + (((pattern (Var y_slice)) + (meta + ((type_ (UArray UReal)) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable)))) + ((pattern + (TupleProjection + ((pattern (Var m)) + (meta + ((type_ (UTuple (UReal (UArray UInt)))) (loc ) + (adlevel (TupleAD (AutoDiffable DataOnly)))))) + 1)) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ((type_ UReal) (loc ) (adlevel AutoDiffable))))))) + (meta ))))) + (meta )))) + (fdloc )))) + (input_vars + ((N + ((begin_loc ((filename tuple_hof.stan) (line_num 8) (col_num 2) (included_from ()))) + (end_loc ((filename tuple_hof.stan) (line_num 8) (col_num 8) (included_from ())))) + SInt) + (data_y ((begin_loc ((filename tuple_hof.stan) (line_num 9) (col_num 2) (included_from ()))) (end_loc ((filename tuple_hof.stan) (line_num 9) (col_num 23) (included_from ())))) (SArray SReal @@ -18981,6 +20459,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-dataonly.stan b/test/integration/good/tuples/tuple-dataonly.stan index 9388f11225..b431906f78 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)}); } diff --git a/test/integration/good/tuples/tuple-dataonly2.stan b/test/integration/good/tuples/tuple-dataonly2.stan new file mode 100644 index 0000000000..d275bd4896 --- /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_copying.stan b/test/integration/good/tuples/tuple_copying.stan new file mode 100644 index 0000000000..6c39f5d46b --- /dev/null +++ b/test/integration/good/tuples/tuple_copying.stan @@ -0,0 +1,45 @@ +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); + } + + 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; +} +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)); + + // 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))); +} diff --git a/test/integration/good/tuples/tuple_lpdf2.stan b/test/integration/good/tuples/tuple_lpdf2.stan new file mode 100644 index 0000000000..8e209fff53 --- /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(); +}