/// <summary>
 /// Sets the parameters for an external semaphore signal node in the given graphExec<para/>
 /// Sets the parameters of an external semaphore signal node in an executable graph \p hGraphExec.
 /// The node is identified by the corresponding node \p hNode in the
 /// non-executable graph, from which the executable graph was instantiated.<para/>
 /// hNode must not have been removed from the original graph.<para/>
 /// The modifications only affect future launches of \p hGraphExec. Already
 /// enqueued or running launches of \p hGraphExec are not affected by this call.
 /// hNode is also not modified by this call.<para/>
 /// Changing \p nodeParams->numExtSems is not supported.
 /// </summary>
 public void SetParams(CUgraphNode hNode, CudaExtSemSignalNodeParams nodeParams)
 {
     res = DriverAPINativeMethods.GraphManagment.cuGraphExecExternalSemaphoresSignalNodeSetParams(_graph, hNode, nodeParams);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphExecExternalSemaphoresSignalNodeSetParams", res));
     if (res != CUResult.Success)
     {
         throw new CudaException(res);
     }
 }
Exemple #2
0
        /// <summary>
        /// Creates an external semaphore signal node and adds it to a graph<para/>
        /// Creates a new external semaphore signal node and adds it to \p hGraph with \p
        /// numDependencies dependencies specified via \p dependencies and arguments specified
        /// in \p nodeParams.It is possible for \p numDependencies to be 0, in which case the
        /// node will be placed at the root of the graph. \p dependencies may not have any
        /// duplicate entries. A handle to the new node will be returned in \p phGraphNode.
        /// </summary>
        /// <param name="dependencies">Dependencies of the node</param>
        /// <param name="nodeParams">Parameters for the node</param>
        /// <returns>Returns newly created node</returns>
        public CUgraphNode AddExternalSemaphoresSignalNode(CUgraphNode[] dependencies, CudaExtSemSignalNodeParams nodeParams)
        {
            CUgraphNode node            = new CUgraphNode();
            SizeT       numDependencies = 0;

            if (dependencies != null)
            {
                numDependencies = dependencies.Length;
            }

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

            return(node);
        }