1#ifndef STAN_MATH_OPENCL_PRIM_CONSTRAINT_OFFSET_MULTIPLIER_CONSTRAIN_HPP
2#define STAN_MATH_OPENCL_PRIM_CONSTRAINT_OFFSET_MULTIPLIER_CONSTRAIN_HPP
35template <
typename T,
typename M,
typename S,
36 require_all_kernel_expressions_t<T, M, S>* =
nullptr,
37 require_any_not_stan_scalar_t<T, M, S>* =
nullptr>
41 const char* function =
"offset_multiplier_constrain(OpenCL)";
44 auto check_mu =
check_cl(function,
"offset", mu,
"finite");
45 auto check_sigma =
check_cl(function,
"multiplier", sigma,
"positive finite");
76template <
typename T,
typename M,
typename S,
82 const char* function =
"offset_multiplier_constrain(OpenCL)";
85 auto check_mu =
check_cl(function,
"offset", mu,
"finite");
86 auto check_sigma =
check_cl(function,
"multiplier", sigma,
"positive finite");
89 results(check_mu, check_sigma, res, lp_inc)
Represents an arithmetic matrix on the OpenCL device.
elt_multiply_< as_operation_cl_t< T_a >, as_operation_cl_t< T_b > > elt_multiply(T_a &&a, T_b &&b)
isfinite_< as_operation_cl_t< T > > isfinite(T &&a)
auto sum_2d(T &&a)
Two dimensional sum - reduction of a kernel generator expression.
auto check_cl(const char *function, const char *var_name, T &&y, const char *must_be)
Constructs a check on opencl matrix or expression.
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.
auto from_matrix_cl(const T &src)
Copies the source matrix that is stored on the OpenCL device to the destination Eigen matrix.
require_any_not_t< is_stan_scalar< std::decay_t< Types > >... > require_any_not_stan_scalar_t
Require at least one of the types do not satisfy is_stan_scalar.
fvar< T > log(const fvar< T > &x)
void check_consistent_sizes(const char *)
Trivial no input case, this function is a no-op.
auto offset_multiplier_constrain(const T &x, const M &mu, const S &sigma)
Return the linearly transformed value for the specified unconstrained input and specified offset and ...
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...