37
37
38
38
DPCTL_C_EXTERN_C_BEGIN
39
39
40
+ /* *
41
+ * @defgroup ContextInterface Context class C wrapper
42
+ */
43
+
40
44
/* !
41
45
* @brief Constructs a new SYCL context for the given SYCL device using the
42
46
* optional async error handler and properties bit flags.
@@ -49,6 +53,7 @@ DPCTL_C_EXTERN_C_BEGIN
49
53
* context properties. Currently, dpctl does not use
50
54
* this argument.
51
55
* @return A new opaque pointer wrapping a SYCL context.
56
+ * @ingroup ContextInterface
52
57
*/
53
58
DPCTL_API
54
59
__dpctl_give DPCTLSyclContextRef
@@ -69,6 +74,7 @@ DPCTLContext_Create(__dpctl_keep const DPCTLSyclDeviceRef DRef,
69
74
* context properties. Currently, dpctl does not use
70
75
* this argument.
71
76
* @return A new opaque pointer wrapping a SYCL context.
77
+ * @ingroup ContextInterface
72
78
*/
73
79
DPCTL_API
74
80
__dpctl_give DPCTLSyclContextRef
@@ -83,6 +89,7 @@ DPCTLContext_CreateFromDevices(__dpctl_keep const DPCTLDeviceVectorRef DVRef,
83
89
* @param CtxRef1 First opaque pointer to the sycl context.
84
90
* @param CtxRef2 Second opaque pointer to the sycl context.
85
91
* @return True if the underlying sycl::context are same, false otherwise.
92
+ * @ingroup ContextInterface
86
93
*/
87
94
DPCTL_API
88
95
bool DPCTLContext_AreEq (__dpctl_keep const DPCTLSyclContextRef CtxRef1,
@@ -94,6 +101,7 @@ bool DPCTLContext_AreEq(__dpctl_keep const DPCTLSyclContextRef CtxRef1,
94
101
* @param CRef DPCTLSyclContextRef object to be copied.
95
102
* @return A new DPCTLSyclContextRef created by copying the passed in
96
103
* DPCTLSyclContextRef object.
104
+ * @ingroup ContextInterface
97
105
*/
98
106
DPCTL_API
99
107
__dpctl_give DPCTLSyclContextRef
@@ -105,6 +113,7 @@ DPCTLContext_Copy(__dpctl_keep const DPCTLSyclContextRef CRef);
105
113
*
106
114
* @param CRef DPCTLSyclContexRef object to query.
107
115
* @return A positive count on success or zero on error.
116
+ * @ingroup ContextInterface
108
117
*/
109
118
DPCTL_API
110
119
size_t DPCTLContext_DeviceCount (__dpctl_keep const DPCTLSyclContextRef CRef);
@@ -115,6 +124,7 @@ size_t DPCTLContext_DeviceCount(__dpctl_keep const DPCTLSyclContextRef CRef);
115
124
*
116
125
* @param CRef DPCTLSyclContexRef object to query.
117
126
* @return A DPCTLDeviceVectorRef with devices associated with given CRef.
127
+ * @ingroup ContextInterface
118
128
*/
119
129
DPCTL_API
120
130
__dpctl_give DPCTLDeviceVectorRef
@@ -125,6 +135,7 @@ DPCTLContext_GetDevices(__dpctl_keep const DPCTLSyclContextRef CRef);
125
135
*
126
136
* @param CtxRef An opaque pointer to a sycl::context.
127
137
* @return True if the SYCL context is a host context, else False.
138
+ * @ingroup ContextInterface
128
139
*/
129
140
DPCTL_API
130
141
bool DPCTLContext_IsHost (__dpctl_keep const DPCTLSyclContextRef CtxRef);
@@ -135,6 +146,7 @@ bool DPCTLContext_IsHost(__dpctl_keep const DPCTLSyclContextRef CtxRef);
135
146
* @param CtxRef An opaque pointer to a sycl::context.
136
147
* @return The sycl backend for the DPCTLSyclContextRef returned as
137
148
* a DPCTLSyclBackendType enum type.
149
+ * @ingroup ContextInterface
138
150
*/
139
151
DPCTL_API
140
152
DPCTLSyclBackendType
@@ -144,6 +156,7 @@ DPCTLContext_GetBackend(__dpctl_keep const DPCTLSyclContextRef CtxRef);
144
156
* @brief Delete the pointer after casting it to sycl::context
145
157
*
146
158
* @param CtxRef The DPCTLSyclContextRef pointer to be deleted.
159
+ * @ingroup ContextInterface
147
160
*/
148
161
DPCTL_API
149
162
void DPCTLContext_Delete (__dpctl_take DPCTLSyclContextRef CtxRef);
0 commit comments