@@ -21,42 +21,48 @@ __SYCL_INLINE_NAMESPACE(cl) {
2121namespace __host_std {
2222namespace {
2323
24- template <typename T> inline T __vFOrdEqual (T x, T y) { return -(x == y); }
24+ template <typename T> inline T __vFOrdEqual (T x, T y) {
25+ return -static_cast <T>(x == y);
26+ }
2527
2628template <typename T> inline T __sFOrdEqual (T x, T y) { return x == y; }
2729
28- template <typename T> inline T __vFUnordNotEqual (T x, T y) { return -(x != y); }
30+ template <typename T> inline T __vFUnordNotEqual (T x, T y) {
31+ return -static_cast <T>(x != y);
32+ }
2933
3034template <typename T> inline T __sFUnordNotEqual (T x, T y) { return x != y; }
3135
32- template <typename T> inline T __vFOrdGreaterThan (T x, T y) { return -(x > y); }
36+ template <typename T> inline T __vFOrdGreaterThan (T x, T y) {
37+ return -static_cast <T>(x > y);
38+ }
3339
3440template <typename T> inline T __sFOrdGreaterThan (T x, T y) { return x > y; }
3541
3642template <typename T> inline T __vFOrdGreaterThanEqual (T x, T y) {
37- return -(x >= y);
43+ return -static_cast <T> (x >= y);
3844}
3945
4046template <typename T> inline T __sFOrdGreaterThanEqual (T x, T y) {
4147 return x >= y;
4248}
4349
4450template <typename T> inline T __vFOrdLessThanEqual (T x, T y) {
45- return -(x <= y);
51+ return -static_cast <T> (x <= y);
4652}
4753
4854template <typename T> inline T __sFOrdLessThanEqual (T x, T y) { return x <= y; }
4955
5056template <typename T> inline T __vFOrdNotEqual (T x, T y) {
51- return -((x < y) || (x > y));
57+ return -static_cast <T> ((x < y) || (x > y));
5258}
5359
5460template <typename T> inline T __sFOrdNotEqual (T x, T y) {
5561 return ((x < y) || (x > y));
5662}
5763
5864template <typename T> inline T __vLessOrGreater (T x, T y) {
59- return -((x < y) || (x > y));
65+ return -static_cast <T> ((x < y) || (x > y));
6066}
6167
6268template <typename T> inline T __sLessOrGreater (T x, T y) {
@@ -67,7 +73,7 @@ template <typename T> s::cl_int inline __Any(T x) { return d::msbIsSet(x); }
6773template <typename T> s::cl_int inline __All (T x) { return d::msbIsSet (x); }
6874
6975template <typename T> inline T __vOrdered (T x, T y) {
70- return -(
76+ return -static_cast <T> (
7177 !(std::isunordered (d::cast_if_host_half (x), d::cast_if_host_half (y))));
7278}
7379
@@ -227,7 +233,7 @@ __SYCL_EXPORT s::cl_int FOrdLessThan(s::cl_half x, s::cl_half y) __NOEXC {
227233 return (x < y);
228234}
229235__SYCL_EXPORT s::cl_short __vFOrdLessThan (s::cl_half x, s::cl_half y) __NOEXC {
230- return -(x < y);
236+ return -static_cast <s::cl_short> (x < y);
231237}
232238MAKE_1V_2V_FUNC (FOrdLessThan, __vFOrdLessThan, s::cl_int, s::cl_float,
233239 s::cl_float)
0 commit comments