@@ -38,7 +38,7 @@ template <typename T> struct char_to_int {
38
38
39
39
// The main test routine.
40
40
template <typename T, int N, int Op> bool test_impl (queue q) {
41
- const char *ops[bit_op::num_ops] = {" any" , " all" };
41
+ const char *ops[bit_op::num_ops] = {" any" , " all" };
42
42
std::cout << " Testing op=" << ops[Op] << " T=" << typeid (T).name ()
43
43
<< " , N=" << N << " ...\n " ;
44
44
@@ -49,17 +49,17 @@ template <typename T, int N, int Op> bool test_impl(queue q) {
49
49
}
50
50
simd<T, N> all_two ((T)2 ); // check that non-zero with LSB=0 counts as 'set'
51
51
if (std::is_signed_v<T>) {
52
- all_two[N- 1 ] = -2 ;
52
+ all_two[N - 1 ] = -2 ;
53
53
}
54
54
simd<T, N> zero_two ((T)0 );
55
55
56
56
if (N > 1 ) {
57
57
zero_two[1 ] = 2 ;
58
58
}
59
59
60
- simd<T, N> test_vals_arr[] = { all_zero, all_one, all_two, zero_two };
60
+ simd<T, N> test_vals_arr[] = {all_zero, all_one, all_two, zero_two};
61
61
constexpr size_t num_vals = sizeof (test_vals_arr) / sizeof (test_vals_arr[0 ]);
62
- T *test_vals = sycl::malloc_shared<T>(num_vals* N, q);
62
+ T *test_vals = sycl::malloc_shared<T>(num_vals * N, q);
63
63
uint16_t *res = sycl::malloc_shared<uint16_t >(num_vals, q);
64
64
65
65
for (unsigned int i = 0 ; i < num_vals; ++i) {
@@ -71,7 +71,7 @@ template <typename T, int N, int Op> bool test_impl(queue q) {
71
71
auto e = q.submit ([&](handler &cgh) {
72
72
cgh.single_task <test_id<T, N, Op>>([=]() SYCL_ESIMD_KERNEL {
73
73
for (int i = 0 ; i < num_vals; i++) {
74
- simd<T, N> src (test_vals + i* N);
74
+ simd<T, N> src (test_vals + i * N);
75
75
76
76
if constexpr (Op == bit_op::any) {
77
77
res[i] = src.any ();
@@ -111,7 +111,8 @@ template <typename T, int N, int Op> bool test_impl(queue q) {
111
111
}
112
112
T gold = Gold[Op * num_vals + i];
113
113
T val = res[i];
114
- std::cout << " " << ops[Op] << " (" << (simd<ValTy, N>)test_vals_arr[i] << " ) = " << (ValTy)val;
114
+ std::cout << " " << ops[Op] << " (" << (simd<ValTy, N>)test_vals_arr[i]
115
+ << " ) = " << (ValTy)val;
115
116
116
117
if (val != gold) {
117
118
++err_cnt;
0 commit comments