Example #1
0
        /// <summary>
        /// Creates a new CudaGraph
        /// </summary>
        public CudaGraph()
        {
            _graph = new CUgraph();

            res = DriverAPINativeMethods.GraphManagment.cuGraphCreate(ref _graph, 0);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphCreate", res));
            if (res != CUResult.Success)
            {
                throw new CudaException(res);
            }
        }
Example #2
0
        /// <summary>
        /// Clones a graph<para/>
        /// This function creates a copy of the original Graph.
        /// All parameters are copied into the cloned graph. The original graph may be modified
        /// after this call without affecting the clone.<para/>
        /// Child graph nodes in the original graph are recursively copied into the clone.
        /// </summary>
        public CudaGraph Clone()
        {
            CUgraph clone = new CUgraph();

            res = DriverAPINativeMethods.GraphManagment.cuGraphClone(ref clone, _graph);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphClone", res));
            if (res != CUResult.Success)
            {
                throw new CudaException(res);
            }

            return(new CudaGraph(clone));
        }
Example #3
0
 /// <summary>
 /// For clone graph method
 /// </summary>
 internal CudaGraph(CUgraph graph)
 {
     _graph = graph;
 }