Open utterances-bot opened 3 years ago
In the example of atomics, it should be "std::atomic
Is it a good idea to make a container of related data for each thread to eliminate the need for synchronization?
std::for_each(std::execution::par, VecOfParticleSystems.begin(), VecOfParticleSystems.end(),
[](ParticleSystem* System){
for(Particle* Part : System)
{
Part->Update();
System->vertexAmount += Part->IsDead ? 0ull : Part->vertexCount;
}
std::erase_if( System, [](Particle& Part){return Part->IsDead;} );
});
I recall when exactly 2 weeks ago I knew almost nothing about creating multi-threaded task-based systems when I've stumbled upon your article. It was such a good starting point, that today I obviously had to end up finding myself researching win32 api internals in pursuit of creating my own lightweight fiber implementation.
Multithreading for game engines - Vulkan Guide
Practical guide to vulkan graphics programming
https://www.vkguide.dev/docs/extra-chapter/multithreading/