Hi,
I guess you are referring to coefficient-wise expressions like A+diag(v). The difficulty is that for performance reasons, it is crucial to separate the dense part from the diagonal part so that we can evaluate the dense part at once and then add/subtract the diagonal part. For instance, if you have:
C = A + diag(v) - 2*B - 3*diag(w)
we would have to rewrite the _expression_ as:
C = (A- 2*B) + diag(v-3*w)
to then be able to optimally evaluate it in two steps as:
C = A- 2*B
diag(C) += v-3*w
This is not possible in Eigen 3.2, and in Eigen 3.3, doing the last step is straightforward. Rewriting the _expression_ is also doable (to some extent), but at the cost of significant compilation times.
Could you provide a typical example of the expressions you want to assemble?
gael