Пример #1
0
 public readonly CLError PreLaunchKernel(
     CLStream stream,
     CLKernel kernel,
     RuntimeKernelConfig config) =>
 CurrentAPI.SetKernelArgumentUnsafeWithKernel(
     kernel,
     0,
     config.SharedMemoryConfig.DynamicArraySize,
     null);
Пример #2
0
 public readonly CLError PreLaunchKernel(
     CLStream stream,
     CLKernel kernel,
     RuntimeKernelConfig config)
 {
     // Allocate local buffer of desired size.
     CLException.ThrowIfFailed(
         CurrentAPI.SetKernelArgumentUnsafeWithKernel(
             kernel,
             0,
             config.SharedMemoryConfig.DynamicArraySize,
             null));
     // The length of the local buffer (in bytes).
     return(CurrentAPI.SetKernelArgument(
                kernel.KernelPtr,
                1,
                config.SharedMemoryConfig.DynamicArraySize));
 }