Stan Math Library
4.9.0
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
5
#include <
stan/math/opencl/stringify.hpp
>
6
#include <string>
7
8
namespace
stan
{
9
namespace
math {
10
namespace
opencl_kernels {
11
12
// \cond
13
static
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
stan::math::opencl_kernels::inv_square
double inv_square(double x)
Calculates 1 / (x*x)
Definition
inv_square.hpp:28
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
STRINGIFY
#define STRINGIFY(...)
Definition
stringify.hpp:9
stringify.hpp
stan
math
opencl
kernels
device_functions
inv_square.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.