/*
The GPLv3 License (GPLv3)
Copyright (c) 2022 Akos Horvath
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#pragma once
#include
#include "utils.h"
#include
#include
#include
#include
using namespace Util;
class Mandelbrotc {
public:
Vec2mp f, t;
uint8_t thread_count;
mpfr::mpreal diff;
std::vector threads;
Vec2i s;
//std::vector> screen;
double **screen;
bool done;
uint32_t max_iter;
Mandelbrotc(Vec2mp const &f, Vec2mp const &t, Vec2i const &s, uint32_t mi);
void start_threads(bool first);
void stop_threads();
double mandelbrot(const Vec2mp &n);
void calc(const uint8_t tid);
void updatePrec();
};