Automatic Differentiation
 
Loading...
Searching...
No Matches
eval.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_EVAL_HPP
2#define STAN_MATH_PRIM_FUN_EVAL_HPP
3
6
7namespace stan {
8namespace math {
9
18template <typename T,
19 require_same_t<std::decay_t<T>, plain_type_t<T>>* = nullptr>
20inline T eval(T&& arg) {
21 return std::forward<T>(arg);
22}
23
32template <typename T,
34inline decltype(auto) eval(const T& arg) {
35 return arg.eval();
36}
37
38} // namespace math
39} // namespace stan
40
41#endif
require_not_t< std::is_same< std::decay_t< T >, std::decay_t< S > > > require_not_same_t
Require types T and S does not satisfy std::is_same.
fvar< T > arg(const std::complex< fvar< T > > &z)
Return the phase angle of the complex argument.
Definition arg.hpp:19
T eval(T &&arg)
Inputs which have a plain_type equal to the own time are forwarded unmodified (for Eigen expressions ...
Definition eval.hpp:20
typename plain_type< T >::type plain_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9