Automatic Differentiation
 
Loading...
Searching...
No Matches
block.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_PRIM_BLOCK_HPP
2#define STAN_MATH_OPENCL_PRIM_BLOCK_HPP
3#ifdef STAN_OPENCL
4
7
8namespace stan {
9namespace math {
10
22template <typename T_x,
23 typename = require_all_kernel_expressions_and_none_scalar_t<T_x>>
24inline auto block(T_x&& x, size_t i, size_t j, size_t nrows,
25 size_t ncols) { // NOLINT
26 return block_zero_based(std::forward<T_x>(x), i - 1, j - 1, nrows, ncols);
27}
28} // namespace math
29} // namespace stan
30#endif
31#endif
auto block_zero_based(T &&a, int start_row, int start_col, int rows, int cols)
Block of a kernel generator expression.
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 ...