Skip to content

Commit 3a459ee

Browse files
committed
Document enum values for dpctl enums directly in docstring
Better and more accurate formatting
1 parent b4d3f8d commit 3a459ee

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

dpctl/enum_types.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@
2727

2828
class device_type(Enum):
2929
"""
30-
An enumeration of supported SYCL device types.
30+
An :class:`enum.Enum` of supported SYCL device types.
31+
32+
Accepted enum values are
33+
34+
``all``:
35+
``accelerator``
36+
``automatic``
37+
``cpu``
38+
``custom``
39+
``gpu``
3140
3241
:Example:
3342
.. code-block:: python
@@ -54,7 +63,15 @@ class device_type(Enum):
5463

5564
class backend_type(Enum):
5665
"""
57-
An enumeration of supported SYCL backends.
66+
An :class:`enum.Enum` of supported SYCL backends.
67+
68+
Accepted enum values are
69+
70+
``all``:
71+
``cuda``
72+
``hip``
73+
``level_zero``
74+
``opencl``
5875
5976
:Example:
6077
.. code-block:: python
@@ -76,7 +93,7 @@ class backend_type(Enum):
7693

7794
class event_status_type(Enum):
7895
"""
79-
An enumeration of SYCL event states.
96+
An :class:`enum.Enum` of SYCL event states.
8097
8198
:Example:
8299
.. code-block:: python
@@ -95,7 +112,14 @@ class event_status_type(Enum):
95112

96113
class global_mem_cache_type(Enum):
97114
"""
98-
An enumeration of global memory cache types for a device.
115+
An :class:`enum.Enum` of global memory cache types for a device.
116+
117+
Accepted enum values are
118+
119+
``indeterminate``:
120+
``none``
121+
``read_only``
122+
``read_write``
99123
100124
:Example:
101125
.. code-block:: python

0 commit comments

Comments
 (0)