C++ templates: choice between static and dynamic allocations (a la Eigen)

75 Views Asked by At

Eigen, the linear algebra library written in C++, uses a clever technique: template parameters (for example the dimensions of a matrix) that are not known at compile time can take the special value Dynamic, which means that run-time values will be expected. See here: https://eigen.tuxfamily.org/dox/group__TutorialMatrixClass.html#title2 How standard is this technique in C++? Did the Eigen team come up with it or borrow the idea from another project? I'm working on a C++ solver for nonconvex optimization and I'm thinking about borrowing it. Thanks, Charlie

0

There are 0 best solutions below