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
Currently, we have many functions named _bulid_*. These functions create a block of matrix needed for formulating sparse/dense LQ dynamic problems. However, creating arrays in these functions can later cause issue when we want to extend these to GPU arrays. I suggest doing the following.
All the arrays are created in _build_sparse_lq_dynamic_model and _build_dense_lq_dynamic_model. For the rest of _build_* functions, we create the array in _build_*_lq_dynamic_model, and only update its entries in _set_*!. Ideally, each _set_*! functions should be non-allocating.
The text was updated successfully, but these errors were encountered:
@sshin23 In the case of some functions (like _build_H_blocks), I initialize arrays for mul! and axpy!. Is there a way to avoid this memory allocation without defining the arrays outside of the function?
Currently, we have many functions named
_bulid_*
. These functions create a block of matrix needed for formulating sparse/dense LQ dynamic problems. However, creating arrays in these functions can later cause issue when we want to extend these to GPU arrays. I suggest doing the following.All the arrays are created in
_build_sparse_lq_dynamic_model
and_build_dense_lq_dynamic_model
. For the rest of_build_*
functions, we create the array in_build_*_lq_dynamic_model
, and only update its entries in_set_*!
. Ideally, each_set_*!
functions should be non-allocating.The text was updated successfully, but these errors were encountered: