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

#ifndef __CLC_SCALAR
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE max(__CLC_GENTYPE a, __CLC_SCALAR_GENTYPE b) {
  return (a > (__CLC_GENTYPE)b ? a : (__CLC_GENTYPE)b);
}
#endif