Stan Math Library
4.9.0
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
5
#include <
stan/math/opencl/kernel_generator.hpp
>
6
#include <
stan/math/opencl/prim/block.hpp
>
7
#include <
stan/math/prim/err.hpp
>
8
#include <
stan/math/rev/core.hpp
>
9
10
namespace
stan
{
11
namespace
math {
12
24
template
<
typename
T,
25
require_all_nonscalar_prim_or_rev_kernel_expression_t<T>* =
nullptr
,
26
require_any_var_t<T>* =
nullptr
>
27
inline
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
kernel_generator.hpp
stan::math::block
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
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
block.hpp
err.hpp
core.hpp
stan
math
opencl
rev
block.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.