<div dir="ltr"><div style>I don't think opCmp can fit that model?</div><div><br></div>But aside from that, I think that's misleading, and suggests to the user that it's a trivial operation.<div>Additionally, it's not necessarily even possible in a portable way.</div>
<div><br></div><div style>I also think most users would expect that comparison operators produce a boolean result.</div><div style>They'll be surprised when: if(a > b) produces an error.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 3 March 2013 23:39, bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com" target="_blank">bearophileHUGS@lycos.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Manu:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you want to do component-wise logic,<br>
the typical approach is to use component-wise selection, eg:<br>
uint4 mask = compareGreater(a, b); // <- build a bit mask of 0's (false)<br>
</blockquote>
<br></div>
Isn't something like this better?<br>
<br>
uint4 mask = a > b;<br>
<br>
Bye,<br>
bearophile<br>
</blockquote></div><br></div>