
3.41.0

Enumeration class of all matrix chain multiplication methods available to multiply a Faust to a matrix or to compute Faust.toarray(). More...
Static Public Attributes  
int  DEFAULT_L2R = 0 
The default method, it computes the product from the right to the left. More...  
int  DYNPROG = 5 
This method implements the classic dynamic programming solution to the chain matrix problem. More...  
int  TORCH_CPU_L2R = 8 
This method computes the product of the matrix chain from the left to the right using the Torch C++ library (CPU backend). More...  
int  TORCH_CPU_GREEDY = 9 
This method is implemented using the Torch library and follows a greedy principle: it chooses to multiply the less costly product of two matrices at each step of the whole product computation. More...  
int  TORCH_CPU_DENSE_DYNPROG_SPARSE_L2R = 10 
The same as TORCH_CPU_L2R except that torch::chain_matmul is used to compute in one call the intermediary product of dense contiguous factors, then the result is multiplied by sparse factors if any remains. More...  
Enumeration class of all matrix chain multiplication methods available to multiply a Faust to a matrix or to compute Faust.toarray().
These methods are used by Faust.optimize_time().
Examples

static 
The default method, it computes the product from the right to the left.

static 
This method implements the classic dynamic programming solution to the chain matrix problem.
See https://en.wikipedia.org/wiki/Matrix_chain_multiplication#A_dynamic_programming_algorithm. Note that the standard method is extended in order to take into account the complexity of multiplications including a sparse matrix (because that's not the same cost than multiplying dense matrices).

static 
The same as TORCH_CPU_L2R except that torch::chain_matmul is used to compute in one call the intermediary product of dense contiguous factors, then the result is multiplied by sparse factors if any remains.
torch::chain_matmul follows the dynamic programming principle as DYNPROG method does (but the former handles only dense matrices).
References: https://pytorch.org/cppdocs/api/function_namespaceat_1aee491a9ff453b6033b4106516bc61a9d.html?highlight=chain_matmul https://pytorch.org/docs/stable/generated/torch.chain_matmul.html?highlight=chain_matmul#torch.chain_matmul This method is only available for the specific packages pyfaust_torch.

static 
This method is implemented using the Torch library and follows a greedy principle: it chooses to multiply the less costly product of two matrices at each step of the whole product computation.
The computational cost depends on the matrix dimensions and the number of nonzeros (when a matrix is in sparse format). This method is only available for the specific packages pyfaust_torch.

static 
This method computes the product of the matrix chain from the left to the right using the Torch C++ library (CPU backend).
This method is only available for the specific packages pyfaust_torch.