LAPACK Archives

[Lapack] [question] vector multiply question

condor chou wrote:
Hello lapack

How do I perform a element by element vector multiply?

Is this possible with a lapack or blas function?

thank you
Condor

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.
Jakub

<Prev in Thread] Current Thread [Next in Thread>


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or