----- Original Message -----
From: "Aleksandar Donev" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Saturday, July 21, 2001 12:54 PM
Subject: Aliased DOT_PRODUCT
> Hello,
>
> Is it legal to do DOT_PRODUCT(vector, vector) (i.e. an aliased
> dot-product--useful for quick vector norm calculation)? I am afraid
> SUM(vector**2) might require array temporaries in some compilers...
>
> Thanks,
> Aleksandar
It never occurred to me that DOT_PRODUCT(vector, vector) might pose a
problem. I've assumed that it would be more likely to optimize, although
I've usually found that I have to write out the optimizations I want.
|