# Linear functions of matrix exponential

Given a matrix $A$ and a vector $v$, I'm aware there are efficient algorithms for computing $e^Av$, where efficient means significantly faster than computing $e^A$ and multiplying by $v$. For a diagonal matrix $D$, is there a similarly efficient algorithm to compute $$e^A \cdot D = \sum_i (e^A)_{ii} D_{ii}?$$ In particular, is there an efficient way to compute the trace of the exponential?