Returns the logarithm of the cumulative summation of the exponentiation of
elements of input in the dimension dim.
For summation index \(j\) given by dim and other indices \(i\), the result is
$$
\mbox{logcumsumexp}(x)_{ij} = \log \sum\limits_{j=0}^{i} \exp(x_{ij})
$$