cov.triangularView<Eigen::StrictlyLower>() = cov.transpose(); //line B
return cov * (1.0/(points.cols()-1.0)); }
int main(){return 0;}
In particular, on lines A&B the compiler complains of "expected primary-_expression_ before ')' token". If the function isn't templated it compiles (and works). In MSC, it works. It looks like specifying a template argument here breaks something - anyone know of a workaround? I tried using a templated class with a static function, but that fails equally.
Now, even when this works, it's a lot slower than without triangularView, which is odd. At first I thought that's because I can't mix .noalias and triangularView, but as far as I can tell, line A is using a lazy product despite possible aliasing (isn't that a bug?) so the perf degredation may simply be due to the greater code complexity.