Skip to content

Commit 54aa641

Browse files
author
Diptorup Deb
committed
Various doc string updates to C APi files.
1 parent a8ea6ef commit 54aa641

17 files changed

+212
-70
lines changed

dpctl-capi/helper/include/dpctl_vector_macros.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
//
1919
//===----------------------------------------------------------------------===//
2020
///
21-
/// \file These macros are used in dpctl_vector_templ.cpp. They help build the
22-
/// function signatures for the functions defined in dpctl_vector_templ.cpp.
21+
/// \file
22+
/// A set of macros used inside dpctl_vector_templ.cpp. The macros help build
23+
/// the function signatures for the functions defined in dpctl_vector_templ.cpp.
2324
///
2425
//===----------------------------------------------------------------------===//
2526

dpctl-capi/include/Support/MemOwnershipAttrs.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,14 @@
2121
/// \file
2222
/// This file defines a group of macros that serve as attributes indicating the
2323
/// type of ownership of a pointer. The macros are modeled after similar
24-
/// attributes defines in Integer Set Library (isl) and serve the purpose of
24+
/// attributes defined in Integer Set Library (isl) and serve the purpose of
2525
/// helping a programmer understand the semantics of a dpctl function.
2626
///
2727
//===----------------------------------------------------------------------===//
2828

2929
#pragma once
3030

3131
/**
32-
* @defgroup MEM_MGMT_ATTR_MACROS Memory management attributes.
33-
*
34-
* @{
35-
*/
36-
37-
/*!
3832
* @def __dpctl_give
3933
* @brief The __dpctl_give attribute indicates that a new object is returned and
4034
* the caller now owns the object.
@@ -44,7 +38,6 @@
4438
* free the object, he/she should make sure to use it exactly once as a value
4539
* for a __dpctl_take argument. However, the user is free to use the object as
4640
* he/she likes as a value to __dpctl_keep arguments.
47-
*
4841
*/
4942
#ifndef __dpctl_give
5043
#define __dpctl_give
@@ -60,27 +53,22 @@
6053
* function. If the pointer annotated with __dpctl_take is NULL then it is
6154
* treated as an error, since it may prevent the normal behavior of the
6255
* function.
63-
*
6456
*/
6557
#ifndef __dpctl_take
6658
#define __dpctl_take
6759
#endif
60+
#ifndef __dpctl_keep
6861
/*!
6962
* @def __dpctl_keep
7063
* @brief The __dpctl_keep attribute indicates that the function only uses the
7164
* object and does not destroy it before returning.
72-
*
7365
*/
74-
#ifndef __dpctl_keep
7566
#define __dpctl_keep
7667
#endif
7768
/*!
7869
* @def __dpctl_null
7970
* @brief The __dpctl_null attribute indicates that a NULL value is returned.
80-
*
8171
*/
8272
#ifndef __dpctl_null
8373
#define __dpctl_null
8474
#endif
85-
86-
/** @} */

dpctl-capi/include/dpctl_sycl_context_interface.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737

3838
DPCTL_C_EXTERN_C_BEGIN
3939

40+
/**
41+
* @defgroup ContextInterface Context class C wrapper
42+
*/
43+
4044
/*!
4145
* @brief Constructs a new SYCL context for the given SYCL device using the
4246
* optional async error handler and properties bit flags.
@@ -49,6 +53,7 @@ DPCTL_C_EXTERN_C_BEGIN
4953
* context properties. Currently, dpctl does not use
5054
* this argument.
5155
* @return A new opaque pointer wrapping a SYCL context.
56+
* @ingroup ContextInterface
5257
*/
5358
DPCTL_API
5459
__dpctl_give DPCTLSyclContextRef
@@ -69,6 +74,7 @@ DPCTLContext_Create(__dpctl_keep const DPCTLSyclDeviceRef DRef,
6974
* context properties. Currently, dpctl does not use
7075
* this argument.
7176
* @return A new opaque pointer wrapping a SYCL context.
77+
* @ingroup ContextInterface
7278
*/
7379
DPCTL_API
7480
__dpctl_give DPCTLSyclContextRef
@@ -83,6 +89,7 @@ DPCTLContext_CreateFromDevices(__dpctl_keep const DPCTLDeviceVectorRef DVRef,
8389
* @param CtxRef1 First opaque pointer to the sycl context.
8490
* @param CtxRef2 Second opaque pointer to the sycl context.
8591
* @return True if the underlying sycl::context are same, false otherwise.
92+
* @ingroup ContextInterface
8693
*/
8794
DPCTL_API
8895
bool DPCTLContext_AreEq(__dpctl_keep const DPCTLSyclContextRef CtxRef1,
@@ -94,6 +101,7 @@ bool DPCTLContext_AreEq(__dpctl_keep const DPCTLSyclContextRef CtxRef1,
94101
* @param CRef DPCTLSyclContextRef object to be copied.
95102
* @return A new DPCTLSyclContextRef created by copying the passed in
96103
* DPCTLSyclContextRef object.
104+
* @ingroup ContextInterface
97105
*/
98106
DPCTL_API
99107
__dpctl_give DPCTLSyclContextRef
@@ -105,6 +113,7 @@ DPCTLContext_Copy(__dpctl_keep const DPCTLSyclContextRef CRef);
105113
*
106114
* @param CRef DPCTLSyclContexRef object to query.
107115
* @return A positive count on success or zero on error.
116+
* @ingroup ContextInterface
108117
*/
109118
DPCTL_API
110119
size_t DPCTLContext_DeviceCount(__dpctl_keep const DPCTLSyclContextRef CRef);
@@ -115,6 +124,7 @@ size_t DPCTLContext_DeviceCount(__dpctl_keep const DPCTLSyclContextRef CRef);
115124
*
116125
* @param CRef DPCTLSyclContexRef object to query.
117126
* @return A DPCTLDeviceVectorRef with devices associated with given CRef.
127+
* @ingroup ContextInterface
118128
*/
119129
DPCTL_API
120130
__dpctl_give DPCTLDeviceVectorRef
@@ -125,6 +135,7 @@ DPCTLContext_GetDevices(__dpctl_keep const DPCTLSyclContextRef CRef);
125135
*
126136
* @param CtxRef An opaque pointer to a sycl::context.
127137
* @return True if the SYCL context is a host context, else False.
138+
* @ingroup ContextInterface
128139
*/
129140
DPCTL_API
130141
bool DPCTLContext_IsHost(__dpctl_keep const DPCTLSyclContextRef CtxRef);
@@ -135,6 +146,7 @@ bool DPCTLContext_IsHost(__dpctl_keep const DPCTLSyclContextRef CtxRef);
135146
* @param CtxRef An opaque pointer to a sycl::context.
136147
* @return The sycl backend for the DPCTLSyclContextRef returned as
137148
* a DPCTLSyclBackendType enum type.
149+
* @ingroup ContextInterface
138150
*/
139151
DPCTL_API
140152
DPCTLSyclBackendType
@@ -144,6 +156,7 @@ DPCTLContext_GetBackend(__dpctl_keep const DPCTLSyclContextRef CtxRef);
144156
* @brief Delete the pointer after casting it to sycl::context
145157
*
146158
* @param CtxRef The DPCTLSyclContextRef pointer to be deleted.
159+
* @ingroup ContextInterface
147160
*/
148161
DPCTL_API
149162
void DPCTLContext_Delete(__dpctl_take DPCTLSyclContextRef CtxRef);

0 commit comments

Comments
 (0)