@@ -26,7 +26,7 @@ struct InnerField : public InnerFieldBase {
26
26
};
27
27
28
28
struct Base {
29
- Base (int _B, int _C, int _D) : B(_B), InnerObj(_C, _D) {}
29
+ Base (int _B, int _C, int _D) : B(_B), InnerObj(_C, _D) {}
30
30
int B;
31
31
InnerField InnerObj;
32
32
};
@@ -35,7 +35,7 @@ struct Derived : public Base, public SecondBase {
35
35
Derived (
36
36
int _A, int _B, int _C, int _D, int _E,
37
37
cl::sycl::accessor<int , 1 , sycl_read_write, sycl_global_buffer> &_Acc)
38
- : A(_A), Acc(_Acc), /* Out(_Out),*/ Base(_B, _C, _D), SecondBase(_E) {}
38
+ : A(_A), Acc(_Acc), /* Out(_Out),*/ Base(_B, _C, _D), SecondBase(_E) {}
39
39
void operator ()() {
40
40
Acc[0 ] = this ->A + this ->B + this ->InnerObj .C + this ->InnerObj .D + this ->E ;
41
41
}
@@ -45,18 +45,17 @@ struct Derived : public Base, public SecondBase {
45
45
};
46
46
47
47
int main () {
48
- int A[] = { 10 };
48
+ int A[] = {10 };
49
49
{
50
50
cl::sycl::queue Q;
51
51
cl::sycl::buffer<int , 1 > Buf (A, 1 );
52
52
53
53
Q.submit ([&](cl::sycl::handler &cgh) {
54
54
auto Acc = Buf.get_access <sycl_read_write, sycl_global_buffer>(cgh);
55
- Derived F = {1 , 2 , 3 , 4 , 5 , Acc/* , Out*/ };
55
+ Derived F = {1 , 2 , 3 , 4 , 5 , Acc /* , Out*/ };
56
56
cgh.single_task (F);
57
57
});
58
58
}
59
59
assert (A[0 ] == 15 );
60
60
return 0 ;
61
61
}
62
-
0 commit comments