File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
sycl/include/CL/sycl/detail Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -169,25 +169,31 @@ void printArgs(Arg0 arg0, Args... args) {
169
169
170
170
namespace RT = cl::sycl::detail::pi;
171
171
172
+ // Workaround for build with GCC 5.x
173
+ // An explicit specialization shall be declared in the namespace block.
174
+ // Having namespace as part of template name is not supported by GCC
175
+ // older than 7.x.
176
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
177
+ namespace pi {
172
178
// Want all the needed casts be explicit, do not define conversion
173
179
// operators.
174
- template <class To , class From > To inline pi:: cast (From value) {
180
+ template <class To , class From > inline To cast (From value) {
175
181
// TODO: see if more sanity checks are possible.
176
182
RT::assertion ((sizeof (From) == sizeof (To)), " assert: cast failed size check" );
177
183
return (To)(value);
178
184
}
179
185
180
186
// These conversions should use PI interop API.
181
- template <> pi::PiProgram inline pi::cast (cl_program interop) {
187
+ template <> inline pi::PiProgram cast (cl_program interop) {
182
188
RT::assertion (false , " pi::cast -> use piextProgramConvert" );
183
189
return {};
184
190
}
185
191
186
- template <> pi::PiDevice inline pi::cast (cl_device_id interop) {
192
+ template <> inline pi::PiDevice cast (cl_device_id interop) {
187
193
RT::assertion (false , " pi::cast -> use piextDeviceConvert" );
188
194
return {};
189
195
}
190
-
196
+ } // namespace pi
191
197
} // namespace detail
192
198
193
199
// For shortness of using PI from the top-level sycl files.
You can’t perform that action at this time.
0 commit comments