Stan Math Library
4.9.0
Automatic Differentiation
|
Represents results that will be calculated in same kernel.
T_results | types of results |
Definition at line 299 of file multi_result_kernel.hpp.
#include <multi_result_kernel.hpp>
Public Member Functions | |
results_cl (T_results &&... results) | |
Constructor. | |
template<typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
void | operator= (const expressions_cl< T_expressions... > &exprs) |
Assigning expressions_cl object to results_ object generates and executes the kernel that evaluates expressions and stores them into result expressions this object contains. | |
template<assign_op_cl AssignOp = assign_op_cl::plus_equals, typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
void | compound_assignment_impl (const expressions_cl< T_expressions... > &exprs) |
Incrementing results_ object by expressions_cl object executes the kernel that evaluates expressions and increments results by those expressions. | |
template<typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
void | operator+= (const expressions_cl< T_expressions... > &exprs) |
Incrementing results_ object by expressions_cl object executes the kernel that evaluates expressions and increments results by those expressions. | |
template<typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
void | operator-= (const expressions_cl< T_expressions... > &exprs) |
Decrement results_ object by expressions_cl object executes the kernel that evaluates expressions and increments results by those expressions. | |
template<typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
void | operator/= (const expressions_cl< T_expressions... > &exprs) |
Elementwise divide results_ object by expressions_cl object executes the kernel that evaluates expressions and increments results by those expressions. | |
template<typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
void | operator*= (const expressions_cl< T_expressions... > &exprs) |
Elementwise multiply results_ object by expressions_cl object executes the kernel that evaluates expressions and increments results by those expressions. | |
template<typename... T_expressions, typename = std::enable_if_t<sizeof...(T_results) == sizeof...(T_expressions)>> | |
std::string | get_kernel_source_for_evaluating (const expressions_cl< T_expressions... > &exprs) |
Generates kernel source for evaluating given expressions into results held by this . | |
Static Protected Member Functions | |
template<typename... T_res, typename... T_expressions> | |
static std::string | get_kernel_source_impl (const std::tuple< std::pair< T_res, T_expressions >... > &assignment_pairs) |
Implementation of kernel source generation. | |
template<typename... T_res, typename... T_expressions> | |
static void | assignment_impl (const std::tuple< std::pair< T_res, T_expressions >... > &assignment_pairs) |
Implementation of assignments of expressions to results. | |
static void | assignment_impl (const std::tuple<> &) |
Implementation of assignments of no expressions to no results. | |
template<assign_op_cl AssignOp = assign_op_cl::equals, typename T_result , typename T_expression , require_all_not_t< is_without_output< T_expression >, conjunction< internal::is_scalar_check< T_result >, std::is_arithmetic< std::decay_t< T_expression > > > > * = nullptr> | |
static auto | make_assignment_pair (T_result &&result, T_expression &&expression) |
Makes a std::pair of one result and one expression and wraps it into a tuple. | |
template<assign_op_cl AssignOp = assign_op_cl::equals, typename T_result , typename T_expression , require_t< is_without_output< T_expression > > * = nullptr> | |
static auto | make_assignment_pair (T_result &&result, T_expression &&expression) |
If an expression does not need to be calculated this returns an empty tuple. | |
template<assign_op_cl AssignOp = assign_op_cl::equals, typename T_check , typename T_pass , require_t< internal::is_scalar_check< T_check > > * = nullptr, require_integral_t< T_pass > * = nullptr> | |
static std::tuple | make_assignment_pair (T_check &&result, T_pass &&pass) |
Checks on scalars are done separately in this overload instead of in kernel. | |
Protected Attributes | |
std::tuple< T_results... > | results_ |