Automatic Differentiation
 
Loading...
Searching...
No Matches
inv.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_FUN_INV_SQUARE_HPP
2#define STAN_MATH_OPENCL_PRIM_FUN_INV_SQUARE_HPP
3#ifdef STAN_OPENCL
7
8namespace stan {
9namespace math {
10
19template <typename T_x,
20 typename = require_all_kernel_expressions_and_none_scalar_t<T_x>>
21inline auto inv(T_x&& x) { // NOLINT
22 return elt_divide(1.0, std::forward<T_x>(x));
23}
24} // namespace math
25} // namespace stan
26
27#endif
28#endif
elt_divide_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > elt_divide(T_a &&a, T_b &&b)
fvar< T > inv(const fvar< T > &x)
Definition inv.hpp:12
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...