示例#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));
 }
示例#3
0
 /// <summary>
 /// Performs an OpenCL memset operation.
 /// </summary>
 /// <typeparam name="T">The element type.</typeparam>
 /// <param name="stream">The CL stream to use (must not be null)</param>
 /// <param name="value">The value to write into the buffer.</param>
 /// <param name="targetView">The target view to write to.</param>
 public static void CLMemSet <T>(
     CLStream stream,
     byte value,
     in ArrayView <T> targetView)
示例#4
0
 public readonly CLError PreLaunchKernel(
     CLStream stream,
     CLKernel kernel,
     RuntimeKernelConfig config) =>
 CLError.CL_SUCCESS;