nvcc doesn't support std::min or std::max on GPU. Use our own custom implementation instead
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/.