Re: [eigen] SSE floor/ceil

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


yes we already discussed about that and agreed that would make perfect
sense. This has still to be done though :)

gael

On Wed, Sep 1, 2010 at 7:42 AM, Radu Bogdan Rusu <rusu@xxxxxxxxxxxxxxxx> wrote:
> Would it make sense to implement something like floor and ceil for
> vectors/arrays in eigen3 ? One typical operation that we sometimes need to
> do is:
>
> min_b[0] = (int)(floor (min_p[0] * leaf_size[0]));
> max_b[0] = (int)(floor (max_p[0] * leaf_size[0]));
> min_b[1] = (int)(floor (min_p[1] * leaf_size[1]));
> max_b[1] = (int)(floor (max_p[1] * leaf_size[1]));
> min_b[2] = (int)(floor (min_p[2] * leaf_size[2]));
> max_b[2] = (int)(floor (max_p[2] * leaf_size[2]));
>
> I imagine this would be faster (and cleaner) using something like:
>
> min_b = (min_p * leaf_size).floor ();
> max_b = (max_p * leaf_size).floor ();
>
>
> PS. See http://www.masm32.com/board/index.php?topic=9515.0 for a discussion
> on SSE floor/ceil.
>
> Thanks,
> Radu.
> --
> | Radu Bogdan Rusu | http://rbrusu.com/
>
>
>



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