1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #ifndef MANDEL_GENERATORS_H
- #define MANDEL_GENERATORS_H
- #include "MandelUtil.h"
- #include <vector>
- #include <map>
- #include <utility>
- namespace mnd
- {
- class Generator;
- class AdaptiveGenerator;
- enum class Precision : int
- {
- FLOAT,
- DOUBLE,
- DOUBLE_DOUBLE,
- FLOAT128,
- QUAD_DOUBLE,
- FLOAT256,
- INFINITE
- };
- Real getPrecision(Precision p);
- }
- class mnd::Generator
- {
- public:
- Generator(void) = default;
- virtual ~Generator(void);
- Generator(const Generator&) = delete;
- Generator& operator=(const Generator&) = delete;
- Generator(Generator&&) = default;
- Generator& operator=(Generator&&) = default;
- virtual void generate(const MandelInfo& info, float* data) = 0;
- };
- class mnd::AdaptiveGenerator : public Generator
- {
- std::map<Real, Generator*, std::greater<Real>> generators;
- public:
- AdaptiveGenerator(void) = default;
- AdaptiveGenerator(Generator* floatGen, Generator* doubleGen);
- virtual ~AdaptiveGenerator(void) = default;
- void addGenerator(const Real& precision, Generator& generator);
- void addGenerator(Precision p, Generator& generator);
- virtual void generate(const MandelInfo& info, float* data);
- };
- #endif // MANDEL_GENERATORS_H
|