[Libclc-dev] [PATCH 1/1] make min follow the specs more closely
Jan Vesely
jan.vesely at rutgers.edu
Thu May 21 07:57:26 PDT 2015
On Sat, 2015-04-11 at 21:56 -0400, Jan Vesely wrote:
> Fixes new common/min piglit
I think we still need this for ocl 1.0
>
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> generic/lib/shared/min.inc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/generic/lib/shared/min.inc b/generic/lib/shared/min.inc
> index fe42864..e15e055 100644
> --- a/generic/lib/shared/min.inc
> +++ b/generic/lib/shared/min.inc
> @@ -1,9 +1,9 @@
> _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_GENTYPE b) {
> - return (a < b ? a : b);
> + return (b < a ? b : a);
> }
>
> #ifndef __CLC_SCALAR
> _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_SCALAR_GENTYPE b) {
> - return (a < (__CLC_GENTYPE)b ? a : (__CLC_GENTYPE)b);
> + return (b < (__CLC_GENTYPE)a ? (__CLC_GENTYPE)b : a);
> }
> #endif
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20150521/4b548342/attachment.sig>
More information about the Libclc-dev
mailing list