summaryrefslogtreecommitdiff
path: root/generic/lib/shared/min.inc
diff options
context:
space:
mode:
Diffstat (limited to 'generic/lib/shared/min.inc')
-rw-r--r--generic/lib/shared/min.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/lib/shared/min.inc b/generic/lib/shared/min.inc
index b99bc35..58a22e1 100644
--- a/generic/lib/shared/min.inc
+++ b/generic/lib/shared/min.inc
@@ -1,3 +1,9 @@
_CLC_OVERLOAD _CLC_DEF GENTYPE min(GENTYPE a, GENTYPE b) {
return (a < b ? a : b);
}
+
+#ifndef SCALAR
+_CLC_OVERLOAD _CLC_DEF GENTYPE min(GENTYPE a, SCALAR_GENTYPE b) {
+ return (a < (GENTYPE)b ? a : (GENTYPE)b);
+}
+#endif