Automatic Differentiation
 
Loading...
Searching...
No Matches
Phi_approx.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_PHI_APPROX_HPP
2#define STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_PHI_APPROX_HPP
3#ifdef STAN_OPENCL
4
6#include <string>
7
8namespace stan {
9namespace math {
10namespace opencl_kernels {
11// \cond
12static constexpr const char* phi_approx_device_function
13 = "\n"
14 "#ifndef STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_PHI_APPROX\n"
15 "#define "
16 "STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_PHI_APPROX\n" STRINGIFY(
17 // \endcond
24 inline double Phi_approx(double x) {
25 return inv_logit(0.07056 * pow(x, 3.0) + 1.5976 * x);
26 }
27 // \cond
28 ) "\n#endif\n"; // NOLINT
29// \endcond
30} // namespace opencl_kernels
31} // namespace math
32} // namespace stan
33
34#endif
35#endif
double Phi_approx(double x)
Return the Phi_approx function applied to the specified argument.
double inv_logit(double x)
Returns the inverse logit function applied to the kernel generator expression.
Definition inv_logit.hpp:57
fvar< T > pow(const fvar< T > &x1, const fvar< T > &x2)
Definition pow.hpp:19
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
#define STRINGIFY(...)
Definition stringify.hpp:9