Automatic Differentiation
 
Loading...
Searching...
No Matches
block.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_REV_BLOCK_HPP
2#define STAN_MATH_OPENCL_REV_BLOCK_HPP
3#ifdef STAN_OPENCL
4
9
10namespace stan {
11namespace math {
12
24template <typename T,
25 require_all_nonscalar_prim_or_rev_kernel_expression_t<T>* = nullptr,
26 require_any_var_t<T>* = nullptr>
27inline auto block(const T& m, size_t i, size_t j, size_t nrows, size_t ncols) {
28 return m.block(i - 1, j - 1, nrows, ncols);
29}
30
31} // namespace math
32} // namespace stan
33
34#endif
35#endif
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 ...