Re: [eigen] SSE floor/ceil |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] SSE floor/ceil
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Wed, 1 Sep 2010 13:10:04 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=9jDdcQAV840Hefj05jSLU/9YYqpV4yClkxJuWdUzMqA=; b=rgVuFe1HyJ4FHPqmm9D64kR8S3ntr4/BilojPewwBrBsoI6OSvqAirM8XQ20lTvWWB TRdacE7n0HZ7N55MXven+FMxk8rXUITacex0PvOD+W/oD+zDXj1TqvvDAEa+hq/6sPu0 a8GPUggmM1sSXyQTsa5+mr0Oimn5dbbJbQmvE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=sYamAPxf+n7+DnYdjgTqf6Eg9NPNYdGPtJ+S84t9JzjuXCwNRc0q6qC0I+5qbJsutg iF+OYXoZKqQrZMzb4Bc9tJHn20xJsS9p5PkA1Ek3D78I+QuCHAg49I4PVBHGgDgA3eDK ohRsaUCKi3GOPVZK+m2cIMvk4+E7+2HzHC1kA=
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/
>
>
>