@@ -21,42 +21,48 @@ __SYCL_INLINE_NAMESPACE(cl) {
21
21
namespace __host_std {
22
22
namespace {
23
23
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
+ }
25
27
26
28
template <typename T> inline T __sFOrdEqual (T x, T y) { return x == y; }
27
29
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
+ }
29
33
30
34
template <typename T> inline T __sFUnordNotEqual (T x, T y) { return x != y; }
31
35
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
+ }
33
39
34
40
template <typename T> inline T __sFOrdGreaterThan (T x, T y) { return x > y; }
35
41
36
42
template <typename T> inline T __vFOrdGreaterThanEqual (T x, T y) {
37
- return -(x >= y);
43
+ return -static_cast <T> (x >= y);
38
44
}
39
45
40
46
template <typename T> inline T __sFOrdGreaterThanEqual (T x, T y) {
41
47
return x >= y;
42
48
}
43
49
44
50
template <typename T> inline T __vFOrdLessThanEqual (T x, T y) {
45
- return -(x <= y);
51
+ return -static_cast <T> (x <= y);
46
52
}
47
53
48
54
template <typename T> inline T __sFOrdLessThanEqual (T x, T y) { return x <= y; }
49
55
50
56
template <typename T> inline T __vFOrdNotEqual (T x, T y) {
51
- return -((x < y) || (x > y));
57
+ return -static_cast <T> ((x < y) || (x > y));
52
58
}
53
59
54
60
template <typename T> inline T __sFOrdNotEqual (T x, T y) {
55
61
return ((x < y) || (x > y));
56
62
}
57
63
58
64
template <typename T> inline T __vLessOrGreater (T x, T y) {
59
- return -((x < y) || (x > y));
65
+ return -static_cast <T> ((x < y) || (x > y));
60
66
}
61
67
62
68
template <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); }
67
73
template <typename T> s::cl_int inline __All (T x) { return d::msbIsSet (x); }
68
74
69
75
template <typename T> inline T __vOrdered (T x, T y) {
70
- return -(
76
+ return -static_cast <T> (
71
77
!(std::isunordered (d::cast_if_host_half (x), d::cast_if_host_half (y))));
72
78
}
73
79
@@ -227,7 +233,7 @@ __SYCL_EXPORT s::cl_int FOrdLessThan(s::cl_half x, s::cl_half y) __NOEXC {
227
233
return (x < y);
228
234
}
229
235
__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);
231
237
}
232
238
MAKE_1V_2V_FUNC (FOrdLessThan, __vFOrdLessThan, s::cl_int, s::cl_float,
233
239
s::cl_float)
0 commit comments