Automatic Differentiation
 
Loading...
Searching...
No Matches
inv_square.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_INV_SQUARE_HPP
2#define STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_INV_SQUARE_HPP
3#ifdef STAN_OPENCL
4
6#include <string>
7
8namespace stan {
9namespace math {
10namespace opencl_kernels {
11
12// \cond
13static constexpr const char* inv_square_device_function
14 = "\n"
15 "#ifndef STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_INV_SQUARE\n"
16 "#define "
17 "STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_INV_SQUARE\n" STRINGIFY(
18 // \endcond
28 double inv_square(double x) { return 1.0 / (x * x); }
29 // \cond
30 ) "\n#endif\n"; // NOLINT
31// \endcond
32
33} // namespace opencl_kernels
34} // namespace math
35} // namespace stan
36
37#endif
38#endif
double inv_square(double x)
Calculates 1 / (x*x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
#define STRINGIFY(...)
Definition stringify.hpp:9