O
O
Obscutum2021-01-23 14:48:12
C++ / C#
Obscutum, 2021-01-23 14:48:12

How to parallelize a loop in Unity using System.Threading?

The essence of the problem is simple. I have a giant three-dimensional float4 array (from the Unity.Mathematics library), and there is a loop that performs calculations over each element of this array, and puts the results in order into two sheets. I just could not figure out how to use System.Threading to:
1) Divide the execution of the loop equally between threads
2) Keep the order of the results in the sheets

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question