Library/ManagedCuda/CudaGraph.cs
/// <summary>
/// Returns a graph's dependency edges
/// </summary>
/// <param name="from"></param>
/// <param name="to"></param>
Returns a graph's dependency edges
Returns a graph ' s dependency edges
public void GetEdges(out CUgraphNode[] from, out CUgraphNode[] to)
        {
            from = null;
            to = null;
            SizeT numNodes = new SizeT();
            res = DriverAPINativeMethods.GraphManagment.cuGraphGetEdges(_graph, null, null, ref numNodes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphGetEdges", res));
            if (res != CUResult.Success) throw new CudaException(res);
            if (numNodes > 0)
            {
                from = new CUgraphNode[numNodes];
                to = new CUgraphNode[numNodes];
                res = DriverAPINativeMethods.GraphManagment.cuGraphGetEdges(_graph, from, to, ref numNodes);
                Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphGetNodes", res));
                if (res != CUResult.Success) throw new CudaException(res);
            }
        }
public void GetEdges ( out CUgraphNode [ ] from , out CUgraphNode [ ] to ) { from = null ; to = null ; SizeT numNodes = new SizeT ( ) ; res = DriverAPINativeMethods . GraphManagment . cuGraphGetEdges ( _graph , null , null , ref numNodes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; if ( numNodes > 0 ) { from = new CUgraphNode [ numNodes ] ; to = new CUgraphNode [ numNodes ] ; res = DriverAPINativeMethods . GraphManagment . cuGraphGetEdges ( _graph , from , to , ref numNodes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; } }
Returns a graph's dependency edges
Returns a graph ' s dependency edges
CUgraphNode[]
out
from
None
to
None