3030#include " Support/MemOwnershipAttrs.h"
3131#include " dpctl_data_types.h"
3232#include " dpctl_sycl_enum_types.h"
33+ #include " dpctl_sycl_platform_manager.h"
3334#include " dpctl_sycl_types.h"
3435
3536DPCTL_C_EXTERN_C_BEGIN
3637
38+ /* !
39+ * @brief Returns a copy of the DPCTLSyclPlatformRef object.
40+ *
41+ * @param DRef DPCTLSyclPlatformRef object to be copied.
42+ * @return A new DPCTLSyclPlatformRef created by copying the passed in
43+ * DPCTLSyclPlatformRef object.
44+ */
45+ DPCTL_API
46+ __dpctl_give DPCTLSyclPlatformRef
47+ DPCTLPlatform_Copy (__dpctl_keep const DPCTLSyclPlatformRef PRef);
48+
49+ /* !
50+ * @brief Creates a new DPCTLSyclPlatformRef for a SYCL platform constructed
51+ * using SYCL's default_selector.
52+ *
53+ * @return A new DPCTLSyclPlatformRef pointer wrapping a SYCL platform object.
54+ */
55+ DPCTL_API
56+ __dpctl_give DPCTLSyclPlatformRef DPCTLPlatform_Create ();
57+
58+ /* !
59+ * @brief Creates a new DPCTLSyclPlatformRef for a SYCL platform constructed
60+ * using the device_selector wrapped by DPCTLSyclDeviceSelectorRef.
61+ *
62+ * @param DSRef An opaque pointer to a SYCL device_selector object.
63+ * @return A new DPCTLSyclPlatformRef pointer wrapping a SYCL platform object.
64+ */
65+ DPCTL_API
66+ __dpctl_give DPCTLSyclPlatformRef DPCTLPlatform_CreateFromSelector (
67+ __dpctl_keep const DPCTLSyclDeviceSelectorRef DSRef);
68+
3769/* !
3870 * @brief Deletes the DPCTLSyclProgramRef pointer.
3971 *
@@ -43,46 +75,58 @@ DPCTL_API
4375void DPCTLPlatform_Delete (__dpctl_take DPCTLSyclPlatformRef PRef);
4476
4577/* !
46- * @brief Returns the number of non-host type sycl::platform available on the
47- * system .
78+ * @brief Returns a DPCTLSyclBackendType enum value identifying the SYCL
79+ * backend associated with the platform .
4880 *
49- * @return The number of available sycl::platforms.
81+ * @param PRef Opaque pointer to a sycl::platform
82+ * @return A DPCTLSyclBackendType enum value identifying the SYCL backend
83+ * associated with the platform.
5084 */
5185DPCTL_API
52- size_t DPCTLPlatform_GetNumNonHostPlatforms ();
86+ DPCTLSyclBackendType
87+ DPCTLPlatform_GetBackend (__dpctl_keep const DPCTLSyclPlatformRef PRef);
5388
5489/* !
55- * @brief Returns the number of unique non-host sycl backends on the system .
90+ * @brief Returns a C string for the platform name .
5691 *
57- * @return The number of unique sycl backends.
92+ * @param PRef Opaque pointer to a sycl::platform
93+ * @return A C string containing the name of the sycl::platform.
5894 */
5995DPCTL_API
60- size_t DPCTLPlatform_GetNumNonHostBackends ();
96+ __dpctl_give const char *
97+ DPCTLPlatform_GetName (__dpctl_keep const DPCTLSyclPlatformRef PRef);
6198
6299/* !
63- * @brief Returns an array of the unique non-host DPCTLSyclBackendType values on
64- * the system.
100+ * @brief Returns a C string corresponding to the vendor providing the platform.
65101 *
66- * @return An array of DPCTLSyclBackendType enum values.
102+ * @param PRef Opaque pointer to a sycl::platform
103+ * @return A C string containing the name of the vendor provifing the
104+ * platform.
67105 */
68106DPCTL_API
69- __dpctl_give DPCTLSyclBackendType *DPCTLPlatform_GetListOfNonHostBackends ();
107+ __dpctl_give const char *
108+ DPCTLPlatform_GetVendor (__dpctl_keep const DPCTLSyclPlatformRef PRef);
70109
71110/* !
72- * @brief Frees an array of DPCTLSyclBackendType enum values.
111+ * @brief Returns the software driver version of the sycl::platform as a C
112+ * string.
73113 *
74- * @param BEArr An array of DPCTLSyclBackendType enum values to be
75- * freed.
114+ * @param PRef Opaque pointer to a sycl::platform
115+ * @return A C string containing the software driver version of the device
116+ * associated with the platform.
76117 */
77118DPCTL_API
78- void DPCTLPlatform_DeleteListOfBackends (
79- __dpctl_take DPCTLSyclBackendType *BEArr );
119+ __dpctl_give const char *
120+ DPCTLPlatform_GetVersion (__dpctl_keep const DPCTLSyclPlatformRef PRef );
80121
81122/* !
82- * @brief Prints out some selected info about all sycl::platform on the system.
123+ * @brief Returns an opaque pointer to a vector of SYCL platforms available on
124+ * the system.
83125 *
126+ * @return A #DPCTLPlatformVectorRef containing #DPCTLSyclPlatformRef
127+ * objects.
84128 */
85129DPCTL_API
86- void DPCTLPlatform_DumpInfo ();
130+ __dpctl_give DPCTLPlatformVectorRef DPCTLPlatform_GetPlatforms ();
87131
88132DPCTL_C_EXTERN_C_END
0 commit comments