Fraser Cormack b231647475
[libclc] Move relational functions to the CLC library (#115171)
The OpenCL relational functions now call their CLC counterparts, and the
CLC relational functions are defined identically to how the OpenCL
functions were defined.

As usual, clspv and spir-v targets bypass these.

No observable changes to any libclc target (measured with llvm-diff).
2024-11-06 19:28:44 +00:00

18 lines
730 B
Common Lisp

#include <clc/clc.h>
#include <clc/relational/clc_all.h>
#define ALL_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int all(TYPE v)
#define ALL_VECTORIZE(TYPE) \
ALL_ID(TYPE) { return __clc_all(v); } \
ALL_ID(TYPE##2) { return __clc_all(v); } \
ALL_ID(TYPE##3) { return __clc_all(v); } \
ALL_ID(TYPE##4) { return __clc_all(v); } \
ALL_ID(TYPE##8) { return __clc_all(v); } \
ALL_ID(TYPE##16) { return __clc_all(v); }
ALL_VECTORIZE(char)
ALL_VECTORIZE(short)
ALL_VECTORIZE(int)
ALL_VECTORIZE(long)