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
7namespace stan {
8namespace math {
9
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
std::string generate()
Generates a unique variable name.
Unique name generator for variables used in generated kernels.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...