30
30
#include " Support/MemOwnershipAttrs.h"
31
31
#include " dpctl_data_types.h"
32
32
#include " dpctl_sycl_enum_types.h"
33
+ #include " dpctl_sycl_platform_manager.h"
33
34
#include " dpctl_sycl_types.h"
34
35
35
36
DPCTL_C_EXTERN_C_BEGIN
36
37
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
+
37
69
/* !
38
70
* @brief Deletes the DPCTLSyclProgramRef pointer.
39
71
*
@@ -43,46 +75,58 @@ DPCTL_API
43
75
void DPCTLPlatform_Delete (__dpctl_take DPCTLSyclPlatformRef PRef);
44
76
45
77
/* !
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 .
48
80
*
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.
50
84
*/
51
85
DPCTL_API
52
- size_t DPCTLPlatform_GetNumNonHostPlatforms ();
86
+ DPCTLSyclBackendType
87
+ DPCTLPlatform_GetBackend (__dpctl_keep const DPCTLSyclPlatformRef PRef);
53
88
54
89
/* !
55
- * @brief Returns the number of unique non-host sycl backends on the system .
90
+ * @brief Returns a C string for the platform name .
56
91
*
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.
58
94
*/
59
95
DPCTL_API
60
- size_t DPCTLPlatform_GetNumNonHostBackends ();
96
+ __dpctl_give const char *
97
+ DPCTLPlatform_GetName (__dpctl_keep const DPCTLSyclPlatformRef PRef);
61
98
62
99
/* !
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.
65
101
*
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.
67
105
*/
68
106
DPCTL_API
69
- __dpctl_give DPCTLSyclBackendType *DPCTLPlatform_GetListOfNonHostBackends ();
107
+ __dpctl_give const char *
108
+ DPCTLPlatform_GetVendor (__dpctl_keep const DPCTLSyclPlatformRef PRef);
70
109
71
110
/* !
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.
73
113
*
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.
76
117
*/
77
118
DPCTL_API
78
- void DPCTLPlatform_DeleteListOfBackends (
79
- __dpctl_take DPCTLSyclBackendType *BEArr );
119
+ __dpctl_give const char *
120
+ DPCTLPlatform_GetVersion (__dpctl_keep const DPCTLSyclPlatformRef PRef );
80
121
81
122
/* !
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.
83
125
*
126
+ * @return A #DPCTLPlatformVectorRef containing #DPCTLSyclPlatformRef
127
+ * objects.
84
128
*/
85
129
DPCTL_API
86
- void DPCTLPlatform_DumpInfo ();
130
+ __dpctl_give DPCTLPlatformVectorRef DPCTLPlatform_GetPlatforms ();
87
131
88
132
DPCTL_C_EXTERN_C_END
0 commit comments