Skip to content
Joris Gillis edited this page Apr 4, 2023 · 2 revisions

Standard documentation for mac:

 Multiply-accumulate operation.

::

 mac(Sparsity X, Sparsity Y, Sparsity Z) -> Sparsity
 mac(DM X, DM Y, DM Z) -> DM
 mac(SX X, SX Y, SX Z) -> SX
 mac(MX X, MX Y, MX Z) -> MX

Matrix product of two matrices (x and y), adding the result to a third

matrix z. The result has the same sparsity pattern as C meaning that other entries of (x*y) are ignored. The operation is equivalent to:

z+mtimes(x,y).project(z.sparsity()).

Extra doc: https://github.com/casadi/casadi/wiki/L_3x

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity_interface.hpp#L321

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity_interface.hpp#L321-L323

Extra documentation

To edit, see writing tips.

Clone this wiki locally