示例#1
0
 /// <summary>
 /// Constructs a new CPU-based runtime context for parallel processing.
 /// </summary>
 /// <param name="accelerator">The target CPU accelerator.</param>
 public CPURuntimeWarpContext(CPUAccelerator accelerator)
 {
     Debug.Assert(accelerator != null, "Invalid accelerator");
     WarpSize       = accelerator.WarpSize;
     shuffleBarrier = new Barrier(WarpSize);
     shuffleBank    = accelerator.Allocate <int>(WarpSize);
 }
 /// <summary>
 /// Constructs a new CPU-based runtime context for parallel processing.
 /// </summary>
 /// <param name="accelerator">The target CPU accelerator.</param>
 public CPURuntimeGroupContext(CPUAccelerator accelerator)
 {
     Debug.Assert(accelerator != null, "Invalid accelerator");
     Accelerator        = accelerator;
     groupBarrier       = new Barrier(0);
     sharedMemoryBuffer = new MemoryBufferCache(accelerator);
     broadcastBuffer    = accelerator.Allocate <byte>(BroadcastBufferSize);
 }