3 ms·
C++ / Eigen performs a lot of optimizations that you might expect from a Fortran compiler. For example, it ability to broadcast and perform reductions is pretty
by waynecochran 3y ago
C++ / Eigen performs a lot of optimizations that you might expect from a Fortran compiler. For example, it ability to broadcast and perform reductions is pretty slick, e.g.:
X.noalias() = (A - B).colwise().squaredNorm().mean();
Short of having tensor cores, this does a good job of static optimization for underlying vectorization support.