| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | 
							- #ifndef MANDEL_NAIVEIRGENERATOR_H
 
- #define MANDEL_NAIVEIRGENERATOR_H
 
- #include "IterationIR.h"
 
- #include "Generators.h"
 
- #include <variant>
 
- namespace mnd
 
- {
 
-     template<typename T>
 
-     class NaiveIRGenerator;
 
-     namespace eval
 
-     {
 
-         struct Load;
 
-         struct Store;
 
-         struct Add;
 
-         struct Sub;
 
-         struct Mul;
 
-         struct Div;
 
-         struct Neg;    
 
-         struct Atan2;
 
-         struct Pow;
 
-         struct Cos;
 
-         struct Sin;
 
-         struct Exp;
 
-         struct Ln;
 
-         using EvalNode = std::variant<
 
-             Load,
 
-             Store,
 
-             Add,
 
-             Sub,
 
-             Mul,
 
-             Div,
 
-             Neg,
 
-             Atan2,
 
-             Pow,
 
-             Cos,
 
-             Sin,
 
-             Exp,
 
-             Ln
 
-         >;
 
-         template<typename T>
 
-         struct EvalStruct
 
-         {
 
-             std::map<std::string, size_t> variableNames;
 
-             std::vector<T> variables;
 
-             void prepare(const T& zre, const T& zim, const T& cre, const T& cim)
 
-             {
 
-                 auto z_re = variableNames.find("z_re");
 
-                 auto z_im = variableNames.find("z_im");
 
-                 auto c_re = variableNames.find("c_re");
 
-                 auto c_im = variableNames.find("c_im");
 
-                 if (z_re != variableNames.end())
 
-                     variables[z_re->second] = zre;
 
-                 if (z_im != variableNames.end())
 
-                     variables[z_im->second] = zre;
 
-                 if (c_re != variableNames.end())
 
-                     variables[c_re->second] = zre;
 
-                 if (c_im != variableNames.end())
 
-                     variables[c_im->second] = zre;
 
-             }
 
-         };
 
-     }
 
- }
 
- template<typename T>
 
- class mnd::NaiveIRGenerator : public mnd::MandelGenerator
 
- {
 
-     const ir::Formula& form;
 
-     eval::EvalStruct<T> es;
 
-     std::unique_ptr<eval::EvalNode> newz_re;
 
-     std::unique_ptr<eval::EvalNode> newz_im;
 
-     std::unique_ptr<eval::EvalNode> start_re;
 
-     std::unique_ptr<eval::EvalNode> start_im;
 
- public:
 
-     NaiveIRGenerator(const ir::Formula& irf, mnd::Precision prec = mnd::getType<T>());
 
-     NaiveIRGenerator(NaiveIRGenerator&&) = default;
 
-     virtual void generate(const MandelInfo& info, float* data);
 
- };
 
- #endif // MANDEL_NAIVEIRGENERATOR_H
 
 
  |