start implementing multithreading
This commit is contained in:
24
mandelbrot.h
24
mandelbrot.h
@ -1,14 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <mpfr.h>
|
||||
#include <cmath>
|
||||
#include "utils.h"
|
||||
#include <cstdint>
|
||||
#include <omp.h>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
using namespace Util;
|
||||
|
||||
namespace Mandelbrot
|
||||
{
|
||||
class Mandelbrotc {
|
||||
public:
|
||||
Vec2mp f, t;
|
||||
uint8_t thread_count;
|
||||
std::vector<std::thread> threads;
|
||||
Vec2i s;
|
||||
std::vector<std::vector<uint8_t>> screen;
|
||||
uint32_t max_iter;
|
||||
|
||||
uint32_t mandelbrot(const BigFloat &c, Vec2bf &ret);
|
||||
|
||||
}
|
||||
Mandelbrotc(Vec2mp const &f, Vec2mp const &t, Vec2i const &s, uint32_t mi);
|
||||
void start_threads();
|
||||
void stop_threads();
|
||||
uint32_t mandelbrot(const Vec2mp &n);
|
||||
void calc(const uint8_t tid);
|
||||
};
|
||||
|
Reference in New Issue
Block a user