Re: [eigen] array functionality...

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


On Tue, Mar 9, 2010 at 12:05 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> I need to verify this, but it feels as if the replicate implementation
> is currently (at least on MSVC) slower than a hand crafted for loop
> like:
>
> for (int i=0; i<size; ++i)
>  norms(i) = (x - y.col()).matrix().squaredNorm();

Just did that and the Eigen-fied version

norms = (x.replicate(1,y.cols()) - y).matrix().squaredNorm()

is way slower...

I probably need to look at the assembly.

- Hauke



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