matrix exponential function

concurrent and serial implementation
This is not the correct measure of the number of elements in the matrix. A matrix may have a stride which is longer than the number of columns (for example, because it is a View of another matrix). This function should not modify those other elements.