1#ifndef STAN_MATH_OPENCL_PRIM_REVERSE_HPP
2#define STAN_MATH_OPENCL_PRIM_REVERSE_HPP
18template <
typename T_x,
19 require_all_kernel_expressions_and_none_scalar_t<T_x>* =
nullptr>
22 return indexing(std::forward<T_x>(x),
23 x.rows() -
row_index(x.rows(), x.cols()) - 1,
Represents operation that determines column index.
int cols() const
Number of columns of a matrix that would be the result of evaluating this expression.
Represents operation that determines row index.
auto indexing(T_mat &&mat, T_row_index &&row_index, T_col_index &&col_index)
Index a kernel generator expression using two expressions for indices.
void check_vector(const char *function, const char *name, const Mat &x)
Check the input is either a row vector or column vector or a matrix with a single row or column.
auto reverse(T_x &&x)
Return reversed view into the specified vector or row vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...