1 #ifndef STAN_MATH_REV_FUN_PRIMITIVE_VALUE_HPP 2 #define STAN_MATH_REV_FUN_PRIMITIVE_VALUE_HPP 3 4 #include <stan/math/rev/meta.hpp> 5 #include <stan/math/rev/core.hpp> 6 #include <stan/math/prim/fun/primitive_value.hpp> 7 8 namespace stan { 9 namespace math { 10 11 /** 12 * Return the primitive double value for the specified autodiff 13 * variable. 14 * 15 * @param v input variable. 16 * @return value of input. 17 */ primitive_value(const var & v)18inline double primitive_value(const var& v) { return v.val(); } 19 20 } // namespace math 21 } // namespace stan 22 #endif 23