浏览代码

added vectorization notes

/main
sleal-unity 4 年前
当前提交
b85fc9eb
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
      com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Utilities/PoissonDiskSampling.cs

4
com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Utilities/PoissonDiskSampling.cs


var results = new NativeArray<bool>(
superSampledPoints.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
// The comparisons operations made in this loop are done separately from the second loop
// so that burst can automatically generate vectorized assembly code this portion of the job.
for (var i = 0; i < superSampledPoints.Length; i++)
{
var point = superSampledPoints[i];

// This list-building code is done separately from the filtering loop
// because it cannot be vectorized by burst.
for (var i = 0; i < superSampledPoints.Length; i++)
{
if (results[i])

正在加载...
取消
保存