Library/ManagedCuda/CudaGraph.cs
/// <summary>
/// Adds dependency edges to a graph
/// Elements in from and to at corresponding indices define a dependency.<para/>
/// Each node in from and to must belong to this Graph.<para/>
/// Specifying an existing dependency will return an error.
/// </summary>
/// <param name="from"></param>
/// <param name="to"></param>
Adds dependency edges to a graph
Elements in from and to at corresponding indices define a dependency.
Each node in from and to must belong to this Graph.
Specifying an existing dependency will return an error.
Adds dependency edges to a graph Elements in from and to at corresponding indices define a dependency . Each node in from and to must belong to this Graph . Specifying an existing dependency will return an error .
public void AddDependencies(CUgraphNode[] from, CUgraphNode[] to)
        {
            if (from.Length != to.Length)
            {
                throw new ArgumentException("from and to must have equal size!");
            }
            SizeT numNodes = from.Length;
            res = DriverAPINativeMethods.GraphManagment.cuGraphAddDependencies(_graph, from, to, numNodes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphAddDependencies", res));
            if (res != CUResult.Success) throw new CudaException(res);
        }
public void AddDependencies ( CUgraphNode [ ] from , CUgraphNode [ ] to ) { if ( from . Length != to . Length ) { throw new ArgumentException ( " " ) ; } SizeT numNodes = from . Length ; res = DriverAPINativeMethods . GraphManagment . cuGraphAddDependencies ( _graph , from , to , numNodes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Adds dependency edges to a graph
Elements in from and to at corresponding indices define a dependency.
Adds dependency edges to a graph Elements in from and to at corresponding indices define a dependency .
from
CUgraphNode[]
None
to
CUgraphNode[]
None