You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since g has three multiplications they should be essentially the same CPU-time. It's because of memory allocation. Not sure we can think of recycling memory slots as the current generated code is doing since the sparsity pattern will change.
The text was updated successfully, but these errors were encountered:
Option 1: Allocate new memory for every operation. The code will be very similar to LangMatlab()-code
Option 2: Do preallocation of memslots where with the memslots have the sparsity pattern of the final matrix. This leads to extra computation (multiplications with zero) and the efficiency will be highly pattern dependent. Not sure how to compute the sparsity pattern without computing the products.
Consider
Problem 1:
eval_graph
does not work:Problem 2: Generated code does not work efficiently.
Since
g
has three multiplications they should be essentially the same CPU-time. It's because of memory allocation. Not sure we can think of recycling memory slots as the current generated code is doing since the sparsity pattern will change.The text was updated successfully, but these errors were encountered: