Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
type_str.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_TYPE_STR_HPP
2
#define STAN_MATH_OPENCL_KERNEL_GENERATOR_TYPE_STR_HPP
3
#ifdef STAN_OPENCL
4
5
#include <string>
6
7
namespace
stan
{
8
namespace
math {
13
template
<
typename
T>
14
inline
std::string
type_str
() {
15
static_assert
(
sizeof
(T) == -1,
"Unsupported type in type_str"
);
16
return
""
;
17
}
18
19
#define ADD_TYPE_TO_TYPE_STR(t) \
20
template <> \
21
inline std::string type_str<t>() { \
22
return #t; \
23
}
24
ADD_TYPE_TO_TYPE_STR
(
double
)
25
ADD_TYPE_TO_TYPE_STR
(
int
)
26
ADD_TYPE_TO_TYPE_STR
(
char
)
27
ADD_TYPE_TO_TYPE_STR
(
bool
)
28
#undef ADD_TYPE_TO_TYPE_STR
29
}
// namespace math
30
}
// namespace stan
31
#endif
32
#endif
stan::math::type_str
std::string type_str()
Determines a string name of a type.
Definition
type_str.hpp:14
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
fvar.hpp:9
ADD_TYPE_TO_TYPE_STR
#define ADD_TYPE_TO_TYPE_STR(t)
Definition
type_str.hpp:19
stan
math
opencl
kernel_generator
type_str.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.