This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: generic simd and c++


no this is not the problem, if you copy gcc/testsuite/gcc.c-torture/execute/simd-1.c to simd.cc and add #include <stdlib.h> to the top of the file and try to compile it, you will get the same error as I reported.

Thanks,
Andrew Pinski

I will be filling a bug report soon for some of simd problems with -O1 and -msse also.


> 
> >>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
> 
>  > Does generic simd works in c++?
>  > When I try it I get the following error:
>  > findPeaks.cc:47: error: invalid operands of types `vector int' and
>  > `vector int'
>  >     to binary `operator-'
> 
> vector doesn't exist as a keyword.  You're going to have to define a
> macro defining it as we did for altivec:
> 
>         #define vector __attribute__((vector_size(16)))
> 
> This will give you 128 bit vectors.  Use 8 for 64-bit vectors, etc.
> 
> however, try to use something else but vector, since this will cause
> conflicts with C++ libraries.
> 
> Aldy
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]