[eigen] Problem with ei_cache_friendly_product?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi List,

I have an unhandled exception in a tiny testcase (attached).
What is going wrong?

My Eigen2-Version is:
   freshly updated to Revision 900873.

My Compiler is:
   Microsoft Visual Studio 2008
   Version 9.0.30729.1 SP
   Microsoft .NET Framework
   Version 3.5 SP1.
My Prozessor is:
   Intel(R) Core(TM)2 Duo CPU E6750

Cheers
Frank


P.S.
My examination of the LGPLv3 in regard of header-only libs is an ongoing effort,
obviously this case is not well discussed in the LPGL community, stay tuned.
#include "stdafx.h"
/* in stdafx.h:
#include <stdio.h>
#include <tchar.h>
#include <Eigen/Array>
*/

#define MATSIZE 16

using namespace std;
USING_PART_OF_NAMESPACE_EIGEN

int main(int argc, char *argv[])
{
	Matrix<double,MATSIZE,MATSIZE> I = Matrix<double,MATSIZE,MATSIZE>::Identity();
	Matrix<double,MATSIZE,MATSIZE> m;
	for(int i = 0; i < MATSIZE; i++) {
		for(int j = 0; j < MATSIZE; j++) {
			m(i,j) = (i+MATSIZE*j);
		}
	}

	// Eigen2 Revision: 900873

	// Unhandled exeption in code below,
	// If RELEASE-Mode and MATSIZE >= 16.
	// (No Problems in DEBUG-Mode or if MATSIZE < 16)

	// MSVC reports crash in 
	//	Eigen::ei_cache_friendly_product<double>(int _rows=16, int _cols=16, int depth=8, bool _lhsRowMajor=true, const double * _lhs=0x0030ec70, int _lhsStride=16, bool _rhsRowMajor=true, const double * _rhs=0x0030ec70, int _rhsStride=16, bool resRowMajor=true, double * res=0x0030f490, int resStride=16)  Line 203	C++
	//	Eigen::MatrixBase<Eigen::Matrix<double,16,16,0,16,16> >::operator+<Eigen::Product<Eigen::Matrix<double,16,16,0,16,16> const &,Eigen::Matrix<double,16,16,0,16,16> const &,1> >(const Eigen::MatrixBase<Eigen::Product<Eigen::Matrix<double,16,16,0,16,16> const &,Eigen::Matrix<double,16,16,0,16,16> const &,1> > & other={...})  Line 182 + 0x70 bytes	C++
	//	Line b) if line a) IS NOT commented out
	//  Line b) if line c)   IS   commented out (miracleous!)
	//  Line d) if line a) IS and line c) IS NOT commented out

	//cout << m << endl;			// <- a)
	m = I + 0.0005 * (m + (m*m));	// <- b)
	cout << m << endl;				// <- c)

	m = I + 0.0005 * (m + (m*m));	// <- c)
	return 0;
}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/