Automatic Differentiation
 
Loading...
Searching...
No Matches
rep_array.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_REP_ARRAY_HPP
2#define STAN_MATH_OPENCL_PRIM_REP_ARRAY_HPP
3#ifdef STAN_OPENCL
4
9
10namespace stan {
11namespace math {
12
27template <
28 typename T,
30 is_matrix_cl<T>,
31 math::conjunction<is_var<T>, is_matrix_cl<value_type_t<T>>>>* = nullptr>
32auto rep_array(const scalar_type_t<T>& x, int n) {
33 return rep_matrix<T>(x, n, 1);
34}
35
36} // namespace math
37} // namespace stan
38
39#endif
40#endif
auto rep_array(const scalar_type_t< T > &x, int n)
Creates a matrix_cl representing an array by replicating the input value.
Definition rep_array.hpp:32
std::enable_if_t< math::disjunction< Checks... >::value > require_any_t
If any condition is true, template is enabled.
typename scalar_type< T >::type scalar_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...