Automatic Differentiation
 
Loading...
Searching...
No Matches
sub_row.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_SUB_ROW_HPP
2#define STAN_MATH_OPENCL_PRIM_SUB_ROW_HPP
3#ifdef STAN_OPENCL
4
7
8namespace stan {
9namespace math {
10
21template <typename T_x,
22 typename = require_nonscalar_prim_or_rev_kernel_expression_t<T_x>>
23inline auto sub_row(T_x&& x, size_t i, size_t j, size_t ncols) {
24 return block(std::forward<T_x>(x), i, j, 1, ncols);
25}
26} // namespace math
27} // namespace stan
28#endif
29#endif
auto sub_row(T_x &&x, size_t i, size_t j, size_t ncols)
Return a 1 x ncols subrow starting at (i-1, j-1).
Definition sub_row.hpp:23
auto block(T_x &&x, size_t i, size_t j, size_t nrows, size_t ncols)
Return a nrows x ncols submatrix starting at (i-1, j-1).
Definition block.hpp:24
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9