Skip to content

Commit 8dd05e6

Browse files
moved __cinit__ docstring into class docstrings (#383)
1 parent 525ac9a commit 8dd05e6

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

dpctl/_sycl_context.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ cdef class _SyclContext:
6969

7070

7171
cdef class SyclContext(_SyclContext):
72-
""" Python wrapper class for cl::sycl::context.
72+
""" Python class representing cl::sycl::context.
73+
74+
SyclContext() - create a context for a default device
75+
SyclContext(filter_selector_string) - create a context for specified device
76+
SyclContext(SyclDevice_instance) - create a context for the given device
77+
SyclContext((dev1, dev2, ...)) - create a context for given set of device instances
7378
"""
7479

7580
@staticmethod
@@ -176,11 +181,6 @@ cdef class SyclContext(_SyclContext):
176181
return -128
177182

178183
def __cinit__(self, arg=None):
179-
""" SyclContext() - create a context for a default device
180-
SyclContext(filter_selector_string) - create a context for specified device
181-
SyclContext(SyclDevice_instance) - create a context for the given device
182-
SyclContext((dev1, dev2, ...)) - create a context for given set of devices
183-
"""
184184
cdef int ret = 0
185185
if isinstance(arg, _SyclContext):
186186
ret = self._init_context_from__SyclContext(<_SyclContext> arg)

dpctl/_sycl_platform.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ cdef class _SyclPlatform:
6464

6565

6666
cdef class SyclPlatform(_SyclPlatform):
67-
""" Python equivalent for cl::sycl::platform class.
67+
""" Python class representing cl::sycl::platform class.
68+
69+
SyclPlatform() - create platform selected by sycl::default_selector
70+
SyclPlatform(filter_selector) - create platform selected by filter selector
6871
"""
6972
@staticmethod
7073
cdef void _init_helper(_SyclPlatform platform, DPCTLSyclPlatformRef PRef):

dpctl/_sycl_queue.pyx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,19 @@ cdef class _SyclQueue:
158158

159159

160160
cdef class SyclQueue(_SyclQueue):
161-
""" Python wrapper class for cl::sycl::queue.
161+
""" Python class representing cl::sycl::queue.
162+
163+
SyclQueue(*, /, property=None)
164+
create SyclQueue from default selector
165+
SyclQueue(filter_string, *, /, propery=None)
166+
create SyclQueue from filter selector string
167+
SyclQueue(SyclDevice, *, /, property=None)
168+
create SyclQueue from give SyclDevice automatically
169+
finding/creating SyclContext.
170+
SyclQueue(SyclContext, SyclDevice, *, /, property=None)
171+
create SyclQueue from give SyclContext, SyclDevice
162172
"""
163173
def __cinit__(self, *args, **kwargs):
164-
"""
165-
SyclQueue(*, /, property=None)
166-
create SyclQueue from default selector
167-
SyclQueue(filter_string, *, /, propery=None)
168-
create SyclQueue from filter selector string
169-
SyclQueue(SyclDevice, *, /, property=None)
170-
create SyclQueue from give SyclDevice automatically
171-
finding/creating SyclContext.
172-
SyclQueue(SyclContext, SyclDevice, *, /, property=None)
173-
create SyclQueue from give SyclContext, SyclDevice
174-
"""
175174
cdef int len_args
176175
cdef int status = 0
177176
cdef const char *filter_c_str = NULL

0 commit comments

Comments
 (0)