kaskr / adcomp

AD computation with Template Model Builder (TMB)
Other
178 stars 81 forks source link

Eigen 3.4? #378

Closed kklot closed 1 year ago

kklot commented 1 year ago

I see mentions here about Eigen unsupported 3.4, but it seems TMB is still using RcppEigen that has not updated to Eigen 3.4 (as discussed here)

@jeffeaton I updated Eigen/unsupported to version 3.4 and can now do (without further changes):

Originally posted by @kaskr in https://github.com/kaskr/adcomp/issues/357#issuecomment-1081665534

kklot commented 1 year ago

Oh, I see the commit that updated Eigen to 3.4, but wonder why the slicing below does not work in TMB but works in cling that includes Eigen 3.4.0.

MatrixXi A = MatrixXi::Random(4,6);
cout << "Initial matrix A:\n" << A << "\n\n";
cout << "A(all,{4,2,5,5,3}):\n" << A(Eigen::placeholders::all,{4,2,5,5,3}) << "\n\n";