Library/ManagedCuda/CudaGraph.cs
/// <summary>
/// Creates a memcpy node and adds it to a graph<para/>
/// Creates a new memcpy node and adds it to graph with
/// dependencies specified via dependencies.<para/>
/// It is possible for dependencies to be null, in which case the node will be placed
/// at the root of the graph. Dependencies may not have any duplicate entries.
/// A handle to the new node will be returned.<para/>
/// When the graph is launched, the node will perform the memcpy described by copyParams.
/// See ::cuMemcpy3D() for a description of the structure and its restrictions.<para/>
/// Memcpy nodes have some additional restrictions with regards to managed memory, if the
/// system contains at least one device which has a zero value for the device attribute
/// ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If one or more of the operands refer
/// to managed memory, then using the memory type ::CU_MEMORYTYPE_UNIFIED is disallowed
/// for those operand(s). The managed memory will be treated as residing on either the
/// host or the device, depending on which memory type is specified.
/// </summary>
/// <param name="dependencies">can be null</param>
/// <param name="copyParams">Parameters for the memory copy</param>
/// <param name="ctx">Cuda context used for the operation</param>
/// <returns>A handle to the new node will be returned.</returns>
Creates a memcpy node and adds it to a graph
Creates a new memcpy node and adds it to graph with
dependencies specified via dependencies.
It is possible for dependencies to be null, in which case the node will be placed
at the root of the graph. Dependencies may not have any duplicate entries.
A handle to the new node will be returned.
When the graph is launched, the node will perform the memcpy described by copyParams.
See ::cuMemcpy3D() for a description of the structure and its restrictions.
Memcpy nodes have some additional restrictions with regards to managed memory, if the
system contains at least one device which has a zero value for the device attribute
::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If one or more of the operands refer
to managed memory, then using the memory type ::CU_MEMORYTYPE_UNIFIED is disallowed
for those operand(s). The managed memory will be treated as residing on either the
host or the device, depending on which memory type is specified.
Creates a memcpy node and adds it to a graph Creates a new memcpy node and adds it to graph with dependencies specified via dependencies . It is possible for dependencies to be null in which case the node will be placed at the root of the graph . Dependencies may not have any duplicate entries . A handle to the new node will be returned . When the graph is launched the node will perform the memcpy described by copyParams . See :: cuMemcpy3D () for a description of the structure and its restrictions . Memcpy nodes have some additional restrictions with regards to managed memory if the system contains at least one device which has a zero value for the device attribute :: CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS . If one or more of the operands refer to managed memory then using the memory type :: CU_MEMORYTYPE_UNIFIED is disallowed for those operand ( s ) . The managed memory will be treated as residing on either the host or the device depending on which memory type is specified .
public CUgraphNode AddMemcpyNode(CUgraphNode[] dependencies, CUDAMemCpy3D copyParams, CudaContext ctx)
        {
            CUgraphNode node = new CUgraphNode();
            SizeT numDependencies = 0;
            if (dependencies != null)
                numDependencies = dependencies.Length;
            res = DriverAPINativeMethods.GraphManagment.cuGraphAddMemcpyNode(ref node, _graph, dependencies, numDependencies, ref copyParams, ctx.Context);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphAddMemcpyNode", res));
            if (res != CUResult.Success) throw new CudaException(res);
            return node;
        }
public CUgraphNode AddMemcpyNode ( CUgraphNode [ ] dependencies , CUDAMemCpy3D copyParams , CudaContext ctx ) { CUgraphNode node = new CUgraphNode ( ) ; SizeT numDependencies = 0 ; if ( dependencies != null ) numDependencies = dependencies . Length ; res = DriverAPINativeMethods . GraphManagment . cuGraphAddMemcpyNode ( ref node , _graph , dependencies , numDependencies , ref copyParams , ctx . Context ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return node ; }
Creates a memcpy node and adds it to a graph
Creates a new memcpy node and adds it to graph with
dependencies specified via dependencies.
Creates a memcpy node and adds it to a graph Creates a new memcpy node and adds it to graph with dependencies specified via dependencies .
A handle to the new node will be returned.
A handle to the new node will be returned .
dependencies
CUgraphNode[]
can be null
can be null
copyParams
CUDAMemCpy3D
Parameters for the memory copy
Parameters for the memory copy
ctx
CudaContext
Cuda context used for the operation
Cuda context used for the operation