Stan Math Library
4.9.0
Automatic Differentiation
Loading...
Searching...
No Matches
name_generator.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_NAME_GENERATOR_HPP
2
#define STAN_MATH_OPENCL_KERNEL_GENERATOR_NAME_GENERATOR_HPP
3
#ifdef STAN_OPENCL
4
5
#include <string>
6
7
namespace
stan
{
8
namespace
math {
9
16
class
name_generator
{
17
public
:
22
inline
std::string
generate
() {
return
"var"
+ std::to_string(++
i_
); }
23
24
private
:
25
int
i_
{0};
26
};
28
}
// namespace math
29
}
// namespace stan
30
31
#endif
32
#endif
stan::math::name_generator::generate
std::string generate()
Generates a unique variable name.
Definition
name_generator.hpp:22
stan::math::name_generator::i_
int i_
Definition
name_generator.hpp:25
stan::math::name_generator
Unique name generator for variables used in generated kernels.
Definition
name_generator.hpp:16
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
fvar.hpp:9
stan
math
opencl
kernel_generator
name_generator.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.