@@ -48,8 +48,8 @@ template <> struct check_fp_support<info::device::double_fp_config> {
48
48
template <typename T, info::device param> struct get_device_info {
49
49
static T _ (RT::PiDevice dev) {
50
50
typename sycl_to_pi<T>::type result;
51
- PI_CALL (RT:: piDeviceGetInfo, dev, pi::cast<RT::PiDeviceInfo>(param),
52
- sizeof (result), &result, nullptr );
51
+ PI_CALL (piDeviceGetInfo)( dev, pi::cast<RT::PiDeviceInfo>(param),
52
+ sizeof (result), &result, nullptr );
53
53
return T (result);
54
54
}
55
55
};
@@ -58,8 +58,8 @@ template <typename T, info::device param> struct get_device_info {
58
58
template <info::device param> struct get_device_info <platform, param> {
59
59
static platform _ (RT::PiDevice dev) {
60
60
typename sycl_to_pi<platform>::type result;
61
- PI_CALL (RT:: piDeviceGetInfo, dev, pi::cast<RT::PiDeviceInfo>(param),
62
- sizeof (result), &result, nullptr );
61
+ PI_CALL (piDeviceGetInfo)( dev, pi::cast<RT::PiDeviceInfo>(param),
62
+ sizeof (result), &result, nullptr );
63
63
return createSyclObjFromImpl<platform>(
64
64
std::make_shared<platform_impl_pi>(result));
65
65
}
@@ -69,14 +69,14 @@ template <info::device param> struct get_device_info<platform, param> {
69
69
template <info::device param> struct get_device_info <string_class, param> {
70
70
static string_class _ (RT::PiDevice dev) {
71
71
size_t resultSize;
72
- PI_CALL (RT:: piDeviceGetInfo, dev, pi::cast<RT::PiDeviceInfo>(param), 0 , nullptr ,
73
- &resultSize);
72
+ PI_CALL (piDeviceGetInfo)( dev, pi::cast<RT::PiDeviceInfo>(param), 0 , nullptr ,
73
+ &resultSize);
74
74
if (resultSize == 0 ) {
75
75
return string_class ();
76
76
}
77
77
unique_ptr_class<char []> result (new char [resultSize]);
78
- PI_CALL (RT:: piDeviceGetInfo, dev, pi::cast<RT::PiDeviceInfo>(param), resultSize,
79
- result.get (), nullptr );
78
+ PI_CALL (piDeviceGetInfo)( dev, pi::cast<RT::PiDeviceInfo>(param), resultSize,
79
+ result.get (), nullptr );
80
80
81
81
return string_class (result.get ());
82
82
}
@@ -91,8 +91,8 @@ template <typename T> struct get_device_info<T, info::device::parent_device> {
91
91
template <info::device param> struct get_device_info <id<3 >, param> {
92
92
static id<3 > _ (RT::PiDevice dev) {
93
93
size_t result[3 ];
94
- PI_CALL (RT:: piDeviceGetInfo, dev, pi::cast<RT::PiDeviceInfo>(param),
95
- sizeof (result), &result, nullptr );
94
+ PI_CALL (piDeviceGetInfo)( dev, pi::cast<RT::PiDeviceInfo>(param),
95
+ sizeof (result), &result, nullptr );
96
96
return id<3 >(result[0 ], result[1 ], result[2 ]);
97
97
}
98
98
};
@@ -109,8 +109,8 @@ struct get_device_info<vector_class<info::fp_config>, param> {
109
109
return {};
110
110
}
111
111
cl_device_fp_config result;
112
- PI_CALL (RT:: piDeviceGetInfo, dev, pi::cast<RT::PiDeviceInfo>(param),
113
- sizeof (result), &result, nullptr );
112
+ PI_CALL (piDeviceGetInfo)( dev, pi::cast<RT::PiDeviceInfo>(param),
113
+ sizeof (result), &result, nullptr );
114
114
return read_fp_bitfield (result);
115
115
}
116
116
};
@@ -121,9 +121,9 @@ struct get_device_info<vector_class<info::fp_config>,
121
121
info::device::single_fp_config> {
122
122
static vector_class<info::fp_config> _ (RT::PiDevice dev) {
123
123
cl_device_fp_config result;
124
- PI_CALL (RT:: piDeviceGetInfo, dev,
125
- pi::cast<RT::PiDeviceInfo>(info::device::single_fp_config),
126
- sizeof (result), &result, nullptr );
124
+ PI_CALL (piDeviceGetInfo)(
125
+ dev, pi::cast<RT::PiDeviceInfo>(info::device::single_fp_config),
126
+ sizeof (result), &result, nullptr );
127
127
return read_fp_bitfield (result);
128
128
}
129
129
};
@@ -132,9 +132,9 @@ struct get_device_info<vector_class<info::fp_config>,
132
132
template <> struct get_device_info <bool , info::device::queue_profiling> {
133
133
static bool _ (RT::PiDevice dev) {
134
134
cl_command_queue_properties result;
135
- PI_CALL (RT:: piDeviceGetInfo, dev,
136
- pi::cast<RT::PiDeviceInfo>(info::device::queue_profiling),
137
- sizeof (result), &result, nullptr );
135
+ PI_CALL (piDeviceGetInfo)(
136
+ dev, pi::cast<RT::PiDeviceInfo>(info::device::queue_profiling),
137
+ sizeof (result), &result, nullptr );
138
138
return (result & CL_QUEUE_PROFILING_ENABLE);
139
139
}
140
140
};
@@ -145,9 +145,9 @@ struct get_device_info<vector_class<info::execution_capability>,
145
145
info::device::execution_capabilities> {
146
146
static vector_class<info::execution_capability> _ (RT::PiDevice dev) {
147
147
cl_device_exec_capabilities result;
148
- PI_CALL (RT:: piDeviceGetInfo, dev,
149
- pi::cast<RT::PiDeviceInfo>(info::device::execution_capabilities),
150
- sizeof (result), &result, nullptr );
148
+ PI_CALL (piDeviceGetInfo)(
149
+ dev, pi::cast<RT::PiDeviceInfo>(info::device::execution_capabilities),
150
+ sizeof (result), &result, nullptr );
151
151
return read_execution_bitfield (result);
152
152
}
153
153
};
@@ -182,16 +182,16 @@ struct get_device_info<vector_class<info::partition_property>,
182
182
pi::cast<RT::PiDeviceInfo>(info::device::partition_properties);
183
183
184
184
size_t resultSize;
185
- PI_CALL (RT:: piDeviceGetInfo, dev, info_partition, 0 , nullptr , &resultSize);
185
+ PI_CALL (piDeviceGetInfo)( dev, info_partition, 0 , nullptr , &resultSize);
186
186
187
187
size_t arrayLength = resultSize / sizeof (cl_device_partition_property);
188
188
if (arrayLength == 0 ) {
189
189
return {};
190
190
}
191
191
unique_ptr_class<cl_device_partition_property[]> arrayResult (
192
192
new cl_device_partition_property[arrayLength]);
193
- PI_CALL (RT:: piDeviceGetInfo, dev, info_partition, resultSize, arrayResult.get (),
194
- nullptr );
193
+ PI_CALL (piDeviceGetInfo)( dev, info_partition, resultSize, arrayResult.get (),
194
+ nullptr );
195
195
196
196
vector_class<info::partition_property> result;
197
197
for (size_t i = 0 ; i < arrayLength - 1 ; ++i) {
@@ -207,8 +207,8 @@ struct get_device_info<vector_class<info::partition_affinity_domain>,
207
207
info::device::partition_affinity_domains> {
208
208
static vector_class<info::partition_affinity_domain> _ (RT::PiDevice dev) {
209
209
cl_device_affinity_domain result;
210
- PI_CALL (
211
- RT::piDeviceGetInfo, dev,
210
+ PI_CALL (piDeviceGetInfo)(
211
+ dev,
212
212
pi::cast<RT::PiDeviceInfo>(info::device::partition_affinity_domains),
213
213
sizeof (result), &result, nullptr );
214
214
return read_domain_bitfield (result);
@@ -222,18 +222,18 @@ struct get_device_info<info::partition_affinity_domain,
222
222
info::device::partition_type_affinity_domain> {
223
223
static info::partition_affinity_domain _ (RT::PiDevice dev) {
224
224
size_t resultSize;
225
- PI_CALL (RT:: piDeviceGetInfo, dev,
226
- pi::cast<RT::PiDeviceInfo>(
227
- info::device::partition_type_affinity_domain),
228
- 0 , nullptr , &resultSize);
225
+ PI_CALL (piDeviceGetInfo)( dev,
226
+ pi::cast<RT::PiDeviceInfo>(
227
+ info::device::partition_type_affinity_domain),
228
+ 0 , nullptr , &resultSize);
229
229
if (resultSize != 1 ) {
230
230
return info::partition_affinity_domain::not_applicable;
231
231
}
232
232
cl_device_partition_property result;
233
- PI_CALL (RT:: piDeviceGetInfo, dev,
234
- pi::cast<RT::PiDeviceInfo>(
235
- info::device::partition_type_affinity_domain),
236
- sizeof (result), &result, nullptr );
233
+ PI_CALL (piDeviceGetInfo)( dev,
234
+ pi::cast<RT::PiDeviceInfo>(
235
+ info::device::partition_type_affinity_domain),
236
+ sizeof (result), &result, nullptr );
237
237
if (result == CL_DEVICE_AFFINITY_DOMAIN_NUMA ||
238
238
result == CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE ||
239
239
result == CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE ||
@@ -252,17 +252,17 @@ struct get_device_info<info::partition_property,
252
252
info::device::partition_type_property> {
253
253
static info::partition_property _ (RT::PiDevice dev) {
254
254
size_t resultSize;
255
- PI_CALL (RT:: piDeviceGetInfo, dev, PI_DEVICE_INFO_PARTITION_TYPE, 0 , nullptr ,
256
- &resultSize);
255
+ PI_CALL (piDeviceGetInfo)( dev, PI_DEVICE_INFO_PARTITION_TYPE, 0 , nullptr ,
256
+ &resultSize);
257
257
if (!resultSize)
258
258
return info::partition_property::no_partition;
259
259
260
260
size_t arrayLength = resultSize / sizeof (cl_device_partition_property);
261
261
262
262
unique_ptr_class<cl_device_partition_property[]> arrayResult (
263
263
new cl_device_partition_property[arrayLength]);
264
- PI_CALL (RT:: piDeviceGetInfo, dev, PI_DEVICE_INFO_PARTITION_TYPE, resultSize,
265
- arrayResult.get (), nullptr );
264
+ PI_CALL (piDeviceGetInfo)( dev, PI_DEVICE_INFO_PARTITION_TYPE, resultSize,
265
+ arrayResult.get (), nullptr );
266
266
if (!arrayResult[0 ])
267
267
return info::partition_property::no_partition;
268
268
return info::partition_property (arrayResult[0 ]);
@@ -273,14 +273,14 @@ template <>
273
273
struct get_device_info <vector_class<size_t >, info::device::sub_group_sizes> {
274
274
static vector_class<size_t > _ (RT::PiDevice dev) {
275
275
size_t resultSize = 0 ;
276
- PI_CALL (RT:: piDeviceGetInfo, dev,
277
- pi::cast<RT::PiDeviceInfo>(info::device::sub_group_sizes), 0 ,
278
- nullptr , &resultSize);
276
+ PI_CALL (piDeviceGetInfo)(
277
+ dev, pi::cast<RT::PiDeviceInfo>(info::device::sub_group_sizes), 0 ,
278
+ nullptr , &resultSize);
279
279
280
280
vector_class<size_t > result (resultSize / sizeof (size_t ));
281
- PI_CALL (RT:: piDeviceGetInfo, dev,
282
- pi::cast<RT::PiDeviceInfo>(info::device::sub_group_sizes),
283
- resultSize, result.data (), nullptr );
281
+ PI_CALL (piDeviceGetInfo)(
282
+ dev, pi::cast<RT::PiDeviceInfo>(info::device::sub_group_sizes),
283
+ resultSize, result.data (), nullptr );
284
284
return result;
285
285
}
286
286
};
0 commit comments