Library/ManagedCuda/CudaGraph.cs
/// <summary>
/// Creates a memset node and adds it to a graph<para/>
/// Creates a new memset node and adds it to graph with 
/// dependencies specified via dependencies.<para/>
/// It is possible for dependencies to be null, in which case the node will be placed
/// at the root of the graph. Dependencies may not have any duplicate entries.<para/>
/// The element size must be 1, 2, or 4 bytes.<para/>
/// When the graph is launched, the node will perform the memset described by memsetParams.
/// </summary>
/// <param name="dependencies">can be null</param>
/// <param name="memsetParams">When the graph is launched, the node will perform the memset described by memsetParams.</param>
/// <param name="ctx">Cuda context used for the operation</param>
/// <returns>A handle to the new node will be returned.</returns>
Creates a memset node and adds it to a graph
Creates a new memset node and adds it to graph with
dependencies specified via dependencies.
It is possible for dependencies to be null, in which case the node will be placed
at the root of the graph. Dependencies may not have any duplicate entries.
The element size must be 1, 2, or 4 bytes.
When the graph is launched, the node will perform the memset described by memsetParams.
Creates a memset node and adds it to a graph Creates a new memset node and adds it to graph with dependencies specified via dependencies . It is possible for dependencies to be null in which case the node will be placed at the root of the graph . Dependencies may not have any duplicate entries . The element size must be 1 2 or 4 bytes . When the graph is launched the node will perform the memset described by memsetParams .
public CUgraphNode AddMemsetNode(CUgraphNode[] dependencies, CUDA_MEMSET_NODE_PARAMS memsetParams, CudaContext ctx)
        {
            CUgraphNode node = new CUgraphNode();
            SizeT numDependencies = 0;
            if (dependencies != null)
                numDependencies = dependencies.Length;
            res = DriverAPINativeMethods.GraphManagment.cuGraphAddMemsetNode(ref node, _graph, dependencies, numDependencies, ref memsetParams, ctx.Context);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphAddMemsetNode", res));
            if (res != CUResult.Success) throw new CudaException(res);
            return node;
        }
public CUgraphNode AddMemsetNode ( CUgraphNode [ ] dependencies , CUDA_MEMSET_NODE_PARAMS memsetParams , CudaContext ctx ) { CUgraphNode node = new CUgraphNode ( ) ; SizeT numDependencies = 0 ; if ( dependencies != null ) numDependencies = dependencies . Length ; res = DriverAPINativeMethods . GraphManagment . cuGraphAddMemsetNode ( ref node , _graph , dependencies , numDependencies , ref memsetParams , ctx . Context ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return node ; }
Creates a memset node and adds it to a graph
Creates a new memset node and adds it to graph with
dependencies specified via dependencies.
Creates a memset node and adds it to a graph Creates a new memset node and adds it to graph with dependencies specified via dependencies .
A handle to the new node will be returned.
A handle to the new node will be returned .
dependencies
CUgraphNode[]
can be null
can be null
memsetParams
CUDA_MEMSET_NODE_PARAMS
When the graph is launched, the node will perform the memset described by memsetParams.
When the graph is launched the node will perform the memset described by memsetParams .
ctx
CudaContext
Cuda context used for the operation
Cuda context used for the operation