Use DenseIndex in the MeanReducer to avoid overflows when processing very large tensors.
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/.