[Libclc-dev] [PATCH 1/1] make min follow the specs more closely
Jan Vesely
jan.vesely at rutgers.edu
Sat Apr 11 18:56:11 PDT 2015
Fixes new common/min piglit
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
--
2.1.0
More information about the Libclc-dev
mailing list