@@ -89,10 +89,28 @@ template <unsigned SIMDSize> int testAccessor(queue q) {
89
89
90
90
auto error = 0 ;
91
91
for (auto i = 0 ; i != size; ++i) {
92
- error += vec_0[i] != 2 * i;
93
- error += vec_1[i] > 0 ;
94
- error += vec_2[i] != i;
95
- error += vec_3[i] != i;
92
+ if (vec_0[i] != 2 * i) {
93
+ ++error;
94
+ std::cout << " Accessor Test 1 out[" << i << " ] = 0x" << std::hex
95
+ << vec_0[i] << " vs etalon = 0x" << 2 * i << std::dec
96
+ << std::endl;
97
+ }
98
+ if (vec_1[i] > 0 ) {
99
+ ++error;
100
+ std::cout << " Accessor Test 2 out[" << i << " ] = 0x" << std::hex
101
+ << vec_1[i] << " vs etalon = 0x" << 0 << std::dec << std::endl;
102
+ }
103
+ if (vec_2[i] != i) {
104
+ ++error;
105
+ std::cout << " Accessor Test 3 out[" << i << " ] = 0x" << std::hex
106
+ << vec_2[i] << " vs etalon = 0x" << i << std::dec << std::endl;
107
+ }
108
+
109
+ if (vec_3[i] != i) {
110
+ ++error;
111
+ std::cout << " Accessor Test 4 out[" << i << " ] = 0x" << std::hex
112
+ << vec_3[i] << " vs etalon = 0x" << i << std::dec << std::endl;
113
+ }
96
114
}
97
115
std::cout << " Accessor lsc predicate test " ;
98
116
std::cout << (error != 0 ? " FAILED" : " passed" ) << std::endl;
@@ -153,10 +171,27 @@ template <unsigned SIMDSize> int testUSM(queue q) {
153
171
154
172
int error = 0 ;
155
173
for (auto i = 0 ; i != size; ++i) {
156
- error += vec_0[i] != 2 * i;
157
- error += vec_1[i] > 0 ;
158
- error += vec_2[i] != i;
159
- error += vec_3[i] != i;
174
+ if (vec_0[i] != 2 * i) {
175
+ ++error;
176
+ std::cout << " USM Test 1 out[" << i << " ] = 0x" << std::hex << vec_0[i]
177
+ << " vs etalon = 0x" << 2 * i << std::dec << std::endl;
178
+ }
179
+ if (vec_1[i] > 0 ) {
180
+ ++error;
181
+ std::cout << " USM Test 2 out[" << i << " ] = 0x" << std::hex << vec_1[i]
182
+ << " vs etalon = 0x" << 0 << std::dec << std::endl;
183
+ }
184
+ if (vec_2[i] != i) {
185
+ ++error;
186
+ std::cout << " USM Test 3 out[" << i << " ] = 0x" << std::hex << vec_2[i]
187
+ << " vs etalon = 0x" << i << std::dec << std::endl;
188
+ }
189
+
190
+ if (vec_3[i] != i) {
191
+ ++error;
192
+ std::cout << " USM Test 4 out[" << i << " ] = 0x" << std::hex << vec_3[i]
193
+ << " vs etalon = 0x" << i << std::dec << std::endl;
194
+ }
160
195
}
161
196
sycl::free (vec_0, q);
162
197
sycl::free (vec_1, q);
@@ -169,15 +204,14 @@ template <unsigned SIMDSize> int testUSM(queue q) {
169
204
170
205
int main () {
171
206
172
- auto q =
173
- queue{esimd_test::ESIMDSelector, esimd_test::createExceptionHandler ()};
207
+ queue q (esimd_test::ESIMDSelector, esimd_test::createExceptionHandler ());
174
208
auto device = q.get_device ();
175
209
std::cout << " Device name: " << device.get_info <info::device::name>()
176
210
<< std::endl;
177
211
178
212
int error = testUSM<8 >(q);
179
- error = testUSM<16 >(q);
180
- error = testUSM<32 >(q);
213
+ error + = testUSM<16 >(q);
214
+ error + = testUSM<32 >(q);
181
215
182
216
error += testAccessor<8 >(q);
183
217
error += testAccessor<16 >(q);
0 commit comments