Boost logo

Ublas :

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2007-09-10 03:11:07


Another possibility is to create an additional variable:

value_type m_inv( value_type(1) / m (i, i) ) ;

project (mci, range (i + 1, size1)) *= m_inv ;

Karl

Gunter Winkler wrote:

>pinacle wrote:
>
>
>>Hi Gunter
>>
>>In the reply to Karl, I proposed the solution as changing the LINE 147 of
>>lu.cpp from
>> project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i);
>>
>>to
>> project (mci, range (i + 1, size1)) *= value_type (1);
>> project (mci, range (i + 1, size1)) /= m (i, i);
>>
>>At least this works for me now.
>>
>>
>>
>Ok. In this case you can simply drop the multiplication by 1. Does my
>proposol work too? There are still some processors available where
>division is slower than multiplication.
>
>mfg
>Gunter
>
>_______________________________________________
>ublas mailing list
>ublas_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>