summaryrefslogtreecommitdiff
path: root/generic/lib/shared/min.inc
blob: 58a22e1b6e242be3b798b1144e3a1b5714dcd832 (plain)
1
2
3
4
5
6
7
8
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