Boost logo

Ublas :

Subject: Re: [ublas] norm_2_squared in a fast way
From: Manoj Rajagopalan (rmanoj_at_[hidden])
Date: 2009-09-06 09:47:47


This is an O(1) operation and in a single processor this is the optimal way to
calculate the result. You could try a custom implementation (with openMP
directives or pthreads) to take advantage of multicores but your procedure
would have to be invasive - you might have to rewrite (part of) the
vector_inner_prod functor in functional.hpp

-- Manoj

On Sunday 06 September 2009 09:08:00 am Michael Norel wrote:
> Hi All!
>
> Is there a way to calculate squared norm_2 faster than inner_prod(vec,
> vec)? Or this is the optimal way?
>
> Thanks!
>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: rmanoj_at_[hidden]