Re: [eigen] Re: Strong inlining is sometimes ignored... |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Re: Strong inlining is sometimes ignored...
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 15 Oct 2009 09:02:07 -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; bh=CAzkGbEbE98h1cJX2BvOvi5NPr+pNfxOa4TVBrCsbv0=; b=N1nXNBvKKei1aU2rjr2vQXy/eSw//W+o8H+ysHIPVtPM+M+svWcOg7VMEeChfYXObB xahF7j72TdR3RTBVbvF9sxtGFOcGIjFLcUnEA6CFGBEqSk/Zj2oKvbIYtcjIm3k3G57r dcD1nOsqy6ohOxbGFLxBkCAsy1raQHNgAiRmQ=
- 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=I9VhyPKo/CcgDPuUSgEoBUY3B88Q5/cQymPdOal2cVVE5S2YRxuJ3PnhvDMGkNz71E vrA8s/KJIMfQSNB/Yjd/VPkL8HIYUnoRXAvbeUsY4Yb7avInNb6lKscoubazZnsGIZmN TmF7QRKU/SSV1k5G9o2PP3UkJ1fPHnjniEKMA=
Regardless, ei_assert(IsVectorAtCompileTime) sounds stupid because
it's best done as a static assert, so if you saw that that static
assert is already done somewhere, feel free to remove that ei_assert.
Benoit
2009/10/15 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> Actually, the NullaryExpr code can stay as is right now. Throwing exceptions
> is specific for the unit tests thus it will go away in non-unit test release
> builds...
>
> Sorry for the noise.
>
> - Hauke
>
> On Thu, Oct 15, 2009 at 12:03 PM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
> wrote:
>>
>> Ok, next thing. For
>>
>> template<typename Derived>
>> template<typename CustomNullaryOp>
>> EIGEN_STRONG_INLINE const CwiseNullaryOp<CustomNullaryOp, Derived>
>> MatrixBase<Derived>::NullaryExpr(int size, const CustomNullaryOp& func);
>>
>> the function is not inlined due to the
>>
>> ei_assert(IsVectorAtCompileTime);
>>
>> It might throw an exception and thus the function is according to
>> http://msdn.microsoft.com/en-us/library/a98sb923%28VS.80%29.aspx not
>> inlined. I think it is the third rule.
>>
>> Is that assert really required? We already have a compile time assert
>> checking for the matrix being a vector.
>>
>> - Hauke
>
>