Automatic Differentiation
 
Loading...
Searching...
No Matches
assignment_ops.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_ASSIGNMENT_OPS
2#define STAN_MATH_OPENCL_KERNEL_GENERATOR_ASSIGNMENT_OPS
3#ifdef STAN_OPENCL
5
6namespace stan {
7namespace math {
8
12enum class assign_op_cl {
13 equals,
18};
19
20namespace internal {
25template <assign_op_cl assign_op>
27
28template <>
30 static constexpr const char* value = " = ";
31};
32
33template <>
35 static constexpr const char* value = " += ";
36};
37
38template <>
40 static constexpr const char* value = " -= ";
41};
42
43template <>
45 static constexpr const char* value = " /= ";
46};
47
48template <>
50 static constexpr const char* value = " *= ";
51};
52
53template <typename, typename = void>
54struct assignment_op_str : assignment_op_str_impl<assign_op_cl::equals> {};
55
56template <typename T>
57struct assignment_op_str<T, void_t<decltype(T::assignment_op)>>
58 : assignment_op_str_impl<T::assignment_op> {};
59
60} // namespace internal
61
66template <typename T>
67inline constexpr const char* assignment_op() noexcept {
69}
70
71} // namespace math
72} // namespace stan
73#endif
74#endif
constexpr const char * assignment_op() noexcept
assign_op_cl
Ops that decide the type of assignment for LHS operations.
typename make_void< Ts... >::type void_t
Utility metafunction that maps a sequence of any types to the type void This metafunction is used in ...
Definition void_t.hpp:21
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9