Re: [eigen] No vectorization in presence of .cast<T>() calls

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


On 17.12.2010 09:40, Hauke Heibel wrote:
> Hi,
> 
> I have the following piece of code
> 
> MatrixXf od_full = - std::log( img_mat.cast<float>() / 255.0f +
> std::numeric_limits<float>::epsilon() );
> 
> where img_mat is of type
> 
> Map< Array<unsigned char,Dynamic,Dynamic,ColMajor> >.

I think you need to mark the map as aligned (if it is aligned).

Besides that, wouldn't it be useful sometimes, if non-aligned data get's
also vectorized, e.g. if the load-overhead is smaller than the
performance gain? (Or is there some kind of cast possible already?)

Christoph



-- 
----------------------------------------------
Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: (+49) 421-218-64252
----------------------------------------------



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