![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
| #define ADD_BINARY_OPERATION_WITH_CUSTOM_CODE | ( | class_name, | |
| function_name, | |||
| scalar_type_expr, | |||
| operation, | |||
| ... | |||
| ) |
Defines a new binary operation in kernel generator that needs to implement custom function that determines the view of the result.
| class_name | The name of the class this macro will define to represent this operation |
| function_name | The name of the function this macro will define that will be used to create this operation. |
| scalar_type_expr | The type of the scalar in the result of this operation. Can be a C++ expression that uses T_a and T_b as types of the scalars in the arguments to this operation. |
| operation | String containing operator that is used to implement this operation in kernel. Should be a valid infix operator in OpenCL C. |
| ... | Code that implements body of the .view() member function of the class that represents this expression. Should return an object of type matrix_cl_view. Can use base::arguments_ to access arguments to this expression. This is a variadic argument to allow commas in code with no special handling. |
Definition at line 154 of file binary_operation.hpp.