1#ifndef STAN_MATH_REV_CORE_MAKE_ZEROED_ARENA_HPP
2#define STAN_MATH_REV_CORE_MAKE_ZEROED_ARENA_HPP
17template <
typename Input>
19 if constexpr (is_tuple_v<Input>) {
20 return stan::math::filter_map<is_any_var_scalar>(
22 }
else if constexpr (is_std_vector_v<Input>) {
23 if constexpr (!is_var_v<value_type_t<Input>>) {
24 const auto output_size = input.size();
26 ret.reserve(output_size);
27 for (Eigen::Index i = 0; i < output_size; ++i) {
34 }
else if constexpr (is_eigen_v<Input>) {
39 return static_cast<double>(0.0);
constexpr auto make_zeroed_arena(Input &&input)
Creates an arena type that is the same type as the input and initialized with zeros.
A comparator that works for any container type that has the brackets operator.
typename plain_type< std::decay_t< T > >::type plain_type_t
typename internal::arena_type_impl< std::decay_t< T > >::type arena_t
Determines a type that can be used in place of T that does any dynamic allocations on the AD stack.
Defines a static member named value which is defined to be false as the primitive scalar types cannot...