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
I've ended up with a ridiculously gnarly function signature due to a ton of trait bounds being required to support some simple operations I want to make on generic-dimension static matrices. Specifically, I want to remove rows and columns while being able to add and reallocate (snippet below). Surely there's an easier way to do this that I've completely missed? Any help would be hugely appreciated!
@Ralith No larger than 10x10, but this is going to be in the critical path of some code that needs to be highly performant. For a ballpark, I'd estimate this would be the core of a QP solver that would need to allocate all these vectors somewhere between 1000 and 100,000 of times per second.
I can't specifically help with the generics here, but bear in mind that copying 800 byte structures all over the stack is not necessarily going to be the optimal strategy. Perhaps there's a way you could reuse dynamically allocated storage?
I've ended up with a ridiculously gnarly function signature due to a ton of trait bounds being required to support some simple operations I want to make on generic-dimension static matrices. Specifically, I want to remove rows and columns while being able to add and reallocate (snippet below). Surely there's an easier way to do this that I've completely missed? Any help would be hugely appreciated!
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2718224f6cb54b60c95e378be8a0d2cd
The text was updated successfully, but these errors were encountered: