* remove EIGEN_DONT_INLINE that harm performance for small sizes

* normalize left Jacobi rotations to avoid having to swap rows
* set precision to 2*machine_epsilon instead of machine_epsilon, we lose 1 bit of precision
  but gain between 10% and 100% speed, plus reduce the risk that some day we hit a bad matrix
  where it's impossible to approach machine precision
This commit is contained in:
Benoit Jacob
2009-08-13 14:56:39 -04:00
parent 76a3089a43
commit f2536416da
3 changed files with 20 additions and 15 deletions

View File

@@ -50,7 +50,7 @@ void ei_apply_rotation_in_the_plane(VectorX& x, VectorY& y, typename VectorX::Sc
template<typename Scalar>
struct ei_apply_rotation_in_the_plane_selector<Scalar,Dynamic>
{
static EIGEN_DONT_INLINE void run(Scalar* x, Scalar* y, int size, Scalar c, Scalar s, int incrx, int incry)
static void run(Scalar* x, Scalar* y, int size, Scalar c, Scalar s, int incrx, int incry)
{
for(int i=0; i<size; ++i)
{
@@ -68,7 +68,7 @@ struct ei_apply_rotation_in_the_plane_selector<Scalar,Dynamic>
template<typename Scalar>
struct ei_apply_rotation_in_the_plane_selector<Scalar,1>
{
static EIGEN_DONT_INLINE void run(Scalar* x, Scalar* y, int size, Scalar c, Scalar s, int, int)
static void run(Scalar* x, Scalar* y, int size, Scalar c, Scalar s, int, int)
{
typedef typename ei_packet_traits<Scalar>::type Packet;
enum { PacketSize = ei_packet_traits<Scalar>::size, Peeling = 2 };