Automatic Differentiation
 
Loading...
Searching...
No Matches
as_column_vector_or_scalar.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUN_AS_COLUMN_VECTOR_OR_SCALAR_HPP
2#define STAN_MATH_REV_FUN_AS_COLUMN_VECTOR_OR_SCALAR_HPP
3
6
7namespace stan {
8namespace math {
9
18template <typename T, require_var_col_vector_t<T>* = nullptr>
19inline auto as_column_vector_or_scalar(T&& a) {
20 return std::forward<T>(a);
21}
22
30template <typename T, require_var_row_vector_t<T>* = nullptr,
31 require_not_var_col_vector_t<T>* = nullptr>
32inline auto as_column_vector_or_scalar(T&& a) {
33 return a.transpose();
34}
35
36} // namespace math
37} // namespace stan
38
39#endif
auto as_column_vector_or_scalar(T &&a)
as_column_vector_or_scalar of a kernel generator expression.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...