Re: [eigen] Zeros affect sequence of operation |

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

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Zeros affect sequence of operation*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Thu, 12 Oct 2017 10:30:25 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=gfTLpr6BxEsGaSWenatDInwjF43frYxkVEym37b8LWQ=; b=U5k+zQJMadQCUYYd7ouDNoXihERoT2WIejkuVGntI6wGPdIqhFinDeMixB3v/xtbRK yonDoLa6z6NMMDRTIyLAZc29eB3OSY5ylc18RtoMIVU0tHV1xzQGA49MkxZTbJBbbfR2 HyaIKd1YEKFAREvpCDhTh67aEr3IaKKni1EGl/sOpS3aDlgPowniGeyq2BsKlHHbt5gJ QJtKmOWGxR7gZw/aekNytUpkc5Wmz9rD8nx8L9EJqHvQbXMVMGtzfhmNJlCE/PGYoyFv XH+o5yeZkad9sxg0eDe/sIfnfdyHIqPq3tJsOEpJyejcJqyFCcPzh0TrRFPZ1u7mIn3f HXkg==

Hi,

do you have some specific exemples to point out ?

gael

On Mon, Oct 9, 2017 at 3:31 PM, Brad Bell <bradbell@xxxxxxxxxx> wrote:

Custom scalar AD types, for example Adolc

https://eigen.tuxfamily.org/dox/TopicCustomizing_CustomScala r.html

record an operation sequence and can use it at different values for the independent variables.

It appears that Eigen will short circuit certain operations when a value is zero. In CppAD there is a notion of a variable and a parameter. Parameters do not depend on the independent variables.

Because CppAD can have multiple levels of AD, a parameter at one level may be a variable at another. Therefore, in CppAD, it is necessary to have the notation of identically equal zero; i.e., this value will always be zero no matter what. Multiplication of a variable by an identically zero value results in an identically zero value (which leads to certain optimizations).

Note that, for the type double, identically zero and zero are the same.

It would be nice if Eigen understood variables and parameters and chose its operation sequence accordingly.

Brad.

**Follow-Ups**:**Re: [eigen] Zeros affect sequence of operation***From:*Brad Bell

**References**:**[eigen] Zeros affect sequence of operation***From:*Brad Bell

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] Zeros affect sequence of operation** - Next by Date:
**Re: [eigen] Zeros affect sequence of operation** - Previous by thread:
**[eigen] Zeros affect sequence of operation** - Next by thread:
**Re: [eigen] Zeros affect sequence of operation**

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