On Wed, Oct 24, 2012 at 08:36:19PM +0200, Marc Glisse wrote: > On Wed, 24 Oct 2012, Jason Merrill wrote: > > >On 10/19/2012 04:40 PM, Marc Glisse wrote: > >>So between the following: > >>a) x?y:z means (x<0)?y:z > >>b) x?y:z means (x!=0)?y:z > >>c) x?y:z is rejected, only things like (x==t)?y:z are accepted > >>d) other > >> > >>is the choice still b) ? That's an easy one, only 2 characters to change > >>in the patch (assuming the rest is correct) :-) > > > >That would be my inclination, but I'm not a vector programming expert, > > I'm not an expert at all either, and I find the OpenCL semantics > quite confusing, where truth is implicitly x<0 for x?y:z but x!=0 > for x&&y or !x, so in particular (x&&y)?z:t is not equivalent to > x?y?z:t:t, and I am quite happy with your suggestion to deviate. I > was surprised because I hadn't considered the possibility, but now I > actually like it better than OpenCL ;-) > > >so I guess let's go with the OpenCL semantics. > > Ok. I take it as: let's wait a few days in case people want to > comment, then you'll review the original patch?
I'd prefer b) as well, but I'm not a vector programming expert either. Jakub