Library/ManagedCuda/CudaGraph.cs
/// <summary>
/// Returns a graph's nodes
/// </summary>
/// <returns></returns>
Returns a graph's nodes
Returns a graph ' s nodes
public CUgraphNode[] GetNodes()
        {
            SizeT numNodes = new SizeT();
            res = DriverAPINativeMethods.GraphManagment.cuGraphGetNodes(_graph, null, ref numNodes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphGetNodes", res));
            if (res != CUResult.Success) throw new CudaException(res);
            if (numNodes > 0)
            {
                CUgraphNode[] nodes = new CUgraphNode[numNodes];
                res = DriverAPINativeMethods.GraphManagment.cuGraphGetNodes(_graph, nodes, ref numNodes);
                Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphGetNodes", res));
                if (res != CUResult.Success) throw new CudaException(res);
                return nodes;
            }
            return null;
        }
public CUgraphNode [ ] GetNodes ( ) { SizeT numNodes = new SizeT ( ) ; res = DriverAPINativeMethods . GraphManagment . cuGraphGetNodes ( _graph , null , ref numNodes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; if ( numNodes > 0 ) { CUgraphNode [ ] nodes = new CUgraphNode [ numNodes ] ; res = DriverAPINativeMethods . GraphManagment . cuGraphGetNodes ( _graph , nodes , ref numNodes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return nodes ; } return null ; }
Returns a graph's nodes
Returns a graph ' s nodes
None