implemented working multithreading

This commit is contained in:
2022-07-05 23:22:01 +02:00
parent 22892c3d70
commit c79412bdab
3 changed files with 93 additions and 16 deletions

View File

@ -15,11 +15,13 @@ public:
uint8_t thread_count;
std::vector<std::thread> threads;
Vec2i s;
std::vector<std::vector<uint8_t>> screen;
//std::vector<std::vector<uint8_t>> screen;
uint8_t **screen;
bool done;
uint32_t max_iter;
Mandelbrotc(Vec2mp const &f, Vec2mp const &t, Vec2i const &s, uint32_t mi);
void start_threads();
void start_threads(bool first);
void stop_threads();
uint32_t mandelbrot(const Vec2mp &n);
void calc(const uint8_t tid);