Re: Fwd: SSE2 instructions with GCC compiler on windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Balakumar R <balakumar85@xxxxxxxxx> writes:

> I am trying to use SSE2 instructions to do double precision operations. I am
> unable to compile in GCC.
>
> This is what i got:
>
>     __m128d a = {pv1[0],pv1[1]};
>     __m128d b = {pv2[0],pv2[1]};
>     __m128d sum1;
>
>     sum1 = _mm_add_pd(a, b);
>
> and i get the following error: request for member 'm128d_f64' in 'sum1',
> which is of non-class type 'double __vector__'

This complete test case compiled for me with gcc 4.3.2 using -msse2.

#include <emmintrin.h>
double pv1[2];
double pv2[2];
void fn() {
    __m128d a = {pv1[0],pv1[1]};
    __m128d b = {pv2[0],pv2[1]};
    __m128d sum1;

    sum1 = _mm_add_pd(a, b);
}

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux