File tree Expand file tree Collapse file tree 5 files changed +6
-18
lines changed Expand file tree Collapse file tree 5 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,9 @@ namespace pi {
143
143
// Cast for std::vector<cl_event>, according to the spec, make_event
144
144
// should create one(?) event from a vector of cl_event
145
145
template <class To > inline To cast (std::vector<cl_event> value) {
146
- sycl::detail::pi::assertion (
147
- value.size () == 1 ,
148
- " Temporary workaround requires that the "
149
- " size of the input vector for make_event be equal to one." );
146
+ assert (value.size () == 1 &&
147
+ " Temporary workaround requires that the "
148
+ " size of the input vector for make_event be equal to one." );
150
149
return cast<To>(value[0 ]);
151
150
}
152
151
Original file line number Diff line number Diff line change @@ -101,8 +101,6 @@ bool trace(TraceLevel level);
101
101
// Report error and no return (keeps compiler happy about no return statements).
102
102
[[noreturn]] __SYCL_EXPORT void die (const char *Message);
103
103
104
- __SYCL_EXPORT void assertion (bool Condition, const char *Message = nullptr );
105
-
106
104
using PiPlugin = ::pi_plugin;
107
105
using PiResult = ::pi_result;
108
106
using PiPlatform = ::pi_platform;
@@ -260,9 +258,7 @@ namespace pi {
260
258
// Want all the needed casts be explicit, do not define conversion
261
259
// operators.
262
260
template <class To , class From > inline To cast (From value) {
263
- // TODO: see if more sanity checks are possible.
264
- sycl::detail::pi::assertion ((sizeof (From) == sizeof (To)),
265
- " assert: cast failed size check" );
261
+ static_assert (sizeof (From) == sizeof (To), " cast failed size check" );
266
262
return (To)(value);
267
263
}
268
264
Original file line number Diff line number Diff line change @@ -217,8 +217,8 @@ std::string platformInfoToString(pi_platform_info info) {
217
217
}
218
218
219
219
std::string memFlagToString (pi_mem_flags Flag) {
220
- assertion (((Flag == 0u ) || ((Flag & (Flag - 1 )) == 0 )) &&
221
- " More than one bit set" );
220
+ assert (((Flag == 0u ) || ((Flag & (Flag - 1 )) == 0 )) &&
221
+ " More than one bit set" );
222
222
223
223
std::stringstream Sstream;
224
224
@@ -522,11 +522,6 @@ template const PluginPtr &getPlugin<backend::ext_oneapi_hip>();
522
522
std::terminate ();
523
523
}
524
524
525
- void assertion (bool Condition, const char *Message) {
526
- if (!Condition)
527
- die (Message);
528
- }
529
-
530
525
// Reads an integer value from ELF data.
531
526
template <typename ResT>
532
527
static ResT readELFValue (const unsigned char *Data, size_t NumBytes,
Original file line number Diff line number Diff line change @@ -3288,7 +3288,6 @@ _ZN4sycl3_V16detail28getPixelCoordNearestFiltModeENS0_3vecIfLi4EEENS0_15addressi
3288
3288
_ZN4sycl3_V16detail28getValueFromDynamicParameterERNS0_3ext6oneapi12experimental6detail22dynamic_parameter_baseE
3289
3289
_ZN4sycl3_V16detail2pi25contextSetExtendedDeleterERKNS0_7contextEPFvPvES6_
3290
3290
_ZN4sycl3_V16detail2pi3dieEPKc
3291
- _ZN4sycl3_V16detail2pi9assertionEbPKc
3292
3291
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHost10getAccDataEv
3293
3292
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHost6getPtrEv
3294
3293
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHostC1ENS0_5rangeILi3EEENS0_6access4modeEPviiNS0_2idILi3EEENS0_18image_channel_typeENS0_19image_channel_orderERKNS0_13property_listE
Original file line number Diff line number Diff line change 3703
3703
?alloc_image_mem@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z
3704
3704
?alloc_image_mem@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z
3705
3705
?aspect_selector@_V1@sycl@@YA?AV?$function@$$A6AHAEBVdevice@_V1@sycl@@@Z@std@@AEBV?$vector@W4aspect@_V1@sycl@@V?$allocator@W4aspect@_V1@sycl@@@std@@@4@0@Z
3706
- ?assertion@pi@detail@_V1@sycl@@YAX_NPEBD@Z
3707
3706
?associateWithHandler@detail@_V1@sycl@@YAXAEAVhandler@23@PEAVAccessorBaseHost@123@W4target@access@23@@Z
3708
3707
?associateWithHandler@detail@_V1@sycl@@YAXAEAVhandler@23@PEAVSampledImageAccessorBaseHost@123@W4image_target@23@@Z
3709
3708
?associateWithHandler@detail@_V1@sycl@@YAXAEAVhandler@23@PEAVUnsampledImageAccessorBaseHost@123@W4image_target@23@@Z
You can’t perform that action at this time.
0 commit comments