3 ms·
In C++, Eigen comes pretty close to this interface for defining vectors and matrices and mixing size-at-compile-time and dynamically sized quantities. And then,
by cpgxiii 3y ago
In C++, Eigen comes pretty close to this interface for defining vectors and matrices and mixing size-at-compile-time and dynamically sized quantities. And then, given the size of the vectors/matrices being used, dispatching the appropriate SIMD implementation.
- panzi 3y agoYou can do all except for the specialization in Rust for matrix + vector. You can do more in Rust about re-using temporaries (when one parameter to Add/Mul/... is a move). But you can't do arbitrary dimensional tensors or specialization for certain sizes in Rust. Also: Didn't know Eigen has tensor support now. I'm not actually very into this stuff, just recently played around what is possible in Rust in that context (and ran into compiler bugs in nightly).