1212namespace cuda_core ::rt {
1313
1414#if PY_VERSION_HEX < 0x030D0000
15- extern " C" int
16- _Py_IsFinalizing (void );
15+ extern " C" int _Py_IsFinalizing (void );
1716#endif
1817
1918// Best-effort probe for interpreter shutdown.
@@ -63,8 +62,7 @@ class GILReleaseGuard {
6362 }
6463
6564 GILReleaseGuard (const GILReleaseGuard &) = delete ;
66- GILReleaseGuard &
67- operator =(const GILReleaseGuard &) = delete ;
65+ GILReleaseGuard &operator =(const GILReleaseGuard &) = delete ;
6866
6967 private:
7068 PyThreadState *tstate_ = nullptr ;
@@ -99,8 +97,7 @@ class GILAcquireGuard {
9997
10098 // Non-copyable, non-movable
10199 GILAcquireGuard (const GILAcquireGuard &) = delete ;
102- GILAcquireGuard &
103- operator =(const GILAcquireGuard &) = delete ;
100+ GILAcquireGuard &operator =(const GILAcquireGuard &) = delete ;
104101
105102 private:
106103 PyGILState_STATE gstate_;
@@ -136,8 +133,7 @@ class PendingExceptionGuard {
136133 }
137134
138135 PendingExceptionGuard (const PendingExceptionGuard &) = delete ;
139- PendingExceptionGuard &
140- operator =(const PendingExceptionGuard &) = delete ;
136+ PendingExceptionGuard &operator =(const PendingExceptionGuard &) = delete ;
141137
142138 private:
143139#if PY_VERSION_HEX >= 0x030C0000
@@ -332,23 +328,20 @@ as_py(const VaMappingHandle &h) noexcept
332328
333329// Register the Python warning category used by report_* (cuda.core.CUDAWarning).
334330// Implemented in py_report.cpp
335- void
336- register_warning_category (PyObject *category) noexcept ;
331+ void register_warning_category (PyObject *category) noexcept ;
337332
338333// Create a non-owning stream handle that prevents a Python owner from being GC'd.
339334// The owner's refcount is incremented; decremented when handle is released.
340335// The owner is responsible for keeping the stream's context alive.
341336// Implemented in stream.cpp
342- StreamHandle
343- create_stream_handle_with_owner (CUstream stream, PyObject *owner);
337+ StreamHandle create_stream_handle_with_owner (CUstream stream, PyObject *owner);
344338
345339// Create a non-owning device pointer handle that prevents a Python owner from being GC'd.
346340// The owner's refcount is incremented; decremented when handle is released.
347341// The pointer will NOT be freed when the handle is released.
348342// If owner is nullptr, equivalent to deviceptr_create_ref.
349343// Implemented in memory.cpp
350- DevicePtrHandle
351- deviceptr_create_with_owner (CUdeviceptr ptr, PyObject *owner);
344+ DevicePtrHandle deviceptr_create_with_owner (CUdeviceptr ptr, PyObject *owner);
352345
353346// Callback type for MemoryResource deallocation.
354347// Called from the shared_ptr deleter when a handle created via
@@ -359,21 +352,18 @@ using MRDeallocCallback = void (*)(PyObject *mr, CUdeviceptr ptr, size_t size, c
359352
360353// Register the MR deallocation callback.
361354// Implemented in memory.cpp
362- void
363- register_mr_dealloc_callback (MRDeallocCallback cb);
355+ void register_mr_dealloc_callback (MRDeallocCallback cb);
364356
365357// Create a device pointer handle whose destructor calls mr.deallocate()
366358// via the registered callback. The mr's refcount is incremented and
367359// decremented when the handle is released.
368360// If mr is nullptr, equivalent to deviceptr_create_ref.
369361// Implemented in memory.cpp
370- DevicePtrHandle
371- deviceptr_create_with_mr (CUdeviceptr ptr, size_t size, PyObject *mr);
362+ DevicePtrHandle deviceptr_create_with_mr (CUdeviceptr ptr, size_t size, PyObject *mr);
372363
373364// Build an OpaqueHandle from a Python object: increments its refcount now and
374365// decrements it (under the GIL) on release. The caller must hold the GIL.
375366// Implemented in graph.cpp
376- OpaqueHandle
377- make_opaque_py (PyObject *obj);
367+ OpaqueHandle make_opaque_py (PyObject *obj);
378368
379369} // namespace cuda_core::rt
0 commit comments