Re: [eigen] [Fwd: eigen cwise] unexpected performance regression with eigen's cwise() |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] [Fwd: eigen cwise] unexpected performance regression with eigen's cwise()
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 20 Aug 2009 01:27:22 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=D9YjPlEoNyD+aTB0jpLwj+/dEapoosSTrl391UDYf/Q=; b=aZEcQypDJj1Za2lnwnGzCk29EFfgTC2EA4LyeAIf1AuxqnJWzfN3Z+DBx0lNOWOp6u JprB15XvDnQBVvwELYRaUgSNBu84wD2AjioFdpaFzONqfPhJ1JiEz4t7zlT+ayIM9YZU taFiuuDPIXCW0GCKi7b4GaAG+SIkDNXjk9YUQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TNAJakypcrbFscn+EG8aXvK56WetF0odqfTBy3mhanOz4DlTzCrX18pY5OPB/GmIlL ABnN41hae7dI6RPK7zHDh6ut/ASzxN2HbQYev+pQWC2jS4QMRpPtbzvlmGvgliVJB4iD HzSmyOfM2OVzGM8NhjQVwUnqmJGzk2C6UhBrE=
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