@@ -14,6 +14,15 @@ void initInputData(buffer<T, 1> &InBuf, T &ExpectedOut, T Identity,
14
14
if (std::is_same_v<BinaryOperation, std::multiplies<T>> ||
15
15
std::is_same_v<BinaryOperation, std::multiplies<>>)
16
16
In[I] = 1.1 + (((I % 11 ) == 0 ) ? 1 : 0 );
17
+ else if (std::is_same_v<BinaryOperation, std::bit_and<T>> ||
18
+ std::is_same_v<BinaryOperation, std::bit_and<>>)
19
+ In[I] = (I + 1 ) | 0x10203040 ;
20
+ else if (std::is_same_v<BinaryOperation, sycl::minimum<T>> ||
21
+ std::is_same_v<BinaryOperation, sycl::minimum<>>)
22
+ In[I] = Range[0 ] - I;
23
+ else if (std::is_same_v<BinaryOperation, sycl::maximum<T>> ||
24
+ std::is_same_v<BinaryOperation, sycl::maximum<>>)
25
+ In[I] = I;
17
26
else
18
27
In[I] = ((I + 1 ) % 5 ) + 1.1 ;
19
28
ExpectedOut = BOp (ExpectedOut, In[I]);
@@ -32,6 +41,15 @@ void initInputData(buffer<T, 2> &InBuf, T &ExpectedOut, T Identity,
32
41
if (std::is_same_v<BinaryOperation, std::multiplies<T>> ||
33
42
std::is_same_v<BinaryOperation, std::multiplies<>>)
34
43
In[J][I] = 1.1 + ((((I + J * 3 ) % 11 ) == 0 ) ? 1 : 0 );
44
+ else if (std::is_same_v<BinaryOperation, std::bit_and<T>> ||
45
+ std::is_same_v<BinaryOperation, std::bit_and<>>)
46
+ In[J][I] = (I + J + 1 ) | 0x10203040 ;
47
+ else if (std::is_same_v<BinaryOperation, sycl::minimum<T>> ||
48
+ std::is_same_v<BinaryOperation, sycl::minimum<>>)
49
+ In[J][I] = Range[0 ] + Range[1 ] - I - J;
50
+ else if (std::is_same_v<BinaryOperation, sycl::maximum<T>> ||
51
+ std::is_same_v<BinaryOperation, sycl::maximum<>>)
52
+ In[J][I] = I + J;
35
53
else
36
54
In[J][I] = ((I + 1 + J) % 5 ) + 1.1 ;
37
55
ExpectedOut = BOp (ExpectedOut, In[J][I]);
@@ -52,6 +70,15 @@ void initInputData(buffer<T, 3> &InBuf, T &ExpectedOut, T Identity,
52
70
if (std::is_same_v<BinaryOperation, std::multiplies<T>> ||
53
71
std::is_same_v<BinaryOperation, std::multiplies<>>)
54
72
In[K][J][I] = 1.1 + ((((I + J * 3 + K) % 11 ) == 0 ) ? 1 : 0 );
73
+ else if (std::is_same_v<BinaryOperation, std::bit_and<T>> ||
74
+ std::is_same_v<BinaryOperation, std::bit_and<>>)
75
+ In[K][J][I] = (I + J + K + 1 ) | 0x10203040 ;
76
+ else if (std::is_same_v<BinaryOperation, sycl::minimum<T>> ||
77
+ std::is_same_v<BinaryOperation, sycl::minimum<>>)
78
+ In[K][J][I] = Range[0 ] + Range[1 ] + Range[2 ] - I - J - K;
79
+ else if (std::is_same_v<BinaryOperation, sycl::maximum<T>> ||
80
+ std::is_same_v<BinaryOperation, sycl::maximum<>>)
81
+ In[K][J][I] = I + J + K;
55
82
else
56
83
In[K][J][I] = ((I + 1 + J + K * 3 ) % 5 ) + 1.1 ;
57
84
ExpectedOut = BOp (ExpectedOut, In[K][J][I]);
0 commit comments