1#ifndef STAN_MATH_OPENCL_PRIM_RANK_HPP
2#define STAN_MATH_OPENCL_PRIM_RANK_HPP
23 require_all_kernel_expressions_and_none_scalar_t<T>* =
nullptr>
24int rank(
const T& v,
int s) {
Represents operation that determines column index.
auto as_column_vector_or_scalar(T &&a)
as_column_vector_or_scalar of a kernel generator expression.
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.
int rank(const T &v, int s)
Return the number of components of v less than v[s].
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 sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
void check_range(const char *function, const char *name, int max, int index, int nested_level, const char *error_msg)
Check if specified index is within range.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...