IterationCompiler.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef MANDEL_ITERATIONCOMPILER_H
  2. #define MANDEL_ITERATIONCOMPILER_H
  3. #include "Generators.h"
  4. #include "ClGenerators.h"
  5. #include "IterationIR.h"
  6. #include <memory>
  7. namespace mnd
  8. {
  9. struct ExecData;
  10. class CompiledGenerator;
  11. class CompiledClGenerator;
  12. // forward declare
  13. class MandelContext;
  14. class MandelDevice;
  15. enum class GeneratorType : int;
  16. struct GeneratorCollection;
  17. //mnd::ExecData compile(mnd::MandelContext& mndCtxt);
  18. std::vector<std::unique_ptr<mnd::MandelGenerator>> compileCpu(mnd::MandelContext& mndCtxt,
  19. const IterationFormula& z0,
  20. const IterationFormula& zi);
  21. std::vector<std::unique_ptr<mnd::MandelGenerator>> compileOpenCl(mnd::MandelDevice& dev,
  22. const IterationFormula& z0,
  23. const IterationFormula& zi);
  24. GeneratorCollection compileFormula(mnd::MandelContext& mndCtxt,
  25. const IterationFormula& z0,
  26. const IterationFormula& zi);
  27. }
  28. //void squareTest();
  29. struct mnd::GeneratorCollection
  30. {
  31. std::vector<std::unique_ptr<mnd::MandelGenerator>> cpuGenerators;
  32. std::vector<std::unique_ptr<mnd::MandelGenerator>> clGenerators;
  33. };
  34. namespace mnd
  35. {
  36. CompiledGenerator compile(const ir::Formula& formula);
  37. std::unique_ptr<MandelGenerator> compileCl(const ir::Formula& formula, MandelDevice& md);
  38. }
  39. #endif // MANDEL_ITERATIONCOMPILER_H