On 2/3/2011 2:33 PM, Greenberg, Naomi wrote:
> I am trying to add 2 double-precision complex matrices together and my
> (older) Intel compiler will not vectorize the code (bad datatype). Is
> there any way around this? I’ve tried to add the real and imaginary
> parts separately and them combine them, but that doesn’t work well
> either. Any ideas?
>
> This is what I’d like to do, either as a subroutine, or in the calling
> routine:
>
> My compiler flags are set to treat real and complex as double precision.
>
> subroutine addA2B (num, A, B)
>
> integer, intent(IN) :: num
>
> complex, intent(INOUT) :: A(num)
>
> complex, intent(IN) :: B(num)
>
> !DIR$IVDEP
>
> A = A + B
>
> end subroutine addA2B
>
> Naomi Greenberg
>
> /Member of the Research Staff/
>
> Riverside Research
>
> (212) 502-1718 (ph)
>
> (212) 502-1729 (fax)
>
> [log in to unmask]
>
Nearly 6 years ago, the "prescott" SSE3 instructions were introduced to
support this (original compiler option -xP). There's no reasonable way
to vectorize with an earlier compiler.
--
Tim Prince
|