1#ifndef STAN_MATH_OPENCL_KERNEL_GENERATOR_INDEX_HPP
2#define STAN_MATH_OPENCL_KERNEL_GENERATOR_INDEX_HPP
47 const std::string& col_index_name,
48 const bool view_handled)
const {
50 res.
body =
"int " +
var_name_ +
" = " + row_index_name +
";\n";
73 return {std::numeric_limits<int>::min(), std::numeric_limits<int>::max()};
110 const std::string& col_index_name,
111 const bool view_handled)
const {
113 res.
body =
"int " +
var_name_ +
" = " + col_index_name +
";\n";
136 return {std::numeric_limits<int>::min(), std::numeric_limits<int>::max()};
kernel_parts generate(const std::string &row_index_name, const std::string &col_index_name, const bool view_handled) const
Generates kernel code for this expression.
int cols() const
Number of columns of a matrix that would be the result of evaluating this expression.
col_index(int rows=base::dynamic, int cols=base::dynamic)
Constructor for given number of rows and columns.
std::pair< int, int > extreme_diagonals() const
Determine indices of extreme sub- and superdiagonals written.
col_index deep_copy() const
Creates a deep copy of this expression.
int rows() const
Number of rows of a matrix that would be the result of evaluating this expression.
Represents operation that determines column index.
static constexpr int dynamic
Base for all kernel generator operations.
row_index deep_copy() const
Creates a deep copy of this expression.
int rows() const
Number of rows of a matrix that would be the result of evaluating this expression.
int cols() const
Number of columns of a matrix that would be the result of evaluating this expression.
std::pair< int, int > extreme_diagonals() const
Determine indices of extreme sub- and superdiagonals written.
kernel_parts generate(const std::string &row_index_name, const std::string &col_index_name, const bool view_handled) const
Generates kernel code for this expression.
row_index(int rows=base::dynamic, int cols=base::dynamic)
Constructor for given number of rows and columns.
Represents operation that determines row index.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Parts of an OpenCL kernel, generated by an expression.