Re: [eigen] Re: Strong inlining is sometimes ignored...

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


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
>
>



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