@@ -34,7 +34,9 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
34
34
return TempData;
35
35
#else
36
36
(void )_Success;
37
- assert (!" Pipes are not supported on a host device!" );
37
+ throw sycl::exception (
38
+ sycl::make_error_code (sycl::errc::feature_not_supported),
39
+ " Pipes are not supported on a host device." );
38
40
#endif // __SYCL_DEVICE_ONLY__
39
41
}
40
42
@@ -49,7 +51,9 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
49
51
#else
50
52
(void )_Success;
51
53
(void )_Data;
52
- assert (!" Pipes are not supported on a host device!" );
54
+ throw sycl::exception (
55
+ sycl::make_error_code (sycl::errc::feature_not_supported),
56
+ " Pipes are not supported on a host device." );
53
57
#endif // __SYCL_DEVICE_ONLY__
54
58
}
55
59
@@ -64,7 +68,9 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
64
68
__spirv_ReadPipeBlockingINTEL (_RPipe, &TempData, m_Size, m_Alignment);
65
69
return TempData;
66
70
#else
67
- assert (!" Pipes are not supported on a host device!" );
71
+ throw sycl::exception (
72
+ sycl::make_error_code (sycl::errc::feature_not_supported),
73
+ " Pipes are not supported on a host device." );
68
74
#endif // __SYCL_DEVICE_ONLY__
69
75
}
70
76
@@ -77,7 +83,9 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
77
83
__spirv_WritePipeBlockingINTEL (_WPipe, &_Data, m_Size, m_Alignment);
78
84
#else
79
85
(void )_Data;
80
- assert (!" Pipes are not supported on a host device!" );
86
+ throw sycl::exception (
87
+ sycl::make_error_code (sycl::errc::feature_not_supported),
88
+ " Pipes are not supported on a host device." );
81
89
#endif // __SYCL_DEVICE_ONLY__
82
90
}
83
91
@@ -128,7 +136,9 @@ class kernel_readable_io_pipe {
128
136
return TempData;
129
137
#else
130
138
(void )_Success;
131
- assert (!" Pipes are not supported on a host device!" );
139
+ throw sycl::exception (
140
+ sycl::make_error_code (sycl::errc::feature_not_supported),
141
+ " Pipes are not supported on a host device." );
132
142
#endif // __SYCL_DEVICE_ONLY__
133
143
}
134
144
@@ -143,7 +153,9 @@ class kernel_readable_io_pipe {
143
153
__spirv_ReadPipeBlockingINTEL (_RPipe, &TempData, m_Size, m_Alignment);
144
154
return TempData;
145
155
#else
146
- assert (!" Pipes are not supported on a host device!" );
156
+ throw sycl::exception (
157
+ sycl::make_error_code (sycl::errc::feature_not_supported),
158
+ " Pipes are not supported on a host device." );
147
159
#endif // __SYCL_DEVICE_ONLY__
148
160
}
149
161
@@ -174,7 +186,9 @@ class kernel_writeable_io_pipe {
174
186
#else
175
187
(void )_Data;
176
188
(void )_Success;
177
- assert (!" Pipes are not supported on a host device!" );
189
+ throw sycl::exception (
190
+ sycl::make_error_code (sycl::errc::feature_not_supported),
191
+ " Pipes are not supported on a host device." );
178
192
#endif // __SYCL_DEVICE_ONLY__
179
193
}
180
194
@@ -188,7 +202,9 @@ class kernel_writeable_io_pipe {
188
202
__spirv_WritePipeBlockingINTEL (_WPipe, &_Data, m_Size, m_Alignment);
189
203
#else
190
204
(void )_Data;
191
- assert (!" Pipes are not supported on a host device!" );
205
+ throw sycl::exception (
206
+ sycl::make_error_code (sycl::errc::feature_not_supported),
207
+ " Pipes are not supported on a host device." );
192
208
#endif // __SYCL_DEVICE_ONLY__
193
209
}
194
210
0 commit comments