simd comparison operator?

Manu turkeyman at gmail.com
Sun Mar 3 05:53:24 PST 2013


I don't think opCmp can fit that model?

But aside from that, I think that's misleading, and suggests to the user
that it's a trivial operation.
Additionally, it's not necessarily even possible in a portable way.

I also think most users would expect that comparison operators produce a
boolean result.
They'll be surprised when: if(a > b) produces an error.


On 3 March 2013 23:39, bearophile <bearophileHUGS at lycos.com> wrote:

> Manu:
>
>
>  If you want to do component-wise logic,
>> the typical approach is to use component-wise selection, eg:
>>   uint4 mask = compareGreater(a, b); // <- build a bit mask of 0's (false)
>>
>
> Isn't something like this better?
>
> uint4 mask = a > b;
>
> Bye,
> bearophile
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130303/3eebe390/attachment.html>


More information about the Digitalmars-d mailing list