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)
| 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 | /// |
nothing calls this directly
no test coverage detected