Re: [eigen] [Fwd: eigen cwise] unexpected performance regression with eigen's cwise()

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


2009/8/20 Rohit Garg <rpg.314@xxxxxxxxx>:
> I'll ask him to try gcc 4.4 as well. But I don't see how it is
> accessing memory out of bounds. The loop in i goes from [0 , SIZE-2),
> or [0,SIZE-3], So at max, he accesses [0, SIZE-3+2] which should be
> fine.

The code is:

void doMul(){
	for (int i=0;i<ITER;i++)
		for (int j=0;j<SIZE-2;j++)
			blah[i]=cwiseop(blah[i+1],blah[i+2]);
//				blah[i]=blah[i+1].cwise()*blah[i+2];
}

the loop in i goes to ITER-1, not to SIZE-2. The i and j have been mixed up.

Benoit



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