This is the mail archive of the gcc-patches@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: [PATCH] Add comparison operators for vector types



The general model used for the generic vector extensions is C++ valarray, which returns valarray<bool> for these operations. Since comparisons in C return int not bool, this might suggest valarray<int> for C; bearing in mind that vectors of the given number of bools or ints may not exist in hardware, the OpenCL approach of returning a vector of the same size as the inputs seems reasonable, even if the choice of -1 for true elements seems odd in language design terms.

Agreed. I don't think this particular extension should go into FSF GCC in a target-independent manner.


Paolo


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