Improved OpenCL profile generation, don't create unnecessary (equal to main profile) profiles.

This commit is contained in:
XMRig 2019-10-09 11:11:43 +07:00
parent 1d03b942a5
commit 7db7b3727d
6 changed files with 193 additions and 99 deletions

View file

@ -30,6 +30,7 @@
#include "backend/opencl/OclThread.h"
#include "backend/opencl/wrappers/OclDevice.h"
namespace xmrig {
@ -40,6 +41,7 @@ class OclThreads
public:
OclThreads() = default;
OclThreads(const rapidjson::Value &value);
OclThreads(const std::vector<OclDevice> &devices, const Algorithm &algorithm);
inline bool isEmpty() const { return m_data.empty(); }
inline const std::vector<OclThread> &data() const { return m_data; }
@ -47,6 +49,10 @@ public:
inline void add(OclThread &&thread) { m_data.push_back(thread); }
inline void reserve(size_t capacity) { m_data.reserve(capacity); }
inline bool operator!=(const OclThreads &other) const { return !isEqual(other); }
inline bool operator==(const OclThreads &other) const { return isEqual(other); }
bool isEqual(const OclThreads &other) const;
rapidjson::Value toJSON(rapidjson::Document &doc) const;
private: