Automatic Differentiation
 
Loading...
Searching...
No Matches
rep_vector.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_REP_VECTOR_HPP
2#define STAN_MATH_OPENCL_PRIM_REP_VECTOR_HPP
3#ifdef STAN_OPENCL
4
9
10namespace stan {
11namespace math {
26template <
27 typename T,
29 is_matrix_cl<T>,
30 math::conjunction<is_var<T>, is_matrix_cl<value_type_t<T>>>>* = nullptr>
31auto rep_vector(const scalar_type_t<T>& x, int n) {
32 return rep_matrix<T>(x, n, 1);
33}
34
35} // namespace math
36} // namespace stan
37
38#endif
39#endif
auto rep_vector(const scalar_type_t< T > &x, int n)
Creates a matrix_cl representing a vector by replicating the input value.
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 ...