Skip to content

Commit 891a1c5

Browse files
Define defgroup MemorySemantics for memory semantics tokens
1 parent 34a8de5 commit 891a1c5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

libsyclinterface/include/syclinterface/Support/MemOwnershipAttrs.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828

2929
#pragma once
3030

31+
/**
32+
* @defgroup MemorySemantics Self-documenting memory ownership semantics tokens
33+
*/
34+
3135
/**
3236
* @def __dpctl_give
3337
* @brief The __dpctl_give attribute indicates that a new object is returned and
@@ -38,10 +42,13 @@
3842
* free the object, he/she should make sure to use it exactly once as a value
3943
* for a __dpctl_take argument. However, the user is free to use the object as
4044
* he/she likes as a value to __dpctl_keep arguments.
45+
*
46+
* @ingroup MemorySemantics
4147
*/
4248
#ifndef __dpctl_give
4349
#define __dpctl_give
4450
#endif
51+
4552
/*!
4653
* @def __dpctl_take
4754
* @brief The __dpctl_take attribute indicates that the function "takes" over
@@ -53,21 +60,28 @@
5360
* function. If the pointer annotated with __dpctl_take is NULL then it is
5461
* treated as an error, since it may prevent the normal behavior of the
5562
* function.
63+
*
64+
* @ingroup MemorySemantics
5665
*/
5766
#ifndef __dpctl_take
5867
#define __dpctl_take
5968
#endif
60-
#ifndef __dpctl_keep
69+
6170
/*!
6271
* @def __dpctl_keep
6372
* @brief The __dpctl_keep attribute indicates that the function only uses the
6473
* object and does not destroy it before returning.
74+
*
75+
* @ingroup MemorySemantics
6576
*/
77+
#ifndef __dpctl_keep
6678
#define __dpctl_keep
6779
#endif
80+
6881
/*!
6982
* @def __dpctl_null
7083
* @brief The __dpctl_null attribute indicates that a NULL value is returned.
84+
* @ingroup MemorySemantics
7185
*/
7286
#ifndef __dpctl_null
7387
#define __dpctl_null

0 commit comments

Comments
 (0)