template<typename T, bool Colwise, bool Rowwise>
class stan::math::optional_broadcast_< T, Colwise, Rowwise >
Represents an optional broadcasting operation in kernel generator expressions.
- Template Parameters
-
T | type of argument |
Colwise | whether to broadcast colwise |
Rowwise | whether to broadcast rowwise |
Definition at line 28 of file optional_broadcast.hpp.
|
| optional_broadcast_ (T &&a) |
| Constructor.
|
|
auto | deep_copy () const |
| Creates a deep copy of this expression.
|
|
kernel_parts | generate (const std::string &row_idx_name, const std::string &col_idx_name, const bool view_handled, const std::string &var_name_arg) const |
| Generates kernel code for this and nested expressions.
|
|
void | modify_argument_indices (std::string &row_idx_name, std::string &col_idx_name) const |
| Sets index/indices along broadcasted dimmension(s) to 0.
|
|
void | set_args (std::unordered_map< const void *, const char * > &generated, std::unordered_map< const void *, const char * > &generated_all, cl::Kernel &kernel, int &arg_num) const |
| Sets kernel arguments for this and nested expressions.
|
|
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.
|
|
matrix_cl_view | view () const |
| View of a matrix that would be the result of evaluating this expression.
|
|
int | bottom_diagonal () const |
| Determine index of bottom diagonal written.
|
|
int | top_diagonal () const |
| Determine index of top diagonal written.
|
|
optional_broadcast_< T, Colwise, Rowwise > & | derived () |
| Casts the instance into its derived type.
|
|
const optional_broadcast_< T, Colwise, Rowwise > & | derived () const |
| Casts the instance into its derived type.
|
|
const auto & | get_arg () const |
| Returns an argument to this operation.
|
|
matrix_cl< std::remove_reference_t< T >::Scalar > | eval () const |
| Evaluates the expression.
|
|
void | evaluate_into (T_lhs &lhs) const |
| Evaluates this expression into given left-hand-side expression.
|
|
std::string | get_kernel_source_for_evaluating_into (const T_lhs &lhs) const |
| Generates kernel source for evaluating this expression into given left-hand-side expression.
|
|
kernel_parts | get_whole_kernel_parts (std::unordered_map< const void *, const char * > &generated, std::unordered_map< const void *, const char * > &generated_all, name_generator &ng, const std::string &row_index_name, const std::string &col_index_name, const T_result &result) const |
| Generates kernel code for assigning this expression into result expression.
|
|
kernel_parts | get_kernel_parts (std::unordered_map< const void *, const char * > &generated, std::unordered_map< const void *, const char * > &generated_all, name_generator &name_gen, const std::string &row_index_name, const std::string &col_index_name, bool view_handled) const |
| Generates kernel code for this and nested expressions.
|
|
void | add_read_event (cl::Event &e) const |
| Adds read event to any matrices used by nested expressions.
|
|
void | get_write_events (std::vector< cl::Event > &events) const |
| Adds all write events on any matrices used by nested expressions to a list.
|
|
int | size () const |
| Size of a matrix that would be the result of evaluating this expression.
|
|
int | thread_rows () const |
| Number of rows threads need to be launched for.
|
|
int | thread_cols () const |
| Number of columns threads need to be launched for.
|
|
std::pair< int, int > | extreme_diagonals () const |
| Determine indices of extreme sub- and superdiagonals written.
|
|
void | get_unique_matrix_accesses (std::vector< int > &uids, std::unordered_map< const void *, int > &id_map, int &next_id) const |
| Collects data that is needed beside types to uniqly identify a kernel generator expression.
|
|