pub unsafe extern "C" fn cudaGraphGetEdges(
graph: cudaGraph_t,
from: *mut cudaGraphNode_t,
to: *mut cudaGraphNode_t,
edgeData: *mut cudaGraphEdgeData,
numEdges: *mut size_t,
) -> cudaError_tExpand description
Returns a graph’s dependency edges.
Returns a list of graph's dependency edges. Edges are returned via corresponding indices in from, to and edgeData; that is, the node in to[i] has a dependency on the node in from[i] with data edgeData[i]. from and to may both be NULL, in which case this function only returns the number of edges in numEdges. Otherwise, numEdges entries will be filled in. If numEdges is higher than the actual number of edges, the remaining entries in from and to will be set to NULL, and the number of edges actually returned will be written to numEdges. edgeData may alone be NULL, in which case the edges must all have default (zeroed) edge data. Attempting a losst query via NULL edgeData will result in cudaError_t::CUDA_ERROR_LOSSY_QUERY. If edgeData is non-NULL then from and to must be as well.
Note: Graph objects are not threadsafe. More here.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
graph: Graph to get the edges from.from: Location to return edge endpoints.to: Location to return edge endpoints.edgeData: Optional location to return edge data.numEdges: See description.
§Return value
See also: cudaGraphGetNodes, cudaGraphGetRootNodes, cudaGraphAddDependencies, cudaGraphRemoveDependencies, cudaGraphNodeGetDependencies, cudaGraphNodeGetDependentNodes.