Automatic Differentiation
 
Loading...
Searching...
No Matches
sd.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_SD_HPP
2#define STAN_MATH_OPENCL_PRIM_SD_HPP
3#ifdef STAN_OPENCL
10
11namespace stan {
12namespace math {
13
24template <typename T,
25 require_all_kernel_expressions_and_none_scalar_t<T>* = nullptr>
26inline double sd(const T& a) {
27 return sqrt(variance(a));
28}
29
30} // namespace math
31} // namespace stan
32
33#endif
34#endif
double variance(const T &a)
Return the sample variance of the var_value matrix Raise domain error if size is not greater than zer...
Definition variance.hpp:25
fvar< T > sqrt(const fvar< T > &x)
Definition sqrt.hpp:17
double sd(const T &a)
Returns the unbiased sample standard deviation of the coefficients in the specified std vector,...
Definition sd.hpp:26
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9