public static KernelResult Run(this JittedFunction function, dim3 gridDim, dim3 blockDim, IEnumerable <KernelArgument> args) { function.AssertNotNull(); args = args ?? Seq.Empty <KernelArgument>().ToArray(); CudaDriver.Ensure(); var invocation = new KernelInvocation(function, args); return(invocation.Launch(gridDim, blockDim)); }
public static Object Invoke(this JittedFunction function, dim3 gridDim, dim3 blockDim, IEnumerable <KernelArgument> args) { function.AssertNotNull(); args = args ?? Seq.Empty <KernelArgument>().ToArray(); CudaDriver.Ensure(); var invocation = new KernelInvocation(function, args); var invocation_result = invocation.Launch(gridDim, blockDim); var result = invocation_result.Result; args.ForEach(arg => arg.Dispose()); return(result); }
public KernelResult Run(dim3 gridDim, dim3 blockDim, IEnumerable <KernelArgument> args) { var invocation = new KernelInvocation(this, args); return(invocation.Launch(gridDim, blockDim)); }