Re: [eigen] On complex read-cost |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] On complex read-cost
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 25 May 2010 19:45:10 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pdDvLzovaSY+SN2Fwfj3IjX0SH/FB4BkUN2y2zhCr+Q=; b=xrH/A2thxAabq9K5YOcLGbZmsT8o42bwE8XUekcKqNTKE5NhRWUf8vmYm1GS7hDPa4 hwmZY3AOJNE1YOlQJBdQhNC991F9KkX5hIHCVIPH7R2XQksOdIRLUK7eFwPJUO2bYuW5 p9Wc5aZktg5aig1BsJB65PgpSbp0iatfDzI9c=
- 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=wqpGKAlBzliWLDu/rucRA82RCP/QJ4hTAHEnSDK5iaKqYNMUPr3TmX1/UsMzJidOg4 IjQnrOtZyxbQ2DNaGWqEKSrUrTCa9hDuuXlX6/Seaa3C3nAFNf41xR01RFYnnnk3GNOf dRG9fRuy56riqM7mhqCszCtTM89PuUrjcBrXU=
Yes, indeed, good find, patch welcome!
http://eigen.tuxfamily.org/index.php?title=Developer's_Corner#Generating_a_patch
this needs to be fixed in both branches!
Benoit
2010/5/25 Manoj Rajagopalan <rmanoj@xxxxxxxxx>:
> Hi eigen developers,
>
> The read-cost for complex<_Real> in NumTraits.h is hard-coded to 2 unlike
> the AddCost and MulCost which are functions of the eponymous costs for the
> corresponding real NumTraits. I suggest that
> NumTraits<complex<_Real>>::ReadCost = 2*NumTraits<_Real>::ReadCost
>
> If this change is made, it will correctly propagate read costs for
> multi-component and multi-word arbitrary precision custom scalar.
>
> thanks,
> Manoj
>
>
>