summaryrefslogtreecommitdiff
path: root/generic/lib/shared/min.inc
blob: fe42864df25766fc345a51b9fbaf6a982570dfea (plain)
1
2
3
4
5
6
7
8
9
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_GENTYPE b) {
  return (a < b ? a : b);
}

#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);
}
#endif