1#ifndef STAN_MATH_OPENCL_PRIM_CONSTRAINT_LB_CONSTRAIN_HPP
2#define STAN_MATH_OPENCL_PRIM_CONSTRAINT_LB_CONSTRAIN_HPP
29template <
typename T,
typename L,
30 require_all_kernel_expressions_and_none_scalar_t<T>* =
nullptr,
31 require_all_kernel_expressions_t<L>* =
nullptr>
34 [](
auto& x_,
auto& lb_) {
37 std::forward<T>(x), std::forward<L>(lb));
57template <
typename T,
typename L,
65 auto res_expr =
select(lb_inf, x, lb +
exp(x));
Represents an arithmetic matrix on the OpenCL device.
auto sum_2d(T &&a)
Two dimensional sum - reduction of a kernel generator expression.
auto make_holder_cl(const T &func, Args &&... args)
Constructs an expression from given arguments using given functor.
select_< as_operation_cl_t< T_condition >, as_operation_cl_t< T_then >, as_operation_cl_t< T_else > > select(T_condition &&condition, T_then &&then, T_else &&els)
Selection operation on kernel generator expressions.
results_cl< T_results... > results(T_results &&... results)
Deduces types for constructing results_cl object.
require_all_t< is_kernel_expression< Types >... > require_all_kernel_expressions_t
Enables a template if all given types are are a valid kernel generator expressions.
expressions_cl< T_expressions... > expressions(T_expressions &&... expressions)
Deduces types for constructing expressions_cl object.
require_all_t< is_kernel_expression_and_not_scalar< Types >... > require_all_kernel_expressions_and_none_scalar_t
Enables a template if all given types are non-scalar types that are a valid kernel generator expressi...
auto from_matrix_cl(const T &src)
Copies the source matrix that is stored on the OpenCL device to the destination Eigen matrix.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
static constexpr double NEGATIVE_INFTY
Negative infinity.
auto lb_constrain(T &&x, L &&lb)
Return the lower-bounded value for the specified unconstrained input and specified lower bound.
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
fvar< T > exp(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...