Skip to content

Commit d39c65c

Browse files
committed
[SYCL] create PI (Plugin Interface) layer and redirect there platform/device stuff.
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 737394f commit d39c65c

11 files changed

+7
-2
lines changed

sycl/include/CL/sycl/detail/aligned_allocator.hpp

100644100755
File mode changed.

sycl/include/CL/sycl/detail/device_impl.hpp

100644100755
File mode changed.

sycl/include/CL/sycl/detail/device_info.hpp

100644100755
+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ template <info::device param> struct get_device_info<string_class, param> {
7070
return string_class(result.get());
7171
}
7272
};
73+
74+
// Specialization for parent device
75+
template <typename T>
76+
struct get_device_info<T, info::device::parent_device> {
77+
static T _(RT::pi_device dev);
78+
};
7379

7480
// Specialization for parent device
7581
template <typename T>

sycl/include/CL/sycl/detail/pi.hpp

100644100755
File mode changed.

sycl/include/CL/sycl/detail/pi_opencl.hpp

100644100755
+1
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ class opencl {
5757
} // namespace detail
5858
} // namespace sycl
5959
} // namespace cl
60+

sycl/include/CL/sycl/device.hpp

100644100755
File mode changed.

sycl/include/CL/sycl/platform.hpp

100644100755
File mode changed.

sycl/source/detail/device_impl.cpp

100644100755
File mode changed.

sycl/source/detail/pi.cpp

100644100755
-1
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,3 @@ PI_DISPATCH(piextDeviceSelectBinary)
9494
} // namespace detail
9595
} // namespace sycl
9696
} // namespace cl
97-

sycl/source/detail/pi_opencl.cpp

100644100755
File mode changed.

sycl/source/detail/platform_impl.cpp

100644100755
-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ platform_impl_pi::get_platforms() {
3030
platform plt =
3131
detail::createSyclObjFromImpl<platform>(
3232
std::make_shared<platform_impl_pi>(pi_platforms[i]));
33-
3433
// Skip platforms which do not contain requested device types
3534
if (!plt.get_devices(forced_type).empty())
3635
platforms.push_back(plt);

0 commit comments

Comments
 (0)