benchmarkdialog.h 689 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef BENCHMARKDIALOG_H
  2. #define BENCHMARKDIALOG_H
  3. #include <QDialog>
  4. #include <functional>
  5. #include "ui_benchmarks.h"
  6. #include <Mandel.h>
  7. #include "Bitmap.h"
  8. class BenchmarkDialog : public QDialog
  9. {
  10. Q_OBJECT
  11. private:
  12. Ui::BenchmarkDialog ui;
  13. mnd::MandelContext& mndContext;
  14. public:
  15. explicit BenchmarkDialog(mnd::MandelContext& mndContext, QWidget *parent = nullptr);
  16. mnd::MandelViewport benchViewport(void) const;
  17. double measureMips(const std::function<Bitmap<float>()>& bench) const;
  18. QString benchmarkResult(mnd::Generator& mg, int size, int iters) const;
  19. signals:
  20. public slots:
  21. private slots:
  22. void on_run_clicked();
  23. };
  24. #endif // BENCHMARKDIALOG_H