Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 2.47 KB

README.md

File metadata and controls

49 lines (32 loc) · 2.47 KB

Parallel Reduce

This repo demonstrates how to use the ParallelReduce job to reduce an array of values to a single element.

Some examples of a parallel reduce are:

  1. Finding the min and max points in mesh to compute the bounding box of the mesh
  2. Summing a set of values
  3. Comupting the sum of the products of a set of values

Installation

To use this project, just copy-paste the contents of the ParallelReduce.cs file into your project.

Dependencies

The ParallelReduce.cs script depends on the following packages:

Package Version URI
Burst 1.7.0 com.unity.burst
Jobs 0.50.0-preview.8† com.unity.jobs
Mathematics 1.2.5 com.unity.mathematics

† See Known Issues

Test Dependencies

If you also want to run the performance tests, you will need the additional packages:

Package Version URI
Performance testing API 2.8.0-preview com.unity.test-framework.performance

Known Issues

There is currently an issue with the Jobs (0.50.0-preview.8) package which results in the following error when using IJobParallelForBatch:

System.InvalidOperationException : Reflection data was not set up by an Initialize() call

The current work-around is to use Jobs version 0.11.0-preview.6.