Skip to content

Commit 26c2ff9

Browse files
committed
Fix format
1 parent 47e652e commit 26c2ff9

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

cudax/include/cuda/experimental/__driver/driver_api.cuh

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
// #define'd version aliases in cuda.h (e.g. #define cuFoo cuFoo_v2).
3737
// The ## operator suppresses macro expansion of the function name, so this is
3838
// safe even for names that are #define'd to versioned variants.
39-
# define _CUDAX_GET_DRIVER_FUNCTION(pfn_name, major, minor) \
40-
reinterpret_cast<PFN_##pfn_name##_v##major##0##minor##0>( \
39+
# define _CUDAX_GET_DRIVER_FUNCTION(pfn_name, major, minor) \
40+
reinterpret_cast<PFN_##pfn_name##_v##major##0##minor##0>( \
4141
::cuda::__driver::__get_driver_entry_point(#pfn_name, major, minor))
4242

4343
namespace cuda::experimental::__driver
@@ -125,8 +125,8 @@ namespace cuda::experimental::__driver
125125

126126
// ── Graph: event record node ────────────────────────────────────────────────
127127

128-
[[nodiscard]] _CCCL_HOST_API inline ::CUgraphNode __graphAddEventRecordNode(
129-
::CUgraph __graph, const ::CUgraphNode* __deps, ::cuda::std::size_t __ndeps, ::CUevent __ev)
128+
[[nodiscard]] _CCCL_HOST_API inline ::CUgraphNode
129+
__graphAddEventRecordNode(::CUgraph __graph, const ::CUgraphNode* __deps, ::cuda::std::size_t __ndeps, ::CUevent __ev)
130130
{
131131
static auto __driver_fn = _CUDAX_GET_DRIVER_FUNCTION(cuGraphAddEventRecordNode, 11, 1);
132132
::CUgraphNode __node{};
@@ -255,10 +255,7 @@ __graphAddEmptyNode(::CUgraph __graph, const ::CUgraphNode* __deps, ::cuda::std:
255255
// ── Graph: add dependencies ─────────────────────────────────────────────────
256256

257257
_CCCL_HOST_API inline void __graphAddDependencies(
258-
::CUgraph __graph,
259-
const ::CUgraphNode* __from,
260-
const ::CUgraphNode* __to,
261-
::cuda::std::size_t __ndeps)
258+
::CUgraph __graph, const ::CUgraphNode* __from, const ::CUgraphNode* __to, ::cuda::std::size_t __ndeps)
262259
{
263260
static auto __driver_fn = _CUDAX_GET_DRIVER_FUNCTION(cuGraphAddDependencies, 10, 0);
264261
::cuda::__driver::__call_driver_fn(__driver_fn, "Failed to add graph dependencies", __graph, __from, __to, __ndeps);
@@ -272,8 +269,7 @@ _CCCL_HOST_API inline void __graphAddDependencies(
272269
::cuda::std::size_t __ndeps,
273270
const ::CUgraphEdgeData* __edge_data)
274271
{
275-
static auto __driver_fn =
276-
_CUDAX_GET_DRIVER_FUNCTION(cuGraphAddDependencies, 12, 3);
272+
static auto __driver_fn = _CUDAX_GET_DRIVER_FUNCTION(cuGraphAddDependencies, 12, 3);
277273
::cuda::__driver::__call_driver_fn(
278274
__driver_fn, "Failed to add graph dependencies", __graph, __from, __to, __edge_data, __ndeps);
279275
}
@@ -300,8 +296,7 @@ _CCCL_HOST_API inline void __streamBeginCaptureToGraph(
300296
::cuda::std::size_t __ndeps,
301297
::CUstreamCaptureMode __mode)
302298
{
303-
static auto __driver_fn =
304-
_CUDAX_GET_DRIVER_FUNCTION(cuStreamBeginCaptureToGraph, 12, 3);
299+
static auto __driver_fn = _CUDAX_GET_DRIVER_FUNCTION(cuStreamBeginCaptureToGraph, 12, 3);
305300
::cuda::__driver::__call_driver_fn(
306301
__driver_fn, "Failed to begin stream capture to graph", __stream, __graph, __deps, nullptr, __ndeps, __mode);
307302
}
@@ -321,8 +316,7 @@ __streamGetCaptureInfo(::CUstream __stream, const ::CUgraphEdgeData** __edge_dat
321316
{
322317
__stream_capture_info __info{};
323318
# if _CCCL_CTK_AT_LEAST(12, 4)
324-
static auto __driver_fn =
325-
_CUDAX_GET_DRIVER_FUNCTION(cuStreamGetCaptureInfo, 12, 3);
319+
static auto __driver_fn = _CUDAX_GET_DRIVER_FUNCTION(cuStreamGetCaptureInfo, 12, 3);
326320
::cuda::__driver::__call_driver_fn(
327321
__driver_fn,
328322
"Failed to get stream capture info",
@@ -336,8 +330,7 @@ __streamGetCaptureInfo(::CUstream __stream, const ::CUgraphEdgeData** __edge_dat
336330
# else
337331
_CCCL_ASSERT(__edge_data_out == nullptr, "Edge data requires CUDA Toolkit 12.4 or later");
338332
__info.__edge_data = nullptr;
339-
static auto __driver_fn =
340-
_CUDAX_GET_DRIVER_FUNCTION(cuStreamGetCaptureInfo, 11, 3);
333+
static auto __driver_fn = _CUDAX_GET_DRIVER_FUNCTION(cuStreamGetCaptureInfo, 11, 3);
341334
::cuda::__driver::__call_driver_fn(
342335
__driver_fn,
343336
"Failed to get stream capture info",

0 commit comments

Comments
 (0)