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++


>>>>> "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]