MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / kernel_node_params

Method kernel_node_params

crates/cust/src/graph.rs:460–472  ·  view source on GitHub ↗

Retrieves the invocation parameters for a kernel invocation node. # Panics Panics if the node is invalid or if the node is not a kernel invocation node.

(&mut self, node: GraphNode)

Source from the content-addressed store, hash-verified

458 ///
459 /// Panics if the node is invalid or if the node is not a kernel invocation node.
460 pub fn kernel_node_params(&mut self, node: GraphNode) -> CudaResult<KernelInvocation> {
461 self.check_deps_are_valid("kernel_node_params", &[node])?;
462 assert_eq!(
463 self.node_type(node)?,
464 GraphNodeType::KernelInvocation,
465 "Node given to `kernel_node_params` was not a kernel invocation node"
466 );
467 unsafe {
468 let mut params = MaybeUninit::uninit();
469 cuda::cuGraphKernelNodeGetParams(node.to_raw(), params.as_mut_ptr());
470 Ok(KernelInvocation::from_raw(params.assume_init()))
471 }
472 }
473
474 /// Creates a new [`Graph`] from a raw handle.
475 ///

Callers

nothing calls this directly

Calls 3

check_deps_are_validMethod · 0.80
to_rawMethod · 0.45
as_mut_ptrMethod · 0.45

Tested by

no test coverage detected