samuel-emrys / raytracer

A simple raytracer
0 stars 0 forks source link

Add concurrency #1

Closed samuel-emrys closed 2 years ago

samuel-emrys commented 2 years ago

Currently, this raytracer works in single threaded mode only. This means that the image currently takes ~1.5 hours to generate. It would be good to add some concurrency here to speed things up. The first step of this should be to utilise the additional CPU cores to manage this task, and later on offload this task to the GPU where possible (#2).

To minimise the cost of creating and destroying threads, it might be a good idea to consider using a thread pool. Some resources on achieving this in C++20: