- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello,
I would like to know how to parallelize CPU workload in game engine ex. Unity or Unreal ?
any related doc ?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
My answer is not directly related to your question it is more about simulation and modelling, but you may got interested in the details.
I am currently working on my own project modelling and simulation of air-to-air missile written mainly in C++ and I usually rely on OPENMP directives and pragmas to parallelize code which does not have any interdependencies. The best candidates for such a parallelization are major "hotspot" functions. Hence I presume that maybe 3D Game Engines or their physics part could implement similar solutions.
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Anderson,
I am unaware of a doc that will cover how to parallelize the CPU workload in the game engine. I am checking to see if one exists for you.
-Michael
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Anderson,
There is no doc perse on this but you might want to look at what the engines already do behind the scenes in relation to threading on the CPU. Beyond that if you are looking at how to explicitly parallelize your workload there should be some kind of job system in each engine that if the work is put in chunks the engine can parallelize for you.
Also check out this this thread for info on the UE4 async framework:
-Michael
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi Anderson,
I have some info for you on Unity3D. The basic System.Threading lib is available, so any .NET multithreading tutorial should do the trick for general calculations. The key rule is to not use any Unity API methods on a separate thread as they are not thread safe.
There are certain asynchronous API versions of typical operations available marked with the word ‘Async’ at the end of the function name. For example, Application.LoadLevelAsync vs Application.LoadLevel.
This posts answer goes into detail about how this can be leveraged: http://answers.unity3d.com/questions/180243/threading-in-unity.html
Here are a few other posts that go into more details:
http://answers.unity3d.com/questions/357033/unity3d-and-c-coroutines-vs-threading.html
http://answers.unity3d.com/questions/908054/unity-5-multithreading.html
-Michael
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
My answer is not directly related to your question it is more about simulation and modelling, but you may got interested in the details.
I am currently working on my own project modelling and simulation of air-to-air missile written mainly in C++ and I usually rely on OPENMP directives and pragmas to parallelize code which does not have any interdependencies. The best candidates for such a parallelization are major "hotspot" functions. Hence I presume that maybe 3D Game Engines or their physics part could implement similar solutions.
