|Re: [eigen] matrix::linspace|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] matrix::linspace
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 27 Jan 2010 06:32:08 -0500
- 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; bh=L8KO5UDT2zCOda5bBKhI4ucBqjrUDcRiAiXWc00TPDU=; b=KvP5tsowDIgVou1kiObbPwT6Q/+SDD6LWKW/ULuo96Bj4MAdeoFGc1+HE2UMQzNpoz p2eH0kJsLet1KTNbX4piA+DSJgDxHcsbqMtXDMIbwFKzmgjObRZ0Bt+/thIFuuq+HrfN gAilXzmkAxS8SWsQlGcutcs8bjiyfaigul9g4=
- 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; b=B9HIAfTVKGpA+SXct3RchPR1unEg8I9nto3AEoW0HOiGrQlH+UfeWJgVZESUvVSlNt nZCmaHAdsYQaa+OhCiTik/p7rAtBprwl5Rs5USOzRANdixs9NisRUrwTH8AGPSm08j2N XYPsd/MzNz4y4cBusvaKzZdgmJvuW/TjQPx5c=
2010/1/27 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> On Tue, Jan 26, 2010 at 10:54 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Neither does my approach, once you take it as a partial unrolling. But
>> this approach will certainly decrease performance a lot, due to the
>> higher number of operations. I don't think that we're really in the
>> domain of application of this approach.
> But if I'ld use your approach of partial unrolling that would require
> a new assignment, right? I don't see how to easily incorporate that
> right now and probably you are right, I will skip this 'fancy'
> addition scheme...
Right, that's true, it requires setLinSpaced to have its own loop.
That wouldn't be a first, that doesn't mean adding anything to
Assign.h, you could instead completely decouple the implementation of
setLinSpaced from that of LinSpaced, e.g. forget about the template
parameter to the functor. The functor would be only for LinSpaced
while setLinSpaced would have its own for loop. But yes it's a bit
more code to have a separate loop for setLinSpaced. It's not too bad:
setLinSpaced is only for expressions that have LinearAccessBit, right?
So we're talking about a single for loop, and in the unrolled case, a
single loop unroller.