#ifndef MANDEL_MANDEL_H #define MANDEL_MANDEL_H #include #include #include #include "MandelUtil.h" #include "Generators.h" #include "Hardware.h" //#include "Fixedp.h" namespace mnd { class MandelContext; class MandelDevice; extern MandelContext initializeContext(void); } class mnd::MandelDevice { private: friend class MandelContext; std::string vendor; std::string name; std::unique_ptr floatGenerator; std::unique_ptr doubleGenerator; //std::unique_ptr quadGenerator; //std::unique_ptr generator128; std::unique_ptr floatGeneratorSmooth; std::unique_ptr doubleGeneratorSmooth; //std::unique_ptr quadGeneratorSmooth; //std::unique_ptr generator128Smooth; MandelDevice(void); public: inline const std::string& getVendor(void) const { return vendor; } const std::string& getName(void) const; Generator* getGeneratorFloat(bool smooth = true) const; Generator* getGeneratorDouble(bool smooth = true) const; //Generator* getGeneratorQuad(bool smooth = true) const; //Generator* getGenerator128(bool smooth = true) const; }; class mnd::MandelContext { private: friend MandelContext initializeContext(void); CpuInfo cpuInfo; std::unique_ptr cpuGeneratorFloat; std::unique_ptr cpuGeneratorDouble; std::unique_ptr cpuGeneratorQuad; std::unique_ptr cpuGeneratorOct; std::unique_ptr cpuGenerator128; std::unique_ptr cpuGeneratorFloatSmooth; std::unique_ptr cpuGeneratorDoubleSmooth; std::unique_ptr cpuGeneratorQuadSmooth; std::unique_ptr cpuGenerator128Smooth; std::unique_ptr adaptiveGenerator; std::unique_ptr adaptiveGeneratorSmooth; std::vector devices; MandelContext(void); std::vector createDevices(void); public: Generator& getDefaultGenerator(bool smooth = true); const std::vector& getDevices(void); Generator& getCpuGeneratorFloat(void); Generator& getCpuGeneratorDouble(void); Generator* getCpuGeneratorQuad(void); Generator* getCpuGeneratorOct(void); Generator* getCpuGenerator128(void); const CpuInfo& getCpuInfo(void) const { return cpuInfo; } }; #endif // MANDEL_MANDEL_H