@@ -18,15 +18,15 @@ using namespace sycl;
18
18
19
19
int main () {
20
20
{
21
- sycl::cl_float results[3 ] = {0 };
21
+ float results[3 ] = {0 };
22
22
{
23
- buffer<sycl::cl_float , 1 > b (results, range<1 >(3 ));
23
+ buffer<float , 1 > b (results, range<1 >(3 ));
24
24
queue myQueue;
25
25
myQueue.submit ([&](handler &cgh) {
26
26
auto B = b.get_access <access::mode::write>(cgh);
27
27
cgh.single_task <class test_1 >([=]() {
28
- sycl::cl_float2 ab = {4 , 2 };
29
- sycl::cl_float c = ab.x () * ab.y ();
28
+ float2 ab = {4 , 2 };
29
+ float c = ab.x () * ab.y ();
30
30
B[0 ] = ab.x ();
31
31
B[1 ] = ab.y ();
32
32
B[2 ] = c;
@@ -39,15 +39,15 @@ int main() {
39
39
}
40
40
41
41
{
42
- sycl::cl_float results[3 ] = {0 };
42
+ float results[3 ] = {0 };
43
43
{
44
- buffer<sycl::cl_float , 1 > b (results, range<1 >(3 ));
44
+ buffer<float , 1 > b (results, range<1 >(3 ));
45
45
queue myQueue;
46
46
myQueue.submit ([&](handler &cgh) {
47
47
auto B = b.get_access <access::mode::write>(cgh);
48
48
cgh.single_task <class test_2 >([=]() {
49
- sycl::cl_float2 ab = {4 , 2 };
50
- sycl::cl_float c = ab.x () * 2 ;
49
+ float2 ab = {4 , 2 };
50
+ float c = ab.x () * 2 ;
51
51
B[0 ] = ab.x ();
52
52
B[1 ] = ab.y ();
53
53
B[2 ] = c;
@@ -60,15 +60,15 @@ int main() {
60
60
}
61
61
62
62
{
63
- sycl::cl_float results[3 ] = {0 };
63
+ float results[3 ] = {0 };
64
64
{
65
- buffer<sycl::cl_float , 1 > b (results, range<1 >(3 ));
65
+ buffer<float , 1 > b (results, range<1 >(3 ));
66
66
queue myQueue;
67
67
myQueue.submit ([&](handler &cgh) {
68
68
auto B = b.get_access <access::mode::write>(cgh);
69
69
cgh.single_task <class test_3 >([=]() {
70
- sycl::cl_float2 ab = {4 , 2 };
71
- sycl::cl_float c = 4 * ab.y ();
70
+ float2 ab = {4 , 2 };
71
+ float c = 4 * ab.y ();
72
72
B[0 ] = ab.x ();
73
73
B[1 ] = ab.y ();
74
74
B[2 ] = c;
@@ -81,15 +81,15 @@ int main() {
81
81
}
82
82
83
83
{
84
- sycl::cl_float results[4 ] = {0 };
84
+ float results[4 ] = {0 };
85
85
{
86
- buffer<sycl::cl_float , 1 > b (results, range<1 >(4 ));
86
+ buffer<float , 1 > b (results, range<1 >(4 ));
87
87
queue myQueue;
88
88
myQueue.submit ([&](handler &cgh) {
89
89
auto B = b.get_access <access::mode::write>(cgh);
90
90
cgh.single_task <class test_4 >([=]() {
91
- sycl::cl_float2 ab = {4 , 2 };
92
- sycl::cl_float2 c = {0 , 0 };
91
+ float2 ab = {4 , 2 };
92
+ float2 c = {0 , 0 };
93
93
c.x () = ab.x () * ab.y ();
94
94
B[0 ] = ab.x ();
95
95
B[1 ] = ab.y ();
@@ -105,15 +105,15 @@ int main() {
105
105
}
106
106
107
107
{
108
- sycl::cl_float results[4 ] = {0 };
108
+ float results[4 ] = {0 };
109
109
{
110
- buffer<sycl::cl_float , 1 > b (results, range<1 >(4 ));
110
+ buffer<float , 1 > b (results, range<1 >(4 ));
111
111
queue myQueue;
112
112
myQueue.submit ([&](handler &cgh) {
113
113
auto B = b.get_access <access::mode::write>(cgh);
114
114
cgh.single_task <class test_5 >([=]() {
115
- sycl::cl_float2 ab = {4 , 2 };
116
- sycl::cl_float2 c = {0 , 0 };
115
+ float2 ab = {4 , 2 };
116
+ float2 c = {0 , 0 };
117
117
c.x () = 4 * ab.y ();
118
118
B[0 ] = ab.x ();
119
119
B[1 ] = ab.y ();
@@ -129,15 +129,15 @@ int main() {
129
129
}
130
130
131
131
{
132
- sycl::cl_float results[4 ] = {0 };
132
+ float results[4 ] = {0 };
133
133
{
134
- buffer<sycl::cl_float , 1 > b (results, range<1 >(4 ));
134
+ buffer<float , 1 > b (results, range<1 >(4 ));
135
135
queue myQueue;
136
136
myQueue.submit ([&](handler &cgh) {
137
137
auto B = b.get_access <access::mode::write>(cgh);
138
138
cgh.single_task <class test_6 >([=]() {
139
- sycl::cl_float2 ab = {4 , 2 };
140
- sycl::cl_float2 c = {0 , 0 };
139
+ float2 ab = {4 , 2 };
140
+ float2 c = {0 , 0 };
141
141
c.x () = ab.x () * 2 ;
142
142
B[0 ] = ab.x ();
143
143
B[1 ] = ab.y ();
@@ -153,21 +153,21 @@ int main() {
153
153
}
154
154
155
155
{
156
- sycl::cl_float results[6 ] = {0 };
156
+ float results[6 ] = {0 };
157
157
{
158
- buffer<sycl::cl_float , 1 > b (results, range<1 >(6 ));
158
+ buffer<float , 1 > b (results, range<1 >(6 ));
159
159
queue myQueue;
160
160
myQueue.submit ([&](handler &cgh) {
161
161
auto B = b.get_access <access::mode::write>(cgh);
162
162
cgh.single_task <class test_7 >([=]() {
163
- sycl:: uchar4 abc = {4 , 2 , 1 , 0 };
163
+ uchar4 abc = {4 , 2 , 1 , 0 };
164
164
165
- sycl:: uchar4 c_each;
165
+ uchar4 c_each;
166
166
c_each.x () = abc.x ();
167
167
c_each.y () = abc.y ();
168
168
c_each.z () = abc.z ();
169
169
170
- sycl:: uchar4 c_full;
170
+ uchar4 c_full;
171
171
c_full = abc;
172
172
173
173
B[0 ] = c_each.x ();
@@ -188,24 +188,24 @@ int main() {
188
188
}
189
189
190
190
{
191
- sycl::cl_float results[4 ] = {0 };
191
+ float results[4 ] = {0 };
192
192
{
193
- buffer<sycl::cl_float , 1 > b (results, range<1 >(4 ));
193
+ buffer<float , 1 > b (results, range<1 >(4 ));
194
194
queue myQueue;
195
195
myQueue.submit ([&](handler &cgh) {
196
196
auto B = b.get_access <access::mode::write>(cgh);
197
197
cgh.single_task <class test_8 >([=]() {
198
- sycl:: uchar4 cba;
199
- sycl::uchar x = 1 ;
200
- sycl::uchar y = 2 ;
201
- sycl::uchar z = 3 ;
202
- sycl::uchar w = 4 ;
198
+ uchar4 cba;
199
+ unsigned char x = 1 ;
200
+ unsigned char y = 2 ;
201
+ unsigned char z = 3 ;
202
+ unsigned char w = 4 ;
203
203
cba.x () = x;
204
204
cba.y () = y;
205
205
cba.z () = z;
206
206
cba.w () = w;
207
207
208
- sycl:: uchar4 abc = {1 , 2 , 3 , 4 };
208
+ uchar4 abc = {1 , 2 , 3 , 4 };
209
209
abc.x () = cba.s0 ();
210
210
abc.y () = cba.s1 ();
211
211
abc.z () = cba.s2 ();
@@ -228,16 +228,16 @@ int main() {
228
228
}
229
229
230
230
{
231
- sycl::cl_uint results[4 ] = {0 };
231
+ unsigned int results[4 ] = {0 };
232
232
{
233
- buffer<sycl::cl_uint , 1 > b (results, range<1 >(4 ));
233
+ buffer<unsigned int , 1 > b (results, range<1 >(4 ));
234
234
queue myQueue;
235
235
myQueue.submit ([&](handler &cgh) {
236
236
auto B = b.get_access <access::mode::write>(cgh);
237
237
cgh.single_task <class test_9 >([=]() {
238
- sycl:: uchar4 vec;
239
- sycl::uint add = 254 ;
240
- sycl::uchar factor = 2 ;
238
+ uchar4 vec;
239
+ unsigned int add = 254 ;
240
+ unsigned char factor = 2 ;
241
241
vec.x () = 2 ;
242
242
vec.y () = 4 ;
243
243
vec.z () = 6 ;
@@ -259,13 +259,12 @@ int main() {
259
259
{
260
260
int FF[8 ] = {1 , 1 , 1 , 0 , 1 , 1 , 1 , 0 };
261
261
{
262
- buffer<sycl:: int3, 1 > b ((sycl:: int3 *)FF, range<1 >(2 ));
262
+ buffer<int3, 1 > b ((int3 *)FF, range<1 >(2 ));
263
263
queue myQueue;
264
264
myQueue.submit ([&](handler &cgh) {
265
265
auto B = b.get_access <access::mode::read_write>(cgh);
266
- cgh.parallel_for <class test_10 >(sycl::range<1 >{2 }, [=](sycl::id<1 > ID) {
267
- B[ID] = sycl::int3{ID[0 ]} / B[ID];
268
- });
266
+ cgh.parallel_for <class test_10 >(
267
+ range<1 >{2 }, [=](id<1 > ID) { B[ID] = int3{ID[0 ]} / B[ID]; });
269
268
});
270
269
}
271
270
assert (FF[0 ] == 0 );
@@ -276,15 +275,15 @@ int main() {
276
275
assert (FF[6 ] == 1 );
277
276
}
278
277
{
279
- sycl:: int3 result = {0 , 0 , 0 };
278
+ int3 result = {0 , 0 , 0 };
280
279
{
281
- buffer<sycl:: int3, 1 > b (&result, range<1 >(1 ));
280
+ buffer<int3, 1 > b (&result, range<1 >(1 ));
282
281
queue myQueue;
283
282
myQueue.submit ([&](handler &cgh) {
284
283
auto B = b.get_access <access::mode::write>(cgh);
285
284
cgh.single_task <class test_11 >([=]() {
286
- sycl:: int3 testVec1 = {2 , 2 , 2 };
287
- sycl:: int3 testVec2 = {1 , 1 , 1 };
285
+ int3 testVec1 = {2 , 2 , 2 };
286
+ int3 testVec2 = {1 , 1 , 1 };
288
287
B[0 ] = testVec1 / testVec2;
289
288
});
290
289
});
0 commit comments