From: Jakub Kurzak
Date: Wed, 09 Aug 2006 10:02:33 -0400
condor chou wrote:
How do I perform a element by element vector multiply?
Is this possible with a lapack or blas function?
There is no LAPACK or BLAS function to do element by
element vector multiply. You can do a little cheat and
use matrix vector multiply with a banded (diagonal) matrix.
Be careful though if your vectors are complex and you are not
scaling them at the same time. I came across BLAS implementations
which don't address the special case of the constant factor equal
to one. Chances are you would be better off coding the loop by yourself,
but pay close attention to what the compiler does, especially if you work
in complex. You are not going to get beyond the memory bandwidth, but you
should get that at least.