Re: [eigen] Aligned Fixed Sized Mapped matrices |

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

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Aligned Fixed Sized Mapped matrices*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Fri, 12 Jan 2018 22:52:59 +0100*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=PllJfQAdFwutXQiH8wWAgCPONsaOKddqsT3r0Z778IY=; b=iojfiWdj9cTKKGzyV6KxmzU+IaEXTx3fc/YKvTm3nBpfJQhjTaMSsz41Ncqp9HTYAA qOHkqwecq5q6jOUxiXz513AxOoQ52du5Zh5snas72f8BdMFrHVepQWSm4JoIxRLghZN7 MxgZNRNTuHTNbKXnvUi2h4Nat7QPnzn6+B8ajDQ2H0NW+DLjG7+PtJQTY4M+nzkcMxaL MByj5Z08znnx2MdRnjbjMydBaZ+tDNPpLXQnkAodmt7grm9DWP+ATmUYUe8I+Q6XPAUQ fMiImv+/9aUDMy8/vjMQbYGnQt23ar436WagtMa4Ax5K0006alCycDRNAO8h2GAUZZab 1uQA==

Hi Sameer,

it's not really a requirement but a condition that relax the first requirement, it reads:

- is the given pointer aligned as specified by the user?

- if not, then let's not trigger an assertion if the input data is too small to bother about vectorization (and thus alignment) anyway.

I hope that makes more sense now?

Gael

On Fri, Jan 12, 2018 at 10:13 PM, Sameer Agarwal <sameeragarwal@xxxxxxxxxx> wrote:

I was playing with mapping small fixed aligned buffers to fixed sized matrices and encountered an interesting eigen assertion failure in MapBase.hLine 190 MapBase.h:eigen_assert(( ((internal::UIntPtr(m_data) % internal::traits<Derived>::Alignment) == 0) || (cols() * rows() * innerStride() * sizeof(Scalar)) < internal::traits<Derived>::Alignment ) && "data is not aligned"); I am particularly curious about the requirement(cols() * rows() * innerStride() * sizeof(Scalar)) < internal::traits<Derived>::Alignment Why this rather strict requirement?Sameer

**Follow-Ups**:**Re: [eigen] Aligned Fixed Sized Mapped matrices***From:*Sameer Agarwal

**References**:**[eigen] Aligned Fixed Sized Mapped matrices***From:*Sameer Agarwal

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] Aligned Fixed Sized Mapped matrices** - Next by Date:
**Re: [eigen] alignment c++17** - Previous by thread:
**[eigen] Aligned Fixed Sized Mapped matrices** - Next by thread:
**Re: [eigen] Aligned Fixed Sized Mapped matrices**

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